First-order terms under relabelling, substitution and language maps #
Mathlib's FirstOrder.Language.Term.varFinsetLeft collects the variables of a term over α ⊕ β
that come from the left summand α. This file characterizes it through the full variable set
Term.varFinset, and computes it after Term.relabel and Term.subst. It also records that a
language map commutes with relabelling the variables of a term. Constructor equations for
BoundedFormula.constantsVarsEquiv describe abstraction of constants in finitary formulas.
Main results #
FirstOrder.Language.Term.mem_varFinsetLeft_iff:ais a left variable oftexactly whenSum.inl ais a variable oft.FirstOrder.Language.Term.mem_varFinsetLeft_relabel: the left variables of a relabelled term.FirstOrder.Language.Term.mem_varFinsetLeft_subst: the left variables of a substituted term.FirstOrder.Language.Term.exists_eq_var_of_isRelational: in a relational language, every term is a variable.FirstOrder.Language.Term.exists_eq_var_inr_of_isRelational: in a relational language, a term overα ⊕ βwithαempty is a variableSum.inr b.FirstOrder.Language.LHom.onTerm_relabel: a language map commutes with relabelling the variables of a term.
theorem
FirstOrder.Language.Term.mem_varFinsetLeft_iff
{L : Language}
{α : Type u_1}
{β : Type u_2}
[DecidableEq α]
[DecidableEq β]
{t : L.Term (α ⊕ β)}
{a : α}
:
A left variable of a term over α ⊕ β is a variable Sum.inl a of the term.
theorem
FirstOrder.Language.Term.mem_varFinsetLeft_relabel
{L : Language}
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[DecidableEq α]
[DecidableEq β]
(f : α → β ⊕ γ)
{t : L.Term α}
{b : β}
:
The left variables of t.relabel f are the left values of f on the variables of t.
theorem
FirstOrder.Language.Term.mem_varFinsetLeft_subst
{L : Language}
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[DecidableEq α]
[DecidableEq β]
(σ : α → L.Term (β ⊕ γ))
{t : L.Term α}
{b : β}
:
The left variables of t.subst σ are the left variables of σ x for the variables x
of t.
theorem
FirstOrder.Language.Term.exists_eq_var_of_isRelational
{L : Language}
{α : Type u_1}
[L.IsRelational]
(t : L.Term α)
:
In a relational language, every term is a variable.
@[simp]
theorem
FirstOrder.Language.BoundedFormula.constantsVarsEquiv_falsum
{L : Language}
{α : Type u_1}
{γ : Type u_2}
{n : ℕ}
:
@[simp]
theorem
FirstOrder.Language.BoundedFormula.constantsVarsEquiv_equal
{L : Language}
{α : Type u_1}
{γ : Type u_2}
{n : ℕ}
(t₁ t₂ : (L.withConstants γ).Term (α ⊕ Fin n))
:
constantsVarsEquiv (equal t₁ t₂) = equal (Term.constantsVarsEquivLeft t₁) (Term.constantsVarsEquivLeft t₂)
@[simp]
theorem
FirstOrder.Language.BoundedFormula.constantsVarsEquiv_rel
{L : Language}
{α : Type u_1}
{γ : Type u_2}
{n l : ℕ}
(R : (L.withConstants γ).Relations l)
(ts : Fin l → (L.withConstants γ).Term (α ⊕ Fin n))
:
constantsVarsEquiv (rel R ts) = rel ((Equiv.sumEmpty (L.Relations l) ((constantsOn γ).Relations l)) R) fun (i : Fin l) =>
Term.constantsVarsEquivLeft (ts i)
@[simp]
theorem
FirstOrder.Language.BoundedFormula.constantsVarsEquiv_imp
{L : Language}
{α : Type u_1}
{γ : Type u_2}
{n : ℕ}
(φ ψ : (L.withConstants γ).BoundedFormula α n)
:
@[simp]
theorem
FirstOrder.Language.BoundedFormula.constantsVarsEquiv_all
{L : Language}
{α : Type u_1}
{γ : Type u_2}
{n : ℕ}
(φ : (L.withConstants γ).BoundedFormula α (n + 1))
: