Terms of first-order logic #
This file defines the terms of first-order logic.
The bounded variables are denoted by #x for x : Fin n, and free variables are denoted by &x
for x : ξ.
t : Semiterm L ξ n is a (semi-)term of language L with bounded variables of Fin n and free
variables of ξ.
Imported declaration from the Incompleteness formalization.
- bvar {L : Language} {ξ : Type u_1} {n : ℕ} : Fin n → Semiterm L ξ n
- fvar {L : Language} {ξ : Type u_1} {n : ℕ} : ξ → Semiterm L ξ n
- func {L : Language} {ξ : Type u_1} {n arity : ℕ} : L.Func arity → (Fin arity → Semiterm L ξ n) → Semiterm L ξ n
Instances For
Imported declaration from the Incompleteness formalization.
Equations
- LO.FirstOrder.«term&_» = Lean.ParserDescr.node `LO.FirstOrder.«term&_» 1024 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "&") (Lean.ParserDescr.cat `term 1024))
Instances For
Imported declaration from the Incompleteness formalization.
Equations
- LO.FirstOrder.«term#_» = Lean.ParserDescr.node `LO.FirstOrder.«term#_» 1024 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "#") (Lean.ParserDescr.cat `term 1024))
Instances For
Imported declaration from the Incompleteness formalization.
Equations
- LO.FirstOrder.Term L ξ = LO.FirstOrder.Semiterm L ξ 0
Instances For
Imported declaration from the Incompleteness formalization.
Equations
Instances For
Imported declaration from the Incompleteness formalization.
Equations
Instances For
Equations
Imported declaration from the Incompleteness formalization.
Equations
- (LO.FirstOrder.Semiterm.bvar x_1).toStr = "x_{" ++ toString (n - 1 - ↑x_1) ++ "}"
- (LO.FirstOrder.Semiterm.fvar x_1).toStr = "z_{" ++ toString x_1 ++ "}"
- (LO.FirstOrder.Semiterm.func c a).toStr = toString c
- (LO.FirstOrder.Semiterm.func f v).toStr = ("{" ++ toString f ++ "} \\left(" ++ String.vecToStr fun (i : Fin (n_1 + 1)) => (v i).toStr) ++ "\\right)"
Instances For
Equations
- LO.FirstOrder.Semiterm.instRepr = { reprPrec := fun (t : LO.FirstOrder.Semiterm L ξ n) (x : ℕ) => Std.Format.text t.toStr }
Imported declaration from the Incompleteness formalization.
Equations
- One or more equations did not get rendered due to their size.
- (LO.FirstOrder.Semiterm.bvar x_2).hasDecEq (LO.FirstOrder.Semiterm.bvar y) = ⋯.mpr (decEq x_2 y)
- (LO.FirstOrder.Semiterm.bvar a).hasDecEq (LO.FirstOrder.Semiterm.fvar a_1) = isFalse ⋯
- (LO.FirstOrder.Semiterm.bvar a).hasDecEq (LO.FirstOrder.Semiterm.func a_1 a_2) = isFalse ⋯
- (LO.FirstOrder.Semiterm.fvar a).hasDecEq (LO.FirstOrder.Semiterm.bvar a_1) = isFalse ⋯
- (LO.FirstOrder.Semiterm.fvar x_2).hasDecEq (LO.FirstOrder.Semiterm.fvar y) = ⋯.mpr (decEq x_2 y)
- (LO.FirstOrder.Semiterm.fvar a).hasDecEq (LO.FirstOrder.Semiterm.func a_1 a_2) = isFalse ⋯
- (LO.FirstOrder.Semiterm.func a a_1).hasDecEq (LO.FirstOrder.Semiterm.bvar a_2) = isFalse ⋯
- (LO.FirstOrder.Semiterm.func a a_1).hasDecEq (LO.FirstOrder.Semiterm.fvar a_2) = isFalse ⋯
Instances For
Imported declaration from the Incompleteness formalization.
Equations
- (LO.FirstOrder.Semiterm.bvar a).complexity = 0
- (LO.FirstOrder.Semiterm.fvar a).complexity = 0
- (LO.FirstOrder.Semiterm.func a v).complexity = (Finset.univ.sup fun (i : Fin arity) => (v i).complexity) + 1
Instances For
Imported declaration from the Incompleteness formalization.
Equations
- (LO.FirstOrder.Semiterm.bvar a).bv = {a}
- (LO.FirstOrder.Semiterm.fvar a).bv = ∅
- (LO.FirstOrder.Semiterm.func a v).bv = Finset.univ.biUnion fun (i : Fin arity) => (v i).bv
Instances For
Imported declaration from the Incompleteness formalization.
Equations
- (LO.FirstOrder.Semiterm.bvar a).freeVariables = ∅
- (LO.FirstOrder.Semiterm.fvar a).freeVariables = {a}
- (LO.FirstOrder.Semiterm.func a v).freeVariables = Finset.univ.biUnion fun (i : Fin arity) => (v i).freeVariables
Instances For
Imported declaration from the Incompleteness formalization.
Equations
- t.FVar? x = (x ∈ t.freeVariables)
Instances For
Imported declaration from the Incompleteness formalization.
Equations
- LO.FirstOrder.Semiterm.lMap Φ (LO.FirstOrder.Semiterm.bvar a) = LO.FirstOrder.Semiterm.bvar a
- LO.FirstOrder.Semiterm.lMap Φ (LO.FirstOrder.Semiterm.fvar a) = LO.FirstOrder.Semiterm.fvar a
- LO.FirstOrder.Semiterm.lMap Φ (LO.FirstOrder.Semiterm.func a v) = LO.FirstOrder.Semiterm.func (Φ.func a) fun (i : Fin arity) => LO.FirstOrder.Semiterm.lMap Φ (v i)