Flypitch.LanguageExtension studies maps between first-order languages and how they act on
terms, formulas, proofs, and structures. It also records the symbol-filtering and reflection
constructions used later in the Henkin and completeness arguments.
Equations
- Flypitch.fol.Language.Lconstants α = { functions := fun (n : ℕ) => match n with | 0 => α | n.succ => PEmpty.{?u.12 + 1}, relations := fun (x : ℕ) => PEmpty.{?u.12 + 1} }
Instances For
Equations
Instances For
Equations
- Flypitch.fol.symbols_in_formula Flypitch.fol.preformula.falsum = ∅
- Flypitch.fol.symbols_in_formula (t₁ ≃ t₂) = Flypitch.fol.symbols_in_term t₁ ∪ Flypitch.fol.symbols_in_term t₂
- Flypitch.fol.symbols_in_formula (Flypitch.fol.preformula.rel R) = {Sum.inr ⟨x✝, R⟩}
- Flypitch.fol.symbols_in_formula (f.apprel t) = Flypitch.fol.symbols_in_formula f ∪ Flypitch.fol.symbols_in_term t
- Flypitch.fol.symbols_in_formula (f₁ ⟹ f₂) = Flypitch.fol.symbols_in_formula f₁ ∪ Flypitch.fol.symbols_in_formula f₂
- Flypitch.fol.symbols_in_formula (∀' f) = Flypitch.fol.symbols_in_formula f
Instances For
@[simp]
@[simp]
theorem
Flypitch.fol.symbols_in_formula_subst
{L : Language}
{l : ℕ}
(f : preformula L l)
(s : term L)
(n : ℕ)
:
Equations
- Flypitch.fol.«term_→ᴸ_» = Lean.ParserDescr.trailingNode `Flypitch.fol.«term_→ᴸ_» 10 11 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " →ᴸ ") (Lean.ParserDescr.cat `term 11))
Instances For
@[reducible]
Equations
- g.comp f = { on_function := fun {n : ℕ} (x : L₁.functions n) => g.on_function (f.on_function x), on_relation := fun {n : ℕ} (x : L₁.relations n) => g.on_relation (f.on_relation x) }
Instances For
theorem
Flypitch.fol.Lhom.Lhom_funext
{L₁ L₂ : Language}
{F G : L₁ →ᴸ L₂}
(h_fun : ∀ (n : ℕ) (x : L₁.functions n), F.on_function x = G.on_function x)
(h_rel : ∀ (n : ℕ) (x : L₁.relations n), F.on_relation x = G.on_relation x)
:
theorem
Flypitch.fol.Lhom.ext
{L₁ L₂ : Language}
{F G : L₁ →ᴸ L₂}
(h_fun : ∀ (n : ℕ) (x : L₁.functions n), F.on_function x = G.on_function x)
(h_rel : ∀ (n : ℕ) (x : L₁.relations n), F.on_relation x = G.on_relation x)
:
theorem
Flypitch.fol.Lhom.ext_iff
{L₁ L₂ : Language}
{F G : L₁ →ᴸ L₂}
:
F = G ↔ (∀ (n : ℕ) (x : L₁.functions n), F.on_function x = G.on_function x) ∧ ∀ (n : ℕ) (x : L₁.relations n), F.on_relation x = G.on_relation x
- on_function {n : ℕ} : Function.Injective ϕ.on_function
- on_relation {n : ℕ} : Function.Injective ϕ.on_relation
Instances For
- on_function {n : ℕ} : DecidablePred (Set.range ϕ.on_function)
- on_relation {n : ℕ} : DecidablePred (Set.range ϕ.on_relation)
Instances
def
Flypitch.fol.Lhom.on_formula
{L L' : Language}
(ϕ : L →ᴸ L')
{l : ℕ}
:
preformula L l → preformula L' l
Equations
- ϕ.on_formula Flypitch.fol.preformula.falsum = ⊥
- ϕ.on_formula (t₁ ≃ t₂) = ϕ.on_term t₁ ≃ ϕ.on_term t₂
- ϕ.on_formula (Flypitch.fol.preformula.rel R) = Flypitch.fol.preformula.rel (ϕ.on_relation R)
- ϕ.on_formula (f.apprel t) = (ϕ.on_formula f).apprel (ϕ.on_term t)
- ϕ.on_formula (f₁ ⟹ f₂) = ϕ.on_formula f₁ ⟹ ϕ.on_formula f₂
- ϕ.on_formula (∀' f) = ∀' ϕ.on_formula f
Instances For
@[simp]
theorem
Flypitch.fol.Lhom.on_formula_lift_at
{L L' : Language}
(ϕ : L →ᴸ L')
{l : ℕ}
(n m : ℕ)
(f : preformula L l)
:
@[simp]
theorem
Flypitch.fol.Lhom.on_formula_lift
{L L' : Language}
(ϕ : L →ᴸ L')
{l : ℕ}
(n : ℕ)
(f : preformula L l)
:
@[simp]
theorem
Flypitch.fol.Lhom.on_formula_subst
{L L' : Language}
(ϕ : L →ᴸ L')
{l : ℕ}
(f : preformula L l)
(s : term L)
(n : ℕ)
:
@[simp]
theorem
Flypitch.fol.Lhom.on_formula_apps_rel
{L L' : Language}
(ϕ : L →ᴸ L')
{l : ℕ}
(f : preformula L l)
(ts : dvector (term L) l)
:
@[simp]
theorem
Flypitch.fol.Lhom.on_formula_comp
{L L' L₂ : Language}
(ψ : L' →ᴸ L₂)
(ϕ : L →ᴸ L')
{l : ℕ}
(f : preformula L l)
:
@[simp]
theorem
Flypitch.fol.Lhom.not_mem_symbols_in_formula_on_formula
{L L' : Language}
(ϕ : L →ᴸ L')
{s : L'.symbols}
(h : s ∉ Set.range ϕ.on_symbol)
{l : ℕ}
(f : preformula L l)
:
s ∉ symbols_in_formula (ϕ.on_formula f)
theorem
Flypitch.fol.Lhom.not_mem_function_in_formula_on_formula
{L L' : Language}
(ϕ : L →ᴸ L')
{l' : ℕ}
{f' : L'.functions l'}
(h : f' ∉ Set.range ϕ.on_function)
{l : ℕ}
(f : preformula L l)
:
Sum.inl ⟨l', f'⟩ ∉ symbols_in_formula (ϕ.on_formula f)
theorem
Flypitch.fol.Lhom.bounded_term_at_on_term
{L L' : Language}
(ϕ : L →ᴸ L')
{l : ℕ}
{t : preterm L l}
{n : ℕ}
:
bounded_term_at t n → bounded_term_at (ϕ.on_term t) n
theorem
Flypitch.fol.Lhom.bounded_formula_at_on_formula
{L L' : Language}
(ϕ : L →ᴸ L')
{l : ℕ}
{f : preformula L l}
{n : ℕ}
:
bounded_formula_at f n → bounded_formula_at (ϕ.on_formula f) n
def
Flypitch.fol.Lhom.on_bounded_term
{L L' : Language}
(ϕ : L →ᴸ L')
{n l : ℕ}
(t : bounded_preterm L n l)
:
bounded_preterm L' n l
Equations
- ϕ.on_bounded_term t = ⟨ϕ.on_term ↑t, ⋯⟩
Instances For
@[simp]
theorem
Flypitch.fol.Lhom.on_bounded_term_fst
{L L' : Language}
(ϕ : L →ᴸ L')
{n l : ℕ}
(t : bounded_preterm L n l)
:
theorem
Flypitch.fol.Lhom.on_bounded_term_comp
{L L' L₂ : Language}
(ψ : L' →ᴸ L₂)
(ϕ : L →ᴸ L')
{n l : ℕ}
(t : bounded_preterm L n l)
:
def
Flypitch.fol.Lhom.on_bounded_formula
{L L' : Language}
(ϕ : L →ᴸ L')
{n l : ℕ}
(f : bounded_preformula L n l)
:
bounded_preformula L' n l
Equations
- ϕ.on_bounded_formula f = ⟨ϕ.on_formula ↑f, ⋯⟩
Instances For
@[simp]
theorem
Flypitch.fol.Lhom.on_bounded_formula_fst
{L L' : Language}
(ϕ : L →ᴸ L')
{n l : ℕ}
(f : bounded_preformula L n l)
:
theorem
Flypitch.fol.Lhom.on_bounded_formula_comp
{L L' L₂ : Language}
(ψ : L' →ᴸ L₂)
(ϕ : L →ᴸ L')
{n l : ℕ}
(f : bounded_preformula L n l)
:
theorem
Flypitch.fol.Lhom.on_bounded_formula_id
{L : Language}
{n l : ℕ}
(f : bounded_preformula L n l)
:
def
Flypitch.fol.Lhom.on_closed_term
{L L' : Language}
(ϕ : L →ᴸ L')
(t : closed_term L)
:
closed_term L'
Equations
- ϕ.on_closed_term t = ϕ.on_bounded_term t
Instances For
Equations
- ϕ.on_sentence f = ⟨ϕ.on_formula ↑f, ⋯⟩
Instances For
@[simp]
@[reducible]
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Flypitch.fol.Lhom.find_term_filter_symbols
{L : Language}
(p : L.symbols → Prop)
{l : ℕ}
(t : preterm L l)
:
symbols_in_term t ⊆ {s : L.symbols | p s} →
(t' : preterm (filter_symbols p) l) ×' (filter_symbols_Lhom p).on_term t' = t
Equations
- One or more equations did not get rendered due to their size.
- Flypitch.fol.Lhom.find_term_filter_symbols p (&k) x_3 = ⟨&k, ⋯⟩
- Flypitch.fol.Lhom.find_term_filter_symbols p (Flypitch.fol.preterm.func f) h = ⟨Flypitch.fol.preterm.func ⟨f, ⋯⟩, ⋯⟩
Instances For
def
Flypitch.fol.Lhom.find_formula_filter_symbols
{L : Language}
(p : L.symbols → Prop)
{l : ℕ}
(f : preformula L l)
:
symbols_in_formula f ⊆ {s : L.symbols | p s} →
(f' : preformula (filter_symbols p) l) ×' (filter_symbols_Lhom p).on_formula f' = f
Equations
- One or more equations did not get rendered due to their size.
- Flypitch.fol.Lhom.find_formula_filter_symbols p Flypitch.fol.preformula.falsum x_3 = ⟨⊥, ⋯⟩
- Flypitch.fol.Lhom.find_formula_filter_symbols p (Flypitch.fol.preformula.rel R) h = ⟨Flypitch.fol.preformula.rel ⟨R, ⋯⟩, ⋯⟩
Instances For
@[simp]
theorem
Flypitch.fol.Lhom.on_term_inj
{L L' : Language}
{ϕ : L →ᴸ L'}
(h : ϕ.is_injective)
{l : ℕ}
:
theorem
Flypitch.fol.Lhom.on_formula_inj
{L L' : Language}
{ϕ : L →ᴸ L'}
(h : ϕ.is_injective)
{l : ℕ}
:
theorem
Flypitch.fol.Lhom.on_bounded_term_inj
{L L' : Language}
{ϕ : L →ᴸ L'}
(h : ϕ.is_injective)
{n l : ℕ}
:
theorem
Flypitch.fol.Lhom.on_bounded_formula_inj
{L L' : Language}
{ϕ : L →ᴸ L'}
(h : ϕ.is_injective)
{n l : ℕ}
:
theorem
Flypitch.fol.Lhom.reduct_formula_iff
{L L' : Language}
(ϕ : L →ᴸ L')
{M : Structure L'}
{l : ℕ}
(v : ℕ → M.carrier)
(f : preformula L l)
(xs : dvector M.carrier l)
:
theorem
Flypitch.fol.Lhom.reduct_realize_sentence
{L L' : Language}
(ϕ : L →ᴸ L')
{M : Structure L'}
{f : sentence L}
:
theorem
Flypitch.fol.Lhom.reduct_all_realize_sentence
{L L' : Language}
(ϕ : L →ᴸ L')
{M : Structure L'}
{T : Theory L}
(h : all_realize_sentence M (ϕ.Theory_induced T))
:
all_realize_sentence (ϕ.reduct M) T
noncomputable def
Flypitch.fol.Lhom.reflect_term
{L L' : Language}
(ϕ : L →ᴸ L')
[hdec : ϕ.has_decidable_range]
(t : term L')
(m : ℕ)
:
term L
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
Flypitch.fol.Lhom.reflect_term_apps_pos
{L L' : Language}
(ϕ : L →ᴸ L')
[ϕ.has_decidable_range]
{l : ℕ}
{f : L'.functions l}
(hf : f ∈ Set.range ϕ.on_function)
(ts : dvector (term L') l)
(m : ℕ)
:
ϕ.reflect_term (apps (preterm.func f) ts) m = apps (preterm.func (Classical.choose hf)) (dvector.map (fun (t : term L') => ϕ.reflect_term t m) ts)
theorem
Flypitch.fol.Lhom.reflect_term_apps_neg
{L L' : Language}
(ϕ : L →ᴸ L')
[ϕ.has_decidable_range]
{l : ℕ}
{f : L'.functions l}
(hf : f ∉ Set.range ϕ.on_function)
(ts : dvector (term L') l)
(m : ℕ)
:
theorem
Flypitch.fol.Lhom.reflect_term_const_pos
{L L' : Language}
(ϕ : L →ᴸ L')
[ϕ.has_decidable_range]
{c : L'.constants}
(hf : c ∈ Set.range ϕ.on_function)
(m : ℕ)
:
theorem
Flypitch.fol.Lhom.reflect_term_const_neg
{L L' : Language}
(ϕ : L →ᴸ L')
[ϕ.has_decidable_range]
{c : L'.constants}
(hf : c ∉ Set.range ϕ.on_function)
(m : ℕ)
:
@[simp]
theorem
Flypitch.fol.Lhom.reflect_term_var
{L L' : Language}
(ϕ : L →ᴸ L')
[hdec : ϕ.has_decidable_range]
(k m : ℕ)
:
@[simp]
theorem
Flypitch.fol.Lhom.reflect_term_on_term
{L L' : Language}
(ϕ : L →ᴸ L')
[hdec : ϕ.has_decidable_range]
(hϕ : ϕ.is_injective)
(t : term L)
(m : ℕ)
:
theorem
Flypitch.fol.Lhom.reflect_term_lift_at
{L L' : Language}
(ϕ : L →ᴸ L')
[ϕ.has_decidable_range]
(hϕ : ϕ.is_injective)
{n m m' : ℕ}
(h : m ≤ m')
(t : term L')
:
theorem
Flypitch.fol.Lhom.reflect_term_lift
{L L' : Language}
(ϕ : L →ᴸ L')
[ϕ.has_decidable_range]
(hϕ : ϕ.is_injective)
{n m : ℕ}
(t : term L')
:
noncomputable def
Flypitch.fol.Lhom.reflect_formula
{L L' : Language}
(ϕ : L →ᴸ L')
[ϕ.has_decidable_range]
(f : formula L')
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
Flypitch.fol.Lhom.reflect_formula_apps_rel_pos
{L L' : Language}
(ϕ : L →ᴸ L')
[ϕ.has_decidable_range]
{l : ℕ}
{R : L'.relations l}
(hR : R ∈ Set.range ϕ.on_relation)
(ts : dvector (term L') l)
(m : ℕ)
:
ϕ.reflect_formula (apps_rel (preformula.rel R) ts) m = apps_rel (preformula.rel (Classical.choose hR)) (dvector.map (fun (t : term L') => ϕ.reflect_term t m) ts)
theorem
Flypitch.fol.Lhom.reflect_formula_apps_rel_neg
{L L' : Language}
(ϕ : L →ᴸ L')
[ϕ.has_decidable_range]
{l : ℕ}
{R : L'.relations l}
(hR : R ∉ Set.range ϕ.on_relation)
(ts : dvector (term L') l)
(m : ℕ)
:
@[simp]
theorem
Flypitch.fol.Lhom.reflect_formula_equal
{L L' : Language}
(ϕ : L →ᴸ L')
[ϕ.has_decidable_range]
(t₁ t₂ : term L')
(m : ℕ)
:
@[simp]
theorem
Flypitch.fol.Lhom.reflect_formula_imp
{L L' : Language}
(ϕ : L →ᴸ L')
[ϕ.has_decidable_range]
(f₁ f₂ : formula L')
(m : ℕ)
:
@[simp]
theorem
Flypitch.fol.Lhom.reflect_formula_all
{L L' : Language}
(ϕ : L →ᴸ L')
[ϕ.has_decidable_range]
(f : formula L')
(m : ℕ)
:
@[simp]
theorem
Flypitch.fol.Lhom.reflect_formula_on_formula
{L L' : Language}
(ϕ : L →ᴸ L')
[ϕ.has_decidable_range]
(hϕ : ϕ.is_injective)
(m : ℕ)
(f : formula L)
:
theorem
Flypitch.fol.Lhom.reflect_formula_lift_at
{L L' : Language}
(ϕ : L →ᴸ L')
[ϕ.has_decidable_range]
(hϕ : ϕ.is_injective)
{n m m' : ℕ}
(h : m ≤ m')
(f : formula L')
:
theorem
Flypitch.fol.Lhom.reflect_formula_lift
{L L' : Language}
(ϕ : L →ᴸ L')
[ϕ.has_decidable_range]
(hϕ : ϕ.is_injective)
{n m : ℕ}
(f : formula L')
:
@[simp]
theorem
Flypitch.fol.Lhom.reflect_formula_lift1
{L L' : Language}
(ϕ : L →ᴸ L')
[ϕ.has_decidable_range]
(hϕ : ϕ.is_injective)
(f : formula L')
(m : ℕ)
:
theorem
Flypitch.fol.Lhom.reflect_term_subst
{L L' : Language}
(ϕ : L →ᴸ L')
[ϕ.has_decidable_range]
(hϕ : ϕ.is_injective)
(t s : term L')
(n m : ℕ)
:
theorem
Flypitch.fol.Lhom.reflect_formula_subst
{L L' : Language}
(ϕ : L →ᴸ L')
[ϕ.has_decidable_range]
(hϕ : ϕ.is_injective)
(f : formula L')
(t : term L')
(n m : ℕ)
:
ϕ.reflect_formula (subst_formula f t n) (m + n) = subst_formula (ϕ.reflect_formula f (m + n + 1)) (ϕ.reflect_term t m) n
@[simp]
theorem
Flypitch.fol.Lhom.reflect_formula_subst0
{L L' : Language}
(ϕ : L →ᴸ L')
[ϕ.has_decidable_range]
(hϕ : ϕ.is_injective)
(f : formula L')
(t : term L')
(m : ℕ)
:
ϕ.reflect_formula (subst_formula f t 0) m = subst_formula (ϕ.reflect_formula f (m + 1)) (ϕ.reflect_term t m) 0
noncomputable def
Flypitch.fol.Lhom.reflect_prf_gen
{L L' : Language}
(ϕ : L →ᴸ L')
[ϕ.has_decidable_range]
(hϕ : ϕ.is_injective)
{Γ : Set (formula L')}
{f : formula L'}
(m : ℕ)
(h : Γ ⊢ f)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
noncomputable def
Flypitch.fol.Lhom.reflect_prf
{L L' : Language}
(ϕ : L →ᴸ L')
[ϕ.has_decidable_range]
(hϕ : ϕ.is_injective)
{Γ : Set (formula L)}
{f : formula L}
(h : ϕ.on_formula '' Γ ⊢ ϕ.on_formula f)
:
Equations
- ϕ.reflect_prf hϕ h = Flypitch.fol.reflect_prf_lift1 (cast ⋯ (ϕ.reflect_prf_gen hϕ 0 h))
Instances For
noncomputable def
Flypitch.fol.Lhom.reflect_sprf
{L L' : Language}
(ϕ : L →ᴸ L')
[ϕ.has_decidable_range]
(hϕ : ϕ.is_injective)
{T : Theory L}
{f : sentence L}
(h : ϕ.Theory_induced T ⊢ ϕ.on_sentence f)
:
Equations
- ϕ.reflect_sprf hϕ h = id (ϕ.reflect_prf hϕ (⋯.mp h))
Instances For
theorem
Flypitch.fol.Lhom.is_consistent_Theory_induced
{L L' : Language}
(ϕ : L →ᴸ L')
[ϕ.has_decidable_range]
(hϕ : ϕ.is_injective)
{T : Theory L}
(hT : is_consistent T)
:
is_consistent (ϕ.Theory_induced T)
def
Flypitch.fol.Lhom.boundedFormulaSubstSentence
{L : Language}
(f : bounded_formula L 1)
(t : closed_term L)
:
sentence L
A bounded formula instantiated at a closed term, repackaged as a sentence.
Equations
Instances For
noncomputable def
Flypitch.fol.Lhom.generalize_constant
{L : Language}
{Γ : Set (formula L)}
(c : L.constants)
(hΓ : Sum.inl ⟨0, c⟩ ∉ ⋃₀ (symbols_in_formula '' Γ))
{f : formula L}
(hf : Sum.inl ⟨0, c⟩ ∉ symbols_in_formula f)
(H : Γ ⊢ subst_formula f (preterm.func c) 0)
:
Generalize away a fresh constant appearing only as the witness in a derivation.
Equations
- One or more equations did not get rendered due to their size.
Instances For
noncomputable def
Flypitch.fol.Lhom.sgeneralize_constant
{L : Language}
{T : Theory L}
(c : L.constants)
(hΓ : Sum.inl ⟨0, c⟩ ∉ ⋃₀ (symbols_in_formula '' T.fst))
{f : bounded_formula L 1}
(hf : Sum.inl ⟨0, c⟩ ∉ symbols_in_formula (bounded_preformula.fst f))
(H : T ⊢ boundedFormulaSubstSentence f (bd_const c))
:
Sentence-level specialization of generalize_constant for bounded formulas.
Equations
- Flypitch.fol.Lhom.sgeneralize_constant c hΓ hf H = id (Flypitch.fol.Lhom.generalize_constant c hΓ hf (id H))