Supporting results for pointwise provable equality.
Rewriting #
term/formula morphisms such as rewritings, substitutions, and embeddings are handled by the
structure FFL.FirstOrder.Rew.
FFL.FirstOrder.Rew.rewrite fis a rewriting of the free variables occurring in a term byf : ξ₁ → Semiterm L ξ₂ n.FFL.FirstOrder.Rew.subst vis a substitution of the bounded variables occurring in a term byv : Fin n → Semiterm L ξ n'.FFL.FirstOrder.Rew.bShiftis a transformation of the bounded variables occurring in a term by#x ↦ #(Fin.succ x).FFL.FirstOrder.Rew.shiftis a transformation of the free variables occurring in a term by&x ↦ &(x + 1).FFL.FirstOrder.Rew.embis a embedding of a term with no free variables.
Rewritings FFL.FirstOrder.Rew is naturally converted to formula rewritings by
FFL.FirstOrder.Rew.hom.
A structure for maps which rewrite the semiterms occurring in a term.
toFun - A function from Semiterm L ξ₁ n₁ to Semiterm L ξ₂ n₂.
func'' - A proof that toFun respects the function symbols of L.
The to Fun construction in
FFL.FirstOrder.Rew.- func'' {k : ℕ} (f : L.Func k) (v : Fin k → Semiterm L ξ₁ n₁) : self.toFun (Semiterm.func f v) = Semiterm.func f fun (i : Fin k) => self.toFun (v i)
Instances For
The Syntactic Rew construction in FFL.FirstOrder.
Equations
Instances For
Equations
- PointwiseComposition.FFL.FirstOrder.Rew.instFunLikeSemiterm = { coe := fun (f : PointwiseComposition.FFL.FirstOrder.Rew L ξ₁ n₁ ξ₂ n₂) => f.toFun, coe_injective := ⋯ }
The id construction in FFL.FirstOrder.Rew.
Equations
- PointwiseComposition.FFL.FirstOrder.Rew.id = { toFun := id, func'' := ⋯ }
Instances For
The comp construction in FFL.FirstOrder.Rew.
Equations
- ω₂.comp ω₁ = { toFun := fun (t : PointwiseComposition.FFL.FirstOrder.Semiterm L ξ₁ n₁) => ω₂ (ω₁ t), func'' := ⋯ }
Instances For
The bind Aux construction in FFL.FirstOrder.Rew.
Equations
- One or more equations did not get rendered due to their size.
- PointwiseComposition.FFL.FirstOrder.Rew.bindAux b e (PointwiseComposition.FFL.FirstOrder.Semiterm.bvar x_1) = b x_1
- PointwiseComposition.FFL.FirstOrder.Rew.bindAux b e (PointwiseComposition.FFL.FirstOrder.Semiterm.fvar x_1) = e x_1
Instances For
FFL.FirstOrder.Rew.bind f is a substitution of the bound variables occurring in a term by b : Fin n₁ → Semiterm L ξ₂ n₂, and the free variables occurring in a term by e : ξ₁ → Semiterm L ξ₂ n₂.
Equations
- PointwiseComposition.FFL.FirstOrder.Rew.bind b e = { toFun := PointwiseComposition.FFL.FirstOrder.Rew.bindAux b e, func'' := ⋯ }
Instances For
FFL.FirstOrder.Rew.rewrite f is a substitution of the free variables occurring in a term by f : ξ₁ → Semiterm L ξ₂ n.
Equations
Instances For
FFL.FirstOrder.Rew.rewriteMap f is a substitution of the free variables occurring in a term by
e : ξ₁ → ξ₂.
Equations
Instances For
The map construction in FFL.FirstOrder.Rew.
Equations
- One or more equations did not get rendered due to their size.
Instances For
FFL.FirstOrder.Rew.subst v is a substitution of the bound variables occurring in a term by v : Fin n → Semiterm L ξ n'.
Equations
Instances For
FFL.FirstOrder.Rew.emb is a embedding of a term with no free variables. It can be thought of
as a cast from Semiterm L Empty n to Semiterm L ξ n for any type ξ.
Equations
Instances For
The embs construction in FFL.FirstOrder.Rew.
Instances For
The empty construction in FFL.FirstOrder.Rew.
Equations
Instances For
FFL.FirstOrder.Rew.bShift is a transformation of the bounded variables occurring in a term by
#x ↦ #(Fin.succ x).
Equations
Instances For
The b Shift Add construction in FFL.FirstOrder.Rew.
Equations
- PointwiseComposition.FFL.FirstOrder.Rew.bShiftAdd m = PointwiseComposition.FFL.FirstOrder.Rew.map (fun (x : Fin n) => x.addNat m) id
Instances For
The cast construction in FFL.FirstOrder.Rew.
Equations
Instances For
The cast LE construction in FFL.FirstOrder.Rew.
Equations
Instances For
FFL.FirstOrder.Rew.embSubsts v is a substitution of the bound variables occurring in a term
with no free variables by v : Fin n → Semiterm L ξ n'.
This closely resembles FFL.FirstOrder.Rew.subst, however the term is required to have free
variables of type Empty.
Equations
Instances For
FFL.FirstOrder.Rew.shift is a transformation of the free variables occurring in the term by
&x ↦ &(x + 1).
Equations
Instances For
The free construction in FFL.FirstOrder.Rew.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The fix construction in FFL.FirstOrder.Rew.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The rewrite1 construction in FFL.FirstOrder.Rew.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The fixitr construction in FFL.FirstOrder.Rew.
Equations
- One or more equations did not get rendered due to their size.
- PointwiseComposition.FFL.FirstOrder.Rew.fixitr n 0 = PointwiseComposition.FFL.FirstOrder.Rew.id
Instances For
Rewriting system of terms #
The to Empty construction in FFL.FirstOrder.Semiterm.
Equations
- (PointwiseComposition.FFL.FirstOrder.Semiterm.bvar x_2).toEmpty x_3 = PointwiseComposition.FFL.FirstOrder.Semiterm.bvar x_2
- (PointwiseComposition.FFL.FirstOrder.Semiterm.fvar x_2).toEmpty h = ⋯.elim
- (PointwiseComposition.FFL.FirstOrder.Semiterm.func f v).toEmpty h = PointwiseComposition.FFL.FirstOrder.Semiterm.func f fun (i : Fin arity) => (v i).toEmpty ⋯
Instances For
Rewriting system of formulae #
A typeclass for Rews which additionally respect quantifiers.
app - A notion of application of Rews to formulas.
app_all - Application preserves universal quantification.
app_exs - Application preserves existential quantification.
The app construction in
FFL.FirstOrder.Rewriting.
Instances
Application of a Rewriting to a formula.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Applies the substitution FFL.FirstOrder.Rew.subst w to a formula. This substitutes the bound
variables occurring in the formula by w : Fin n₁ → Semiterm L ξ n₂.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Applies the substitution FFL.FirstOrder.Rew.shift to a formula. This substitutes each free
variable &x with &(x + 1).
Equations
Instances For
The free construction in FFL.FirstOrder.Rewriting.
Equations
Instances For
The fix construction in FFL.FirstOrder.Rewriting.
Equations
Instances For
The «term ⁺» construction in FFL.FirstOrder.
Equations
- PointwiseComposition.FFL.FirstOrder.«term_⁺» = Lean.ParserDescr.trailingNode `PointwiseComposition.FFL.FirstOrder.«term_⁺» 1024 1024 (Lean.ParserDescr.symbol "⁺")
Instances For
The subst Notation construction in FFL.FirstOrder.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The unexpander Substitute construction in unexpanderSubstitute.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Data and laws for Transitive Rewriting in FFL.FirstOrder.
- comp_app {n₁ n₂ n₃ : ℕ} (ω₁₂ : Rew L ξ₁ n₁ ξ₂ n₂) (ω₂₃ : Rew L ξ₂ n₂ ξ₃ n₃) (φ : F₁ n₁) : (Rewriting.app (ω₂₃.comp ω₁₂)) φ = (Rewriting.app ω₂₃) ((Rewriting.app ω₁₂) φ)
Instances
Data and laws for Inj Map Rewriting in FFL.FirstOrder.
- smul_map_injective {n₁ n₂ : ℕ} {b : Fin n₁ → Fin n₂} {f : ξ → ζ} (hb : Function.Injective b) (hf : Function.Injective f) : Function.Injective fun (φ : F n₁) => (Rewriting.app (Rew.map b f)) φ
Instances
Data and laws for Lawful Syntactic Rewriting in FFL.FirstOrder.
- comp_app {n₁ n₂ n₃ : ℕ} (ω₁₂ : Rew L ℕ n₁ ℕ n₂) (ω₂₃ : Rew L ℕ n₂ ℕ n₃) (φ : S n₁) : (Rewriting.app (ω₂₃.comp ω₁₂)) φ = (Rewriting.app ω₂₃) ((Rewriting.app ω₁₂) φ)
- smul_map_injective {n₁ n₂ : ℕ} {b : Fin n₁ → Fin n₂} {f : ℕ → ℕ} (hb : Function.Injective b) (hf : Function.Injective f) : Function.Injective fun (φ : S n₁) => (Rewriting.app (Rew.map b f)) φ
Instances
Renaming free variables by predecessor undoes shift (a routine substitution law).
hom_subst_mbar_zero_comp_shift_eq_free
The shift Emb construction in FFL.FirstOrder.LawfulSyntacticRewriting.
Equations
Instances For
coe_subst_eq_subst_coe
coe_subst_eq_subst_coe₁