Substitution #
This file defines operations on [PropForm] and [PropFun] for substituting the variables in a formula with other variables, or in general with other formulas.
The main definitions are:
- [PropForm.subst], [PropFun.subst]
- [PropForm.substOne], [PropFun.substOne]
- [PropForm.map], [PropFun.map]
- [PropForm.pmap], [PropFun.pmap]
def
Trestle.Model.PropAssignment.subst
{ν : Type u_1}
{ν' : Type u_2}
(f : ν → PropFun ν')
(τ : PropAssignment ν')
:
Equations
- Trestle.Model.PropAssignment.subst f τ v = decide (τ ⊨ f v)
Instances For
PropForm #
@[reducible]
def
Trestle.Model.PropForm.subst
{ν₁ : Type u_1}
{ν₂ : Type u_2}
(p : PropForm ν₁)
(f : ν₁ → PropForm ν₂)
:
PropForm ν₂
Equations
- (Trestle.Model.PropForm.var l).subst f = f l
- Trestle.Model.PropForm.tr.subst f = Trestle.Model.PropForm.tr
- Trestle.Model.PropForm.fls.subst f = Trestle.Model.PropForm.fls
- φ.neg.subst f = (φ.subst f).neg
- (φ₁.conj φ₂).subst f = (φ₁.subst f).conj (φ₂.subst f)
- (φ₁.disj φ₂).subst f = (φ₁.subst f).disj (φ₂.subst f)
- (φ₁.impl φ₂).subst f = (φ₁.subst f).impl (φ₂.subst f)
- (φ₁.biImpl φ₂).subst f = (φ₁.subst f).biImpl (φ₂.subst f)
Instances For
@[simp]
theorem
Trestle.Model.PropForm.vars_subst
{ν₁ : Type u_1}
{ν₂ : Type u_2}
(f : ν₁ → PropForm ν₂)
(φ : PropForm ν₁)
[DecidableEq ν₁]
[DecidableEq ν₂]
:
@[simp]
theorem
Trestle.Model.PropForm.satisfies_subst
{ν₁ : Type u_1}
{ν₂ : Type u_2}
{φ : PropForm ν₁}
{f : ν₁ → PropForm ν₂}
{τ : PropAssignment ν₂}
:
def
Trestle.Model.PropForm.substOne
{ν : Type u_1}
[DecidableEq ν]
(φ : PropForm ν)
(v : ν)
(ψ : PropForm ν)
:
PropForm ν
Equations
Instances For
theorem
Trestle.Model.PropForm.satisfies_substOne
{ν : Type u_1}
[DecidableEq ν]
(ψ : PropForm ν)
{φ : PropForm ν}
{v : ν}
{τ : PropAssignment ν}
:
PropFun #
def
Trestle.Model.PropFun.substL
{ν₁ : Type u_1}
{ν₂ : Type u_2}
(φ : PropFun ν₁)
(f : ν₁ → PropForm ν₂)
:
PropFun ν₂
Equations
- φ.substL f = Quotient.lift (fun (x : Trestle.Model.PropForm ν₁) => ⟦x.subst f⟧) ⋯ φ
Instances For
@[simp]
theorem
Trestle.Model.PropFun.satisfies_substL
{ν₁ : Type u_1}
{ν₂ : Type u_2}
{φ : PropFun ν₁}
{f : ν₁ → PropForm ν₂}
{τ : PropAssignment ν₂}
:
@[simp]
theorem
Trestle.Model.PropFun.satisfies_subst
{ν₁ : Type u_1}
{ν₂ : Type u_2}
{φ : PropFun ν₁}
{f : ν₁ → PropFun ν₂}
{τ : PropAssignment ν₂}
:
@[simp]
theorem
Trestle.Model.PropFun.subst_distrib
{ν₁ : Type u_2}
{ν₂ : Type u_1}
(f : ν₁ → PropFun ν₂)
(v : ν₁)
:
theorem
Trestle.Model.PropFun.semVars_subst
{ν₁ : Type u_1}
{ν₂ : Type u_2}
[DecidableEq ν₁]
[DecidableEq ν₂]
{φ : PropFun ν₁}
{f : ν₁ → PropFun ν₂}
:
def
Trestle.Model.PropFun.substOne
{ν : Type u_1}
[DecidableEq ν]
(ψ : PropFun ν)
(v : ν)
(φ : PropFun ν)
:
PropFun ν
Equations
- ψ.substOne v φ = Quotient.lift (fun (ψ : Trestle.Model.PropForm ν) => Quotient.lift (fun (φ : Trestle.Model.PropForm ν) => ⟦ψ.substOne v φ⟧) ⋯ φ) ⋯ ψ
Instances For
@[simp]
theorem
Trestle.Model.PropFun.satisfies_substOne
{ν : Type u_1}
[DecidableEq ν]
{φ ψ : PropFun ν}
{v : ν}
{τ : PropAssignment ν}
:
Equations
- Trestle.Model.PropForm.map f (Trestle.Model.PropForm.var l) = Trestle.Model.PropForm.var (f l)
- Trestle.Model.PropForm.map f Trestle.Model.PropForm.tr = Trestle.Model.PropForm.tr
- Trestle.Model.PropForm.map f Trestle.Model.PropForm.fls = Trestle.Model.PropForm.fls
- Trestle.Model.PropForm.map f φ.neg = (Trestle.Model.PropForm.map f φ).neg
- Trestle.Model.PropForm.map f (φ₁.conj φ₂) = (Trestle.Model.PropForm.map f φ₁).conj (Trestle.Model.PropForm.map f φ₂)
- Trestle.Model.PropForm.map f (φ₁.disj φ₂) = (Trestle.Model.PropForm.map f φ₁).disj (Trestle.Model.PropForm.map f φ₂)
- Trestle.Model.PropForm.map f (φ₁.impl φ₂) = (Trestle.Model.PropForm.map f φ₁).impl (Trestle.Model.PropForm.map f φ₂)
- Trestle.Model.PropForm.map f (φ₁.biImpl φ₂) = (Trestle.Model.PropForm.map f φ₁).biImpl (Trestle.Model.PropForm.map f φ₂)
Instances For
@[simp]
theorem
Trestle.Model.PropForm.vars_map
{ν₁ : Type u_1}
{ν₂ : Type u_2}
(f : ν₁ → ν₂)
(φ : PropForm ν₁)
[DecidableEq ν₁]
[DecidableEq ν₂]
:
theorem
Trestle.Model.PropForm.satisfies_map
{ν₁ : Type u_1}
{ν₂ : Type u_2}
{φ : PropForm ν₁}
{f : ν₁ → ν₂}
{τ : PropAssignment ν₂}
:
@[simp]
theorem
Trestle.Model.PropForm.semVars_map
{ν₁ : Type u_1}
{ν₂ : Type u_2}
[DecidableEq ν₁]
[DecidableEq ν₂]
[Fintype ν₁]
{f : ν₁ → ν₂}
(hf : Function.Injective f)
(φ : PropForm ν₁)
:
def
Trestle.Model.PropFun.map
{ν₁ : Type u_1}
{ν₂ : Type u_2}
(f : ν₁ → ν₂)
(φ : PropFun ν₁)
:
PropFun ν₂
Equations
- Trestle.Model.PropFun.map f φ = Quotient.lift (fun (x : Trestle.Model.PropForm ν₁) => ⟦Trestle.Model.PropForm.map f x⟧) ⋯ φ
Instances For
@[simp]
theorem
Trestle.Model.PropFun.satisfies_map
{ν₁ : Type u_1}
{ν₂ : Type u_2}
{φ : PropFun ν₁}
{f : ν₁ → ν₂}
{τ : PropAssignment ν₂}
:
theorem
Trestle.Model.PropFun.semVars_map
{ν₁ : Type u_1}
{ν₂ : Type u_2}
[DecidableEq ν₁]
[DecidableEq ν₂]
[Fintype ν₁]
(f : ν₁ → ν₂)
(φ : PropFun ν₁)
(hf : Function.Injective f)
: