Documentation

Foundation.Logic.Predicate.Rew

Rewriting System #

term/formula morphisms such as Rewritings, substitutions, and embeddings are handled by the structure LO.FirstOrder.Rew.

Rewritings LO.FirstOrder.Rew is naturally converted to formula Rewritings by LO.FirstOrder.Rew.hom.

structure LO.FirstOrder.Rew (L : Language) (ξ₁ : Type u_1) (n₁ : ) (ξ₂ : Type u_2) (n₂ : ) :
Type (max (max u_1 u_2) u_3)
Instances For
@[reducible, inline]
abbrev LO.FirstOrder.SyntacticRew (L : Language) (n₁ n₂ : ) :
Type u_1
Equations
instance LO.FirstOrder.Rew.instFunLikeSemiterm {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } :
FunLike (Rew L ξ₁ n₁ ξ₂ n₂) (Semiterm L ξ₁ n₁) (Semiterm L ξ₂ n₂)
Equations
instance LO.FirstOrder.Rew.instCoeFunForallSemiterm {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } :
CoeFun (Rew L ξ₁ n₁ ξ₂ n₂) fun (x : Rew L ξ₁ n₁ ξ₂ n₂) => Semiterm L ξ₁ n₁Semiterm L ξ₂ n₂
Equations
theorem LO.FirstOrder.Rew.func {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } (ω : Rew L ξ₁ n₁ ξ₂ n₂) {k : } (f : L.Func k) (v : Fin kSemiterm L ξ₁ n₁) :
ω (Semiterm.func f v) = Semiterm.func f fun (i : Fin k) => ω (v i)
theorem LO.FirstOrder.Rew.func'' {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } (ω : Rew L ξ₁ n₁ ξ₂ n₂) {k : } (f : L.Func k) (v : Fin kSemiterm L ξ₁ n₁) :
ω (Semiterm.func f v) = Semiterm.func f (ω v)
@[simp]
theorem LO.FirstOrder.Rew.func0 {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } (ω : Rew L ξ₁ n₁ ξ₂ n₂) (f : L.Func 0) (v : Fin 0Semiterm L ξ₁ n₁) :
@[simp]
theorem LO.FirstOrder.Rew.func1 {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } (ω : Rew L ξ₁ n₁ ξ₂ n₂) (f : L.Func 1) (t : Semiterm L ξ₁ n₁) :
ω (Semiterm.func f ![t]) = Semiterm.func f ![ω t]
@[simp]
theorem LO.FirstOrder.Rew.func2 {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } (ω : Rew L ξ₁ n₁ ξ₂ n₂) (f : L.Func 2) (t₁ t₂ : Semiterm L ξ₁ n₁) :
ω (Semiterm.func f ![t₁, t₂]) = Semiterm.func f ![ω t₁, ω t₂]
@[simp]
theorem LO.FirstOrder.Rew.func3 {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } (ω : Rew L ξ₁ n₁ ξ₂ n₂) (f : L.Func 3) (t₁ t₂ t₃ : Semiterm L ξ₁ n₁) :
ω (Semiterm.func f ![t₁, t₂, t₃]) = Semiterm.func f ![ω t₁, ω t₂, ω t₃]
theorem LO.FirstOrder.Rew.ext {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } (ω₁ ω₂ : Rew L ξ₁ n₁ ξ₂ n₂) (hb : ∀ (x : Fin n₁), ω₁ (Semiterm.bvar x) = ω₂ (Semiterm.bvar x)) (hf : ∀ (x : ξ₁), ω₁ (Semiterm.fvar x) = ω₂ (Semiterm.fvar x)) :
ω₁ = ω₂
theorem LO.FirstOrder.Rew.ext' {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } {ω₁ ω₂ : Rew L ξ₁ n₁ ξ₂ n₂} (h : ω₁ = ω₂) (t : Semiterm L ξ₁ n₁) :
ω₁ t = ω₂ t
def LO.FirstOrder.Rew.id {L : Language} {ξ : Type u_1} {n : } :
Rew L ξ n ξ n
Equations
@[simp]
theorem LO.FirstOrder.Rew.id_app {L : Language} {ξ : Type u_1} {n : } (t : Semiterm L ξ n) :
Rew.id t = t
def LO.FirstOrder.Rew.comp {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {ξ₃ : Type u_5} {n₁ n₂ n₃ : } (ω₂ : Rew L ξ₂ n₂ ξ₃ n₃) (ω₁ : Rew L ξ₁ n₁ ξ₂ n₂) :
Rew L ξ₁ n₁ ξ₃ n₃
Equations
theorem LO.FirstOrder.Rew.comp_app {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {ξ₃ : Type u_5} {n₁ n₂ n₃ : } (ω₂ : Rew L ξ₂ n₂ ξ₃ n₃) (ω₁ : Rew L ξ₁ n₁ ξ₂ n₂) (t : Semiterm L ξ₁ n₁) :
(ω₂.comp ω₁) t = ω₂ (ω₁ t)
@[simp]
theorem LO.FirstOrder.Rew.id_comp {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } (ω : Rew L ξ₁ n₁ ξ₂ n₂) :
Rew.id.comp ω = ω
@[simp]
theorem LO.FirstOrder.Rew.comp_id {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } (ω : Rew L ξ₁ n₁ ξ₂ n₂) :
ω.comp Rew.id = ω
def LO.FirstOrder.Rew.bindAux {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } (b : Fin n₁Semiterm L ξ₂ n₂) (e : ξ₁Semiterm L ξ₂ n₂) :
Semiterm L ξ₁ n₁Semiterm L ξ₂ n₂
Equations
def LO.FirstOrder.Rew.bind {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } (b : Fin n₁Semiterm L ξ₂ n₂) (e : ξ₁Semiterm L ξ₂ n₂) :
Rew L ξ₁ n₁ ξ₂ n₂
Equations
def LO.FirstOrder.Rew.rewrite {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n : } (f : ξ₁Semiterm L ξ₂ n) :
Rew L ξ₁ n ξ₂ n
Equations
def LO.FirstOrder.Rew.rewriteMap {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n : } (e : ξ₁ξ₂) :
Rew L ξ₁ n ξ₂ n
Equations
def LO.FirstOrder.Rew.map {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } (b : Fin n₁Fin n₂) (e : ξ₁ξ₂) :
Rew L ξ₁ n₁ ξ₂ n₂
Equations
def LO.FirstOrder.Rew.emb {L : Language} {o : Type v₁} [h : IsEmpty o] {ξ : Type v₂} {n : } :
Rew L o n ξ n
Equations
@[reducible, inline]
abbrev LO.FirstOrder.Rew.embs {L : Language} {o : Type v₁} [IsEmpty o] {n : } :
Rew L o n n
Equations
def LO.FirstOrder.Rew.empty {L : Language} {o : Type v₁} [h : IsEmpty o] {ξ : Type v₂} {n : } :
Rew L o 0 ξ n
Equations
def LO.FirstOrder.Rew.bShiftAdd {L : Language} {ξ : Type u_1} {n : } (m : ) :
Rew L ξ n ξ (n + m)
Equations
def LO.FirstOrder.Rew.cast {L : Language} {ξ : Type u_1} {n n' : } (h : n = n') :
Rew L ξ n ξ n'
Equations
def LO.FirstOrder.Rew.castLE {L : Language} {ξ : Type u_1} {n n' : } (h : n n') :
Rew L ξ n ξ n'
Equations
def LO.FirstOrder.Rew.q {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } (ω : Rew L ξ₁ n₁ ξ₂ n₂) :
Rew L ξ₁ (n₁ + 1) ξ₂ (n₂ + 1)
Equations
theorem LO.FirstOrder.Rew.eq_id_of_eq {L : Language} {ξ : Type u_1} {n : } {ω : Rew L ξ n ξ n} (hb : ∀ (x : Fin n), ω (Semiterm.bvar x) = Semiterm.bvar x) (he : ∀ (x : ξ), ω (Semiterm.fvar x) = Semiterm.fvar x) (t : Semiterm L ξ n) :
ω t = t
def LO.FirstOrder.Rew.qpow {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } (ω : Rew L ξ₁ n₁ ξ₂ n₂) (k : ) :
Rew L ξ₁ (n₁ + k) ξ₂ (n₂ + k)
Equations
  • ω.qpow 0 = ω
  • ω.qpow k.succ = (ω.qpow k).q
@[simp]
theorem LO.FirstOrder.Rew.qpow_zero {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } (ω : Rew L ξ₁ n₁ ξ₂ n₂) :
ω.qpow 0 = ω
@[simp]
theorem LO.FirstOrder.Rew.qpow_succ {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } (ω : Rew L ξ₁ n₁ ξ₂ n₂) (k : ) :
ω.qpow (k + 1) = (ω.qpow k).q
@[simp]
theorem LO.FirstOrder.Rew.bind_fvar {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } (b : Fin n₁Semiterm L ξ₂ n₂) (e : ξ₁Semiterm L ξ₂ n₂) (m : ξ₁) :
(bind b e) (Semiterm.fvar m) = e m
@[simp]
theorem LO.FirstOrder.Rew.bind_bvar {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } (b : Fin n₁Semiterm L ξ₂ n₂) (e : ξ₁Semiterm L ξ₂ n₂) (n : Fin n₁) :
(bind b e) (Semiterm.bvar n) = b n
theorem LO.FirstOrder.Rew.eq_bind {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } (ω : Rew L ξ₁ n₁ ξ₂ n₂) :
@[simp]
theorem LO.FirstOrder.Rew.bind_eq_id_of_zero {L : Language} {ξ₂ : Type u_4} (f : Fin 0Semiterm L ξ₂ 0) :
@[simp]
theorem LO.FirstOrder.Rew.map_fvar {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } (b : Fin n₁Fin n₂) (e : ξ₁ξ₂) (m : ξ₁) :
@[simp]
theorem LO.FirstOrder.Rew.map_bvar {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } (b : Fin n₁Fin n₂) (e : ξ₁ξ₂) (n : Fin n₁) :
@[simp]
theorem LO.FirstOrder.Rew.map_id {L : Language} {ξ : Type u_1} {n : } :
theorem LO.FirstOrder.Rew.map_inj {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } {b : Fin n₁Fin n₂} {e : ξ₁ξ₂} (hb : Function.Injective b) (he : Function.Injective e) :
@[simp]
theorem LO.FirstOrder.Rew.rewrite_fvar {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n : } (f : ξ₁Semiterm L ξ₂ n) (x : ξ₁) :
(rewrite f) (Semiterm.fvar x) = f x
@[simp]
theorem LO.FirstOrder.Rew.rewrite_bvar {L : Language} {ξ₁ : Type u_3} {n : } {ξ✝ : Type u_6} {e : ξ₁Semiterm L ξ✝ n} (x : Fin n) :
theorem LO.FirstOrder.Rew.rewrite_comp_rewrite {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {ξ₃ : Type u_5} {n : } (v : ξ₂Semiterm L ξ₃ n) (w : ξ₁Semiterm L ξ₂ n) :
(rewrite v).comp (rewrite w) = rewrite ((rewrite v) w)
@[simp]
theorem LO.FirstOrder.Rew.rewriteMap_fvar {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n : } (e : ξ₁ξ₂) (x : ξ₁) :
@[simp]
theorem LO.FirstOrder.Rew.rewriteMap_bvar {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n : } (e : ξ₁ξ₂) (x : Fin n) :
theorem LO.FirstOrder.Rew.eq_rewriteMap_of_funEqOn_fv {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } [DecidableEq ξ₁] (t : Semiterm L ξ₁ n₁) (f g : ξ₁Semiterm L ξ₂ n₂) (h : Function.funEqOn t.FVar? f g) :
(rewriteMap f) t = (rewriteMap g) t
@[simp]
theorem LO.FirstOrder.Rew.emb_bvar {L : Language} {ξ : Type u_1} {n : } {o : Type v₂} [IsEmpty o] (x : Fin n) :
@[simp]
theorem LO.FirstOrder.Rew.emb_eq_id {L : Language} {n : } {o : Type v₂} [IsEmpty o] :
theorem LO.FirstOrder.Rew.eq_empty {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n : } [h : IsEmpty ξ₁] (ω : Rew L ξ₁ 0 ξ₂ n) :
ω = empty
@[simp]
theorem LO.FirstOrder.Rew.bShift_bvar {L : Language} {ξ : Type u_1} {n : } (x : Fin n) :
bShift (Semiterm.bvar x) = Semiterm.bvar x.succ
@[simp]
theorem LO.FirstOrder.Rew.bShift_fvar {L : Language} {ξ : Type u_1} {n : } (x : ξ) :
@[simp]
theorem LO.FirstOrder.Rew.bShift_ne_zero {L : Language} {ξ : Type u_1} {n : } (t : Semiterm L ξ n) :
bShift t Semiterm.bvar 0
@[simp]
theorem LO.FirstOrder.Rew.bShift_positive {L : Language} {ξ : Type u_1} {n : } (t : Semiterm L ξ n) :
(bShift t).Positive
theorem LO.FirstOrder.Rew.positive_iff {L : Language} {ξ : Type u_1} {n : } {t : Semiterm L ξ (n + 1)} :
t.Positive ∃ (t' : Semiterm L ξ n), t = bShift t'
@[simp]
theorem LO.FirstOrder.Rew.bShiftAdd_bvar {L : Language} {ξ : Type u_1} {n : } (m : ) (x : Fin n) :
(bShiftAdd m) (Semiterm.bvar x) = Semiterm.bvar (x.addNat m)
@[simp]
theorem LO.FirstOrder.Rew.bShiftAdd_fvar {L : Language} {ξ : Type u_1} {n : } (m : ) (x : ξ) :
@[simp]
theorem LO.FirstOrder.Rew.substs_bvar {L : Language} {ξ : Type u_1} {n n' : } (w : Fin nSemiterm L ξ n') (x : Fin n) :
(substs w) (Semiterm.bvar x) = w x
@[simp]
theorem LO.FirstOrder.Rew.substs_fvar {L : Language} {ξ : Type u_1} {n n' : } (w : Fin nSemiterm L ξ n') (x : ξ) :
@[simp]
theorem LO.FirstOrder.Rew.substs_zero {L : Language} {ξ : Type u_1} (w : Fin 0Term L ξ) :
theorem LO.FirstOrder.Rew.substs_comp_substs {L : Language} {ξ : Type u_1} {n l k : } (v : Fin lSemiterm L ξ k) (w : Fin kSemiterm L ξ n) :
(substs w).comp (substs v) = substs ((substs w) v)
@[simp]
theorem LO.FirstOrder.Rew.cast_bvar {L : Language} {ξ : Type u_1} {n n' : } (h : n = n') (x : Fin n) :
@[simp]
theorem LO.FirstOrder.Rew.cast_fvar {L : Language} {ξ : Type u_1} {n n' : } (h : n = n') (x : ξ) :
@[simp]
theorem LO.FirstOrder.Rew.cast_eq_id {L : Language} {ξ : Type u_1} {n : } {h : n = n} :
@[simp]
theorem LO.FirstOrder.Rew.castLe_bvar {L : Language} {ξ : Type u_1} {n n' : } (h : n n') (x : Fin n) :
@[simp]
theorem LO.FirstOrder.Rew.castLe_fvar {L : Language} {ξ : Type u_1} {n n' : } (h : n n') (x : ξ) :
@[simp]
theorem LO.FirstOrder.Rew.castLe_eq_id {L : Language} {ξ : Type u_1} {n : } {h : n n} :
@[simp]
theorem LO.FirstOrder.Rew.toS_fvar {L : Language} {n : } (x : Fin n) :
@[simp]
theorem LO.FirstOrder.Rew.embSubsts_bvar {L : Language} {ξ : Type u_1} {n k : } (w : Fin kSemiterm L ξ n) (x : Fin k) :
@[simp]
theorem LO.FirstOrder.Rew.embSubsts_zero {L : Language} {ξ : Type u_1} (w : Fin 0Term L ξ) :
theorem LO.FirstOrder.Rew.substs_comp_embSubsts {L : Language} {ξ : Type u_1} {n k l : } (v : Fin lSemiterm L ξ k) (w : Fin kSemiterm L ξ n) :
(substs w).comp (embSubsts v) = embSubsts ((substs w) v)
@[simp]
theorem LO.FirstOrder.Rew.q_bvar_zero {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } (ω : Rew L ξ₁ n₁ ξ₂ n₂) :
@[simp]
theorem LO.FirstOrder.Rew.q_bvar_succ {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } (ω : Rew L ξ₁ n₁ ξ₂ n₂) (i : Fin n₁) :
ω.q (Semiterm.bvar i.succ) = bShift (ω (Semiterm.bvar i))
@[simp]
theorem LO.FirstOrder.Rew.q_fvar {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } (ω : Rew L ξ₁ n₁ ξ₂ n₂) (x : ξ₁) :
ω.q (Semiterm.fvar x) = bShift (ω (Semiterm.fvar x))
@[simp]
theorem LO.FirstOrder.Rew.q_comp_bShift {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } (ω : Rew L ξ₁ n₁ ξ₂ n₂) :
ω.q.comp bShift = bShift.comp ω
@[simp]
theorem LO.FirstOrder.Rew.q_comp_bShift_app {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } (ω : Rew L ξ₁ n₁ ξ₂ n₂) (t : Semiterm L ξ₁ n₁) :
ω.q (bShift t) = bShift (ω t)
@[simp]
theorem LO.FirstOrder.Rew.q_id {L : Language} {ξ : Type u_1} {n : } :
@[simp]
theorem LO.FirstOrder.Rew.q_eq_zero_iff {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } (ω : Rew L ξ₁ n₁ ξ₂ n₂) {t : Semiterm L ξ₁ (n₁ + 1)} :
@[simp]
theorem LO.FirstOrder.Rew.q_positive_iff {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } (ω : Rew L ξ₁ n₁ ξ₂ n₂) {t : Semiterm L ξ₁ (n₁ + 1)} :
(ω.q t).Positive t.Positive
@[simp]
theorem LO.FirstOrder.Rew.qpow_id {L : Language} {ξ : Type u_1} {n k : } :
Rew.id.qpow k = Rew.id
theorem LO.FirstOrder.Rew.q_comp {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {ξ₃ : Type u_5} {n₁ n₂ n₃ : } (ω₂ : Rew L ξ₂ n₂ ξ₃ n₃) (ω₁ : Rew L ξ₁ n₁ ξ₂ n₂) :
(ω₂.comp ω₁).q = ω₂.q.comp ω₁.q
theorem LO.FirstOrder.Rew.qpow_comp {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {ξ₃ : Type u_5} {n₁ n₂ n₃ : } (k : ) (ω₂ : Rew L ξ₂ n₂ ξ₃ n₃) (ω₁ : Rew L ξ₁ n₁ ξ₂ n₂) :
(ω₂.comp ω₁).qpow k = (ω₂.qpow k).comp (ω₁.qpow k)
theorem LO.FirstOrder.Rew.q_bind {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } (b : Fin n₁Semiterm L ξ₂ n₂) (e : ξ₁Semiterm L ξ₂ n₂) :
(bind b e).q = bind (Semiterm.bvar 0 :> bShift b) (bShift e)
theorem LO.FirstOrder.Rew.q_map {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } (b : Fin n₁Fin n₂) (e : ξ₁ξ₂) :
(map b e).q = map (0 :> Fin.succ b) e
theorem LO.FirstOrder.Rew.q_rewrite {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n : } (f : ξ₁Semiterm L ξ₂ n) :
(rewrite f).q = rewrite (bShift f)
@[simp]
theorem LO.FirstOrder.Rew.q_rewriteMap {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n : } (e : ξ₁ξ₂) :
@[simp]
theorem LO.FirstOrder.Rew.q_emb {L : Language} {ξ₂ : Type u_4} {o : Type v₁} [e : IsEmpty o] {n : } :
@[simp]
theorem LO.FirstOrder.Rew.qpow_emb {L : Language} {ξ₂ : Type u_4} {o : Type v₁} [e : IsEmpty o] {n k : } :
emb.qpow k = emb
@[simp]
theorem LO.FirstOrder.Rew.q_cast {L : Language} {ξ : Type u_1} {n n' : } (h : n = n') :
(cast h).q = cast
@[simp]
theorem LO.FirstOrder.Rew.q_castLE {L : Language} {ξ : Type u_1} {n n' : } (h : n n') :
(castLE h).q = castLE
theorem LO.FirstOrder.Rew.q_toS {L : Language} {n : } :
toS.q = bind ![Semiterm.bvar 0] fun (x : Fin n) => Semiterm.bvar x.succ
@[simp]
theorem LO.FirstOrder.Rew.qpow_castLE {L : Language} {ξ : Type u_1} {k n n' : } (h : n n') :
(castLE h).qpow k = castLE
theorem LO.FirstOrder.Rew.q_substs {L : Language} {ξ : Type u_1} {n n' : } (w : Fin nSemiterm L ξ n') :
theorem LO.FirstOrder.Rew.q_embSubsts {L : Language} {ξ : Type u_1} {n k : } (w : Fin kSemiterm L ξ n) :
@[simp]
theorem LO.FirstOrder.Rew.shift_bvar {L : Language} {n : } (x : Fin n) :
@[simp]
theorem LO.FirstOrder.Rew.shift_fvar {L : Language} {n : } (x : ) :
shift (Semiterm.fvar x) = Semiterm.fvar (x + 1)
theorem LO.FirstOrder.Rew.shift_func {L : Language} {n k : } (f : L.Func k) (v : Fin kSyntacticSemiterm L n) :
shift (Semiterm.func f v) = Semiterm.func f fun (i : Fin k) => shift (v i)
@[simp]
theorem LO.FirstOrder.Rew.free_bvar_castSucc {L : Language} {n : } (x : Fin n) :
free (Semiterm.bvar x.castSucc) = Semiterm.bvar x
@[simp]
theorem LO.FirstOrder.Rew.free_fvar {L : Language} {n : } (x : ) :
@[simp]
theorem LO.FirstOrder.Rew.fix_bvar {L : Language} {n : } (x : Fin n) :
fix (Semiterm.bvar x) = Semiterm.bvar x.castSucc
@[simp]
theorem LO.FirstOrder.Rew.bShift_comp_substs {L : Language} {ξ₂ : Type u_4} {n₁ n₂ : } (v : Fin n₁Semiterm L ξ₂ n₂) :
bShift.comp (substs v) = substs (bShift v)
theorem LO.FirstOrder.Rew.shift_comp_substs {L : Language} {n₁ n₂ : } (v : Fin n₁SyntacticSemiterm L n₂) :
theorem LO.FirstOrder.Rew.shift_comp_substs1 {L : Language} {n₂ : } (t : SyntacticSemiterm L n₂) :
Rew.comp shift (substs ![t]) = (substs ![shift t]).comp shift
@[simp]
theorem LO.FirstOrder.Rew.rewrite_comp_emb {L : Language} {ξ₂ : Type u_4} {ξ₃ : Type u_5} {n : } {o : Type v₁} [e : IsEmpty o] (f : ξ₂Semiterm L ξ₃ n) :
(rewrite f).comp emb = emb
@[simp]
@[simp]
theorem LO.FirstOrder.Rew.substs_comp_bShift_eq_id {L : Language} {ξ : Type u_1} (v : Fin 1Semiterm L ξ 0) :
@[simp]
theorem LO.FirstOrder.Rew.rewriteMap_comp_rewriteMap {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {ξ₃ : Type u_5} {n : } (f : ξ₁ξ₂) (g : ξ₂ξ₃) :
(rewriteMap g).comp (rewriteMap f) = rewriteMap (g f)
@[simp]
theorem LO.FirstOrder.Rew.fix_free_app {L : Language} {n : } (t : SyntacticSemiterm L (n + 1)) :
fix (free t) = t
@[simp]
theorem LO.FirstOrder.Rew.free_fix_app {L : Language} {n : } (t : SyntacticSemiterm L n) :
free (fix t) = t
@[simp]
theorem LO.FirstOrder.Rew.free_bShift_app {L : Language} (t : SyntacticSemiterm L 0) :
free (bShift t) = shift t
@[simp]
theorem LO.FirstOrder.Rew.substs_bShift_app {L : Language} {ξ : Type u_1} {t : Semiterm L ξ 0} (v : Fin 1Semiterm L ξ 0) :
(substs v) (bShift t) = t
@[simp]
theorem LO.FirstOrder.Rew.fixitr_succ {L : Language} {n : } (m : ) :
fixitr n (m + 1) = Rew.comp fix (fixitr n m)
@[simp]
theorem LO.FirstOrder.Rew.fixitr_fvar {L : Language} (n m x : ) :
(fixitr n m) (Semiterm.fvar x) = if h : x < m then Semiterm.bvar (Fin.natAdd n x, h) else Semiterm.fvar (x - m)
theorem LO.FirstOrder.Rew.substs_bv {L : Language} {ξ : Type u_1} {n m : } (t : Semiterm L ξ n) (v : Fin nSemiterm L ξ m) :
((substs v) t).bv = t.bv.biUnion fun (i : Fin n) => (v i).bv
@[simp]
theorem LO.FirstOrder.Rew.substs_positive {L : Language} {ξ : Type u_1} {n m : } (t : Semiterm L ξ n) (v : Fin nSemiterm L ξ (m + 1)) :
((substs v) t).Positive it.bv, (v i).Positive
theorem LO.FirstOrder.Rew.embSubsts_bv {L : Language} {ξ : Type u_1} {n m : } (t : Semiterm L Empty n) (v : Fin nSemiterm L ξ m) :
((embSubsts v) t).bv = t.bv.biUnion fun (i : Fin n) => (v i).bv
@[simp]
theorem LO.FirstOrder.Rew.embSubsts_positive {L : Language} {ξ : Type u_1} {n m : } (t : Semiterm L Empty n) (v : Fin nSemiterm L ξ (m + 1)) :
((embSubsts v) t).Positive it.bv, (v i).Positive
@[simp]
theorem LO.FirstOrder.Rew.bshift_positive {L : Language} {ξ : Type u_1} {n : } (t : Semiterm L ξ n) :
(bShift t).Positive
theorem LO.FirstOrder.Rew.emb_comp_bShift_comm {L : Language} {ξ : Type u_1} {n : } {o : Type v₁} [IsEmpty o] :
bShift.comp emb = emb.comp bShift
theorem LO.FirstOrder.Rew.emb_bShift_term {L : Language} {ξ : Type u_1} {n : } {o : Type v₁} [IsEmpty o] (t : Semiterm L o n) :
bShift (emb t) = emb (bShift t)

Rewriting system of terms #

@[simp]
theorem LO.FirstOrder.Semiterm.freeVariables_emb {L : Language} {ξ : Type u_1} {n : } {ο : Type u_6} [IsEmpty ο] [DecidableEq ξ] {t : Semiterm L ο n} :
(Rew.emb t).freeVariables =
theorem LO.FirstOrder.Semiterm.rew_eq_of_funEqOn {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } [DecidableEq ξ₁] (ω₁ ω₂ : Rew L ξ₁ n₁ ξ₂ n₂) (t : Semiterm L ξ₁ n₁) (hb : ∀ (x : Fin n₁), ω₁ (bvar x) = ω₂ (bvar x)) (he : Function.funEqOn t.FVar? (ω₁ fvar) (ω₂ fvar)) :
ω₁ t = ω₂ t
theorem LO.FirstOrder.Semiterm.lMap_bind {L₁ : Language} {L₂ : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } (Φ : L₁.Hom L₂) (b : Fin n₁Semiterm L₁ ξ₂ n₂) (e : ξ₁Semiterm L₁ ξ₂ n₂) (t : Semiterm L₁ ξ₁ n₁) :
lMap Φ ((Rew.bind b e) t) = (Rew.bind (lMap Φ b) (lMap Φ e)) (lMap Φ t)
theorem LO.FirstOrder.Semiterm.lMap_map {L₁ : Language} {L₂ : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } (Φ : L₁.Hom L₂) (b : Fin n₁Fin n₂) (e : ξ₁ξ₂) (t : Semiterm L₁ ξ₁ n₁) :
lMap Φ ((Rew.map b e) t) = (Rew.map b e) (lMap Φ t)
theorem LO.FirstOrder.Semiterm.lMap_bShift {L₁ : Language} {L₂ : Language} {ξ₁ : Type u_3} {n : } (Φ : L₁.Hom L₂) (t : Semiterm L₁ ξ₁ n) :
lMap Φ (Rew.bShift t) = Rew.bShift (lMap Φ t)
theorem LO.FirstOrder.Semiterm.lMap_shift {L₁ : Language} {L₂ : Language} {n : } (Φ : L₁.Hom L₂) (t : SyntacticSemiterm L₁ n) :
lMap Φ (Rew.shift t) = Rew.shift (lMap Φ t)
theorem LO.FirstOrder.Semiterm.lMap_free {L₁ : Language} {L₂ : Language} {n : } (Φ : L₁.Hom L₂) (t : SyntacticSemiterm L₁ (n + 1)) :
lMap Φ (Rew.free t) = Rew.free (lMap Φ t)
theorem LO.FirstOrder.Semiterm.lMap_fix {L₁ : Language} {L₂ : Language} {n : } (Φ : L₁.Hom L₂) (t : SyntacticSemiterm L₁ n) :
lMap Φ (Rew.fix t) = Rew.fix (lMap Φ t)
theorem LO.FirstOrder.Semiterm.fvar?_rew {L : Language} {ξ₁ : Type u_3} {ξ₂ : Type u_4} {n₁ n₂ : } [DecidableEq ξ₁] [DecidableEq ξ₂] {ω : Rew L ξ₁ n₁ ξ₂ n₂} {t : Semiterm L ξ₁ n₁} {x : ξ₂} :
(ω t).FVar? x(∃ (i : Fin n₁), (ω (bvar i)).FVar? x) ∃ (z : ξ₁), t.FVar? z (ω (fvar z)).FVar? x
@[simp]
theorem LO.FirstOrder.Semiterm.fvar?_bShift {L : Language} {ξ : Type u_1} {n : } [DecidableEq ξ] {t : Semiterm L ξ n} {x : ξ} :
(Rew.bShift t).FVar? x t.FVar? x
def LO.FirstOrder.Semiterm.toEmpty {L : Language} {ξ : Type u_1} [DecidableEq ξ] {n : } (t : Semiterm L ξ n) :
t.freeVariables = Semiterm L Empty n
Equations
@[simp]
theorem LO.FirstOrder.Semiterm.emb_toEmpty {L : Language} {ξ : Type u_1} {n : } [DecidableEq ξ] (t : Semiterm L ξ n) (ht : t.freeVariables = ) :
Rew.emb (t.toEmpty ht) = t

Rewriting system of formulae #

class LO.FirstOrder.FreeVar (ξ : outParam (Type u_1)) (F : Type u_2) :
    Instances
      class LO.FirstOrder.Rewriting (L : outParam Language) (ξ : outParam (Type u_1)) (F : Type u_2) (ζ : Type u_3) (G : outParam (Type u_4)) [LCWQ F] [LCWQ G] :
      Type (max (max (max (max u_1 u_2) u_3) u_4) u_5)
      • app {n₁ n₂ : } : Rew L ξ n₁ ζ n₂F n₁ →ˡᶜ G n₂
      • app_all {n₁ n₂ : } (ω₁₂ : Rew L ξ n₁ ζ n₂) (φ : F (n₁ + 1)) : (app ω₁₂) (∀' φ) = ∀' (app ω₁₂.q) φ
      • app_ex {n₁ n₂ : } (ω₁₂ : Rew L ξ n₁ ζ n₂) (φ : F (n₁ + 1)) : (app ω₁₂) (∃' φ) = ∃' (app ω₁₂.q) φ
      Instances
      @[reducible, inline]
      abbrev LO.FirstOrder.SyntacticRewriting (L : outParam Language) (F : Type u_1) (G : outParam (Type u_2)) [LCWQ F] [LCWQ G] :
      Type (max (max u_1 u_2) u_3)
      Equations
      Equations
      • One or more equations did not get rendered due to their size.
      theorem LO.FirstOrder.Rewriting.smul_ext' {F : Type u_5} {G : Type u_4} {L : Language} {ξ : Type u_1} {ζ : Type u_2} [LCWQ F] [LCWQ G] [Rewriting L ξ F ζ G] {n₁ n₂ : } {ω₁ ω₂ : Rew L ξ n₁ ζ n₂} (h : ω₁ = ω₂) {φ : F n₁} :
      (app ω₁) φ = (app ω₂) φ
      @[simp]
      theorem LO.FirstOrder.Rewriting.smul_ball {F : Type u_5} {G : Type u_4} {L : Language} {ξ : Type u_1} {ζ : Type u_2} [LCWQ F] [LCWQ G] [Rewriting L ξ F ζ G] {n₁ n₂ : } (ω : Rew L ξ n₁ ζ n₂) (φ ψ : F (n₁ + 1)) :
      (app ω) (∀[φ] ψ) = ∀[(app ω.q) φ] (app ω.q) ψ
      @[simp]
      theorem LO.FirstOrder.Rewriting.smul_bex {F : Type u_5} {G : Type u_4} {L : Language} {ξ : Type u_1} {ζ : Type u_2} [LCWQ F] [LCWQ G] [Rewriting L ξ F ζ G] {n₁ n₂ : } (ω : Rew L ξ n₁ ζ n₂) (φ ψ : F (n₁ + 1)) :
      (app ω) (∃[φ] ψ) = ∃[(app ω.q) φ] (app ω.q) ψ
      @[reducible, inline]
      abbrev LO.FirstOrder.Rewriting.substitute {F : Type u_1} {L : Language} {ξ : Type u_3} [LCWQ F] {n₁ n₂ : } [Rewriting L ξ F ξ F] (φ : F n₁) (w : Fin n₁Semiterm L ξ n₂) :
      F n₂
      Equations
      Equations
      • One or more equations did not get rendered due to their size.
      @[reducible, inline]
      abbrev LO.FirstOrder.Rewriting.shift {F : Type u_1} {L : Language} [LCWQ F] {n : } [Rewriting L F F] (φ : F n) :
      F n
      Equations
      @[reducible, inline]
      abbrev LO.FirstOrder.Rewriting.free {F : Type u_1} {L : Language} [LCWQ F] {n : } [Rewriting L F F] (φ : F (n + 1)) :
      F n
      Equations
      @[reducible, inline]
      abbrev LO.FirstOrder.Rewriting.fix {F : Type u_1} {L : Language} [LCWQ F] {n : } [Rewriting L F F] (φ : F n) :
      F (n + 1)
      Equations
      @[reducible, inline]
      abbrev LO.FirstOrder.Rewriting.embedding {L : Language} {n : } {ο : Type u_4} {ξ : Type u_5} [IsEmpty ο] {O : Type u_1} {F : Type u_2} [LCWQ O] [LCWQ F] [Rewriting L ο O ξ F] (φ : O n) :
      F n
      Equations
      Equations
      • One or more equations did not get rendered due to their size.
      Equations
      • One or more equations did not get rendered due to their size.
      class LO.FirstOrder.TransitiveRewriting (L : outParam Language) (ξ₁ : outParam (Type u_1)) (F₁ : Type u_2) (ξ₂ : Type u_3) (F₂ : outParam (Type u_4)) (ξ₃ : Type u_5) (F₃ : outParam (Type u_6)) [LCWQ F₁] [LCWQ F₂] [LCWQ F₃] [Rewriting L ξ₁ F₁ ξ₂ F₂] [Rewriting L ξ₂ F₂ ξ₃ F₃] [Rewriting L ξ₁ F₁ ξ₃ F₃] :
      Instances
      class LO.FirstOrder.InjMapRewriting (L : outParam Language) (ξ : outParam (Type u_1)) (F : Type u_2) (ζ : Type u_3) (G : outParam (Type u_4)) [LCWQ F] [LCWQ G] [Rewriting L ξ F ζ G] :
      Instances
      Instances
      @[simp]
      theorem LO.FirstOrder.LawfulSyntacticRewriting.shifts_cons {L : Language} {S : Type u_1} [LCWQ S] [SyntacticRewriting L S S] {n : } (φ : S n) (Γ : List (S n)) :
      theorem LO.FirstOrder.LawfulSyntacticRewriting.shifts_neg {L : Language} {S : Type u_1} [LCWQ S] [SyntacticRewriting L S S] {n : } (Γ : List (S n)) :
      Rewriting.shifts (List.map (fun (x : S n) => x) Γ) = List.map (fun (x : S n) => x) (Rewriting.shifts Γ)
      @[simp]
      theorem LO.FirstOrder.LawfulSyntacticRewriting.substitute_empty {L : Language} {S : Type u_1} [LCWQ S] [SyntacticRewriting L S S] [LawfulSyntacticRewriting L S] (φ : S 0) (v : Fin 0Semiterm L 0) :
      φ v = φ
      @[simp]

      hom_substs_mbar_zero_comp_shift_eq_free

      theorem LO.FirstOrder.LawfulSyntacticRewriting.free_rewrite_eq {L : Language} {S : Type u_1} [LCWQ S] [SyntacticRewriting L S S] [LawfulSyntacticRewriting L S] (f : SyntacticTerm L) (φ : S 1) :
      Rewriting.free ((Rewriting.app (Rew.rewrite fun (x : ) => Rew.bShift (f x))) φ) = (Rewriting.app (Rew.rewrite (Semiterm.fvar 0 :>ₙ fun (x : ) => Rew.shift (f x)))) (Rewriting.free φ)
      @[simp]
      theorem LO.FirstOrder.LawfulSyntacticRewriting.cast_substs_eq {L : Language} {S : Type u_1} [LCWQ S] [SyntacticRewriting L S S] [LawfulSyntacticRewriting L S] (t : SyntacticTerm L) (φ : S 0) :
      (φ/[])/[t] = φ
      theorem LO.FirstOrder.Rewriting.embedding_injective {ο : Type u_1} {ξ : Type u_2} [IsEmpty ο] {O : Type u_3} {F : Type u_4} [LCWQ O] [LCWQ F] {L : Language} {n : } [Rewriting L ο O ξ F] [InjMapRewriting L ο O ξ F] :
      Function.Injective fun (φ : O n) => φ
      @[simp]
      theorem LO.FirstOrder.Rewriting.emb_univClosure {ο : Type u_1} {ξ : Type u_2} [IsEmpty ο] {O : Type u_3} {F : Type u_4} [LCWQ O] [LCWQ F] {L : Language} {n : } [Rewriting L ο O ξ F] {σ : O n} :
      (∀* σ) = ∀* σ
      theorem LO.FirstOrder.Rewriting.embedding_substitute_eq_substitute_embedding {ο : Type u_1} {ξ : Type u_2} [IsEmpty ο] {O : Type u_3} {F : Type u_4} [LCWQ O] [LCWQ F] {L : Language} {k n : } [Rewriting L ο O ο O] [Rewriting L ο O ξ F] [Rewriting L ξ F ξ F] [TransitiveRewriting L ο O ο O ξ F] [TransitiveRewriting L ο O ξ F ξ F] (φ : O k) (v : Fin kSemiterm L ο n) :
      (φ v) = φ fun (i : Fin k) => Rew.emb (v i)

      coe_substs_eq_substs_coe

      theorem LO.FirstOrder.Rewriting.embedding_substs_eq_substs_coe₁ {ο : Type u_1} {ξ : Type u_2} [IsEmpty ο] {O : Type u_3} {F : Type u_4} [LCWQ O] [LCWQ F] {L : Language} {n : } [Rewriting L ο O ο O] [Rewriting L ο O ξ F] [Rewriting L ξ F ξ F] [TransitiveRewriting L ο O ο O ξ F] [TransitiveRewriting L ο O ξ F ξ F] (φ : O 1) (t : Semiterm L ο n) :
      (φ/[t]) = φ/[Rew.emb t]

      coe_substs_eq_substs_coe₁

      @[simp]
      theorem LO.FirstOrder.Rewriting.shifts_emb {L : Language} {ο : Type u_1} [IsEmpty ο] {O : Type u_3} {F : Type u_4} [LCWQ O] [LCWQ F] {n : } [Rewriting L ο O F] [Rewriting L F F] [TransitiveRewriting L ο O F F] (Γ : List (O n)) :