mathlib documentation

model_theory.terms_and_formulas

Basics on First-Order Structures #

This file defines first-order languages and structures in the style of the Flypitch project.

Main Definitions #

References #

For the Flypitch project:

inductive first_order.language.term (L : first_order.language) (α : Type) :
Type u

A term on α is either a variable indexed by an element of α or a function symbol applied to simpler terms.

@[simp]
def first_order.language.term.relabel {L : first_order.language} {α β : Type} (g : α → β) :
L.term αL.term β

Relabels a term's variables along a particular function.

Equations
@[simp]
def first_order.language.realize_term {L : first_order.language} {M : Type u_1} [L.Structure M] {α : Type} (v : α → M) (t : L.term α) :
M

A term t with variables indexed by α can be evaluated by giving a value to each variable.

Equations
@[simp]
theorem first_order.language.realize_term_relabel {L : first_order.language} {M : Type u_1} [L.Structure M] {α β : Type} (g : α → β) (v : β → M) (t : L.term α) :
@[simp]
theorem first_order.language.hom.realize_term {L : first_order.language} {M : Type u_1} {N : Type u_2} [L.Structure M] [L.Structure N] {α : Type} (v : α → M) (t : L.term α) (g : L.hom M N) :
@[simp]
theorem first_order.language.embedding.realize_term {L : first_order.language} {M : Type u_1} {N : Type u_2} [L.Structure M] [L.Structure N] {α : Type} (v : α → M) (t : L.term α) (g : L.embedding M N) :
@[simp]
theorem first_order.language.equiv.realize_term {L : first_order.language} {M : Type u_1} {N : Type u_2} [L.Structure M] [L.Structure N] {α : Type} (v : α → M) (t : L.term α) (g : L.equiv M N) :
inductive first_order.language.bounded_formula (L : first_order.language) (α : Type) :
Type (max u v)

bounded_formula α n is the type of formulas with free variables indexed by α and up to n additional free variables.

def first_order.language.formula (L : first_order.language) (α : Type) :
Type (max u v)

formula α is the type of formulas with all free variables indexed by α.

Equations

A sentence is a formula with no free variables.

Equations

A theory is a set of sentences.

Equations
def first_order.language.bd_not {L : first_order.language} {α : Type} {n : } (φ : L.bounded_formula α n) :

The negation of a bounded formula is also a bounded formula.

Equations
@[protected, instance]
@[simp]
def first_order.language.realize_formula {L : first_order.language} (M : Type u_1) [L.Structure M] {α : Type} (f : L.formula α) (v : α → M) :
Prop

A bounded formula can be evaluated as true or false by giving values to each free variable.

Equations
def first_order.language.realize_sentence {L : first_order.language} (M : Type u_1) [L.Structure M] (φ : L.sentence) :
Prop

A sentence can be evaluated as true or false in a structure.

Equations
@[simp]
@[simp]
theorem first_order.language.equiv.realize_bounded_formula {L : first_order.language} {M : Type u_1} {N : Type u_2} [L.Structure M] [L.Structure N] {α : Type} {n : } (v : α → M) (xs : fin n → M) (φ : L.bounded_formula α n) (g : L.equiv M N) :
@[simp]
theorem first_order.language.realize_formula_equiv {L : first_order.language} {M : Type u_1} {N : Type u_2} [L.Structure M] [L.Structure N] {α : Type} (v : α → M) (φ : L.formula α) (g : L.equiv M N) :