Rewriting #
term/formula morphisms such as rewritings, substitutions, and embeddings are handled by the structure LO.FirstOrder.Rew.
LO.FirstOrder.Rew.rewrite fis a rewriting of the free variables occurring in a term byf : ξ₁ → Semiterm L ξ₂ n.LO.FirstOrder.Rew.subst vis a substitution of the bounded variables occurring in a term byv : Fin n → Semiterm L ξ n'.LO.FirstOrder.Rew.bShiftis a transformation of the bounded variables occurring in a term by#x ↦ #(Fin.succ x).LO.FirstOrder.Rew.shiftis a transformation of the free variables occurring in a term by&x ↦ &(x + 1).LO.FirstOrder.Rew.embis a embedding of a term with no free variables.
Rewritings LO.FirstOrder.Rew is naturally converted to formula rewritings by LO.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.
- 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
Equations
- LO.FirstOrder.SyntacticRew L n₁ n₂ = LO.FirstOrder.Rew L ℕ n₁ ℕ n₂
Instances For
Equations
- LO.FirstOrder.Rew.instFunLikeSemiterm = { coe := fun (f : LO.FirstOrder.Rew L ξ₁ n₁ ξ₂ n₂) => f.toFun, coe_injective := ⋯ }
Equations
- LO.FirstOrder.Rew.bindAux b e (LO.FirstOrder.Semiterm.bvar x_1) = b x_1
- LO.FirstOrder.Rew.bindAux b e (LO.FirstOrder.Semiterm.fvar x_1) = e x_1
- LO.FirstOrder.Rew.bindAux b e (LO.FirstOrder.Semiterm.func f v) = LO.FirstOrder.Semiterm.func f fun (i : Fin arity) => LO.FirstOrder.Rew.bindAux b e (v i)
Instances For
LO.FirstOrder.Rew.bind f is a rewriting 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
- LO.FirstOrder.Rew.bind b e = { toFun := LO.FirstOrder.Rew.bindAux b e, func'' := ⋯ }
Instances For
LO.FirstOrder.Rew.rewrite f is a rewriting of the free variables occurring in a term by f : ξ₁ → Semiterm L ξ₂ n.
Instances For
LO.FirstOrder.Rew.rewriteMap f is a rewriting of the free variables occurring in a term by e : ξ₁ → ξ₂.
Equations
- LO.FirstOrder.Rew.rewriteMap e = LO.FirstOrder.Rew.rewrite fun (m : ξ₁) => LO.FirstOrder.Semiterm.fvar (e m)
Instances For
Equations
- LO.FirstOrder.Rew.map b e = LO.FirstOrder.Rew.bind (fun (n : Fin n₁) => LO.FirstOrder.Semiterm.bvar (b n)) fun (m : ξ₁) => LO.FirstOrder.Semiterm.fvar (e m)
Instances For
LO.FirstOrder.Rew.subst v is a substitution of the bounded variables occurring in a term by v : Fin n → Semiterm L ξ n'.
Instances For
LO.FirstOrder.Rew.emb is a embedding of a term with no free variables.
Equations
- LO.FirstOrder.Rew.emb = LO.FirstOrder.Rew.map id fun (a : o) => h.elim a
Instances For
Equations
Instances For
Equations
- LO.FirstOrder.Rew.empty = LO.FirstOrder.Rew.map Fin.elim0 fun (a : o) => h.elim a
Instances For
LO.FirstOrder.Rew.bShift is a transformation of the bounded variables occurring in a term by #x ↦ #(Fin.succ x).
Instances For
Equations
- LO.FirstOrder.Rew.bShiftAdd m = LO.FirstOrder.Rew.map (fun (x : Fin n) => x.addNat m) id
Instances For
Equations
Instances For
Equations
Instances For
LO.FirstOrder.Rew.shift is a transformation of the free variables occurring in the term by &x ↦ &(x + 1).
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Rewriting system of terms #
Equations
- (LO.FirstOrder.Semiterm.bvar x_2).toEmpty x_3 = LO.FirstOrder.Semiterm.bvar x_2
- (LO.FirstOrder.Semiterm.fvar x_2).toEmpty h = ⋯.elim
- (LO.FirstOrder.Semiterm.func f v).toEmpty h = LO.FirstOrder.Semiterm.func f fun (i : Fin arity) => (v i).toEmpty ⋯
Instances For
Rewriting system of formulae #
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- φ ⇜ w = (LO.FirstOrder.Rewriting.app (LO.FirstOrder.Rew.subst w)) φ
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- LO.FirstOrder.«term_⁺» = Lean.ParserDescr.trailingNode `LO.FirstOrder.«term_⁺» 1024 1024 (Lean.ParserDescr.symbol "⁺")
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
- comp_app {n₁ n₂ n₃ : ℕ} (ω₁₂ : Rew L ξ₁ n₁ ξ₂ n₂) (ω₂₃ : Rew L ξ₂ n₂ ξ₃ n₃) (φ : F₁ n₁) : (Rewriting.app (ω₂₃.comp ω₁₂)) φ = (Rewriting.app ω₂₃) ((Rewriting.app ω₁₂) φ)
Instances
- 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
- 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
hom_subst_mbar_zero_comp_shift_eq_free
Equations
- LO.FirstOrder.LawfulSyntacticRewriting.shiftEmb = { toFun := ⇑LO.FirstOrder.Rewriting.shift, inj' := ⋯ }
Instances For
coe_subst_eq_subst_coe
coe_subst_eq_subst_coe₁