Kripke semantics
Modal
InductiveModal formulas#✓fully proved
For a type \(\alpha\) of atoms, the formulas of basic modal logic over \(\alpha\) are generated as follows: every atom \(p \in \alpha\) is a formula; falsity \(\bot\) is a formula; if \(\varphi\) and \(\psi\) are formulas then so is the implication \(\varphi \to \psi\); and if \(\varphi\) is a formula then so is the necessity formula \(\Box\varphi\).
inductive Formula (α : Type u) : Type u where
| atom : α → Formula α
| bot : Formula α
| imp : Formula α → Formula α → Formula α
| box : Formula α → Formula α
deriving DecidableEq, Repr
Used by 148
Formula
DefinitionNegation of modal formulas#✓fully proved
The negation of a modal formula \(\varphi\) is the formula \(\neg\varphi := \varphi \to \bot\).
def neg (phi : Formula Atom) : Formula Atom := .imp phi .bot
inductive Formula (α : Type u) : Type u where
| atom : α → Formula α
| bot : Formula α
| imp : Formula α → Formula α → Formula α
| box : Formula α → Formula α
deriving DecidableEq, Repr
CSLibExt/Logics/Modal/Kripke.lean:34
Uses 1 · Used by 23
DefinitionThe possibility operator#✓fully proved
For a modal formula \(\varphi\), the formula \(\Diamond\varphi\) ("possibly \(\varphi\)") is \(\neg\Box\neg\varphi\), where \(\neg\chi\) stands for \(\chi \to \bot\).
def dia (phi : Formula Atom) : Formula Atom := neg (.box (neg phi))
inductive Formula (α : Type u) : Type u where
| atom : α → Formula α
| bot : Formula α
| imp : Formula α → Formula α → Formula α
| box : Formula α → Formula α
deriving DecidableEq, Repr
CSLibExt/Logics/Modal/Kripke.lean:34
def neg (phi : Formula Atom) : Formula Atom := .imp phi .bot
CSLibExt/Logics/Modal/Kripke.lean:46
Uses 2 · Used by 14
DefinitionThe truth constant#✓fully proved
The formula \(\top\) is the negation \(\neg\bot\) of falsity, that is, the implication \(\bot \to \bot\).
def top : Formula Atom := neg .bot
inductive Formula (α : Type u) : Type u where
| atom : α → Formula α
| bot : Formula α
| imp : Formula α → Formula α → Formula α
| box : Formula α → Formula α
deriving DecidableEq, Repr
CSLibExt/Logics/Modal/Kripke.lean:34
def neg (phi : Formula Atom) : Formula Atom := .imp phi .bot
CSLibExt/Logics/Modal/Kripke.lean:46
Uses 2
DefinitionConjunction#✓fully proved
For modal formulas \(\varphi\) and \(\psi\), the conjunction \(\varphi \wedge \psi\) is the formula \(\neg(\varphi \to \neg\psi)\), where \(\neg\chi\) stands for \(\chi \to \bot\).
def and (phi psi : Formula Atom) : Formula Atom := neg (.imp phi (neg psi))
inductive Formula (α : Type u) : Type u where
| atom : α → Formula α
| bot : Formula α
| imp : Formula α → Formula α → Formula α
| box : Formula α → Formula α
deriving DecidableEq, Repr
CSLibExt/Logics/Modal/Kripke.lean:34
def neg (phi : Formula Atom) : Formula Atom := .imp phi .bot
CSLibExt/Logics/Modal/Kripke.lean:46
Uses 2 · Used by 2
DefinitionDisjunction of modal formulas#✓fully proved
The disjunction of modal formulas \(\varphi\) and \(\psi\) is the formula \(\varphi \lor \psi := \neg\varphi \to \psi\), where \(\neg\varphi\) is \(\varphi \to \bot\).
def or (phi psi : Formula Atom) : Formula Atom := .imp (neg phi) psi
inductive Formula (α : Type u) : Type u where
| atom : α → Formula α
| bot : Formula α
| imp : Formula α → Formula α → Formula α
| box : Formula α → Formula α
deriving DecidableEq, Repr
CSLibExt/Logics/Modal/Kripke.lean:34
def neg (phi : Formula Atom) : Formula Atom := .imp phi .bot
CSLibExt/Logics/Modal/Kripke.lean:46
Uses 2 · Used by 4
DefinitionAxiom K#✓fully proved
For modal formulas \(\varphi\) and \(\psi\), the distribution axiom K is the formula \(\Box(\varphi \to \psi) \to (\Box\varphi \to \Box\psi)\).
def axiomK (phi psi : Formula Atom) : Formula Atom :=
.imp (.box (.imp phi psi)) (.imp (.box phi) (.box psi))
inductive Formula (α : Type u) : Type u where
| atom : α → Formula α
| bot : Formula α
| imp : Formula α → Formula α → Formula α
| box : Formula α → Formula α
deriving DecidableEq, Repr
CSLibExt/Logics/Modal/Kripke.lean:34
DefinitionAxiom T#✓fully proved
For a modal formula \(\varphi\), the reflexivity axiom T is the formula \(\Box\varphi \to \varphi\).
def axiomT (phi : Formula Atom) : Formula Atom := .imp (.box phi) phi
inductive Formula (α : Type u) : Type u where
| atom : α → Formula α
| bot : Formula α
| imp : Formula α → Formula α → Formula α
| box : Formula α → Formula α
deriving DecidableEq, Repr
CSLibExt/Logics/Modal/Kripke.lean:34
Uses 1 · Used by 19
DefinitionAxiom 4#✓fully proved
For a modal formula \(\varphi\), the transitivity axiom 4 is the formula \(\Box\varphi \to \Box\Box\varphi\).
def axiomFour (phi : Formula Atom) : Formula Atom := .imp (.box phi) (.box (.box phi))
inductive Formula (α : Type u) : Type u where
| atom : α → Formula α
| bot : Formula α
| imp : Formula α → Formula α → Formula α
| box : Formula α → Formula α
deriving DecidableEq, Repr
CSLibExt/Logics/Modal/Kripke.lean:34
Uses 1 · Used by 7
DefinitionAxiom D#✓fully proved
For a modal formula \(\varphi\), the seriality axiom D is the formula \(\Box\varphi \to \Diamond\varphi\), where \(\Diamond\psi\) is \(\neg\Box\neg\psi\) and \(\neg\chi\) stands for \(\chi \to \bot\).
def axiomD (phi : Formula Atom) : Formula Atom := .imp (.box phi) (dia phi)
inductive Formula (α : Type u) : Type u where
| atom : α → Formula α
| bot : Formula α
| imp : Formula α → Formula α → Formula α
| box : Formula α → Formula α
deriving DecidableEq, Repr
CSLibExt/Logics/Modal/Kripke.lean:34
def dia (phi : Formula Atom) : Formula Atom := neg (.box (neg phi))
CSLibExt/Logics/Modal/Kripke.lean:49
Uses 2 · Used by 1
DefinitionAxiom B#✓fully proved
For a modal formula \(\varphi\), the symmetry axiom B is the formula \(\varphi \to \Box\Diamond\varphi\), where \(\Diamond\psi\) is \(\neg\Box\neg\psi\) and \(\neg\chi\) stands for \(\chi \to \bot\).
def axiomB (phi : Formula Atom) : Formula Atom := .imp phi (.box (dia phi))
inductive Formula (α : Type u) : Type u where
| atom : α → Formula α
| bot : Formula α
| imp : Formula α → Formula α → Formula α
| box : Formula α → Formula α
deriving DecidableEq, Repr
CSLibExt/Logics/Modal/Kripke.lean:34
def dia (phi : Formula Atom) : Formula Atom := neg (.box (neg phi))
CSLibExt/Logics/Modal/Kripke.lean:49
Uses 2 · Used by 2
DefinitionAxiom 5#✓fully proved
For a modal formula \(\varphi\), the euclidean axiom 5 is the formula \(\Diamond\varphi \to \Box\Diamond\varphi\), where \(\Diamond\psi\) is \(\neg\Box\neg\psi\) and \(\neg\chi\) stands for \(\chi \to \bot\).
def axiomFive (phi : Formula Atom) : Formula Atom := .imp (dia phi) (.box (dia phi))
inductive Formula (α : Type u) : Type u where
| atom : α → Formula α
| bot : Formula α
| imp : Formula α → Formula α → Formula α
| box : Formula α → Formula α
deriving DecidableEq, Repr
CSLibExt/Logics/Modal/Kripke.lean:34
def dia (phi : Formula Atom) : Formula Atom := neg (.box (neg phi))
CSLibExt/Logics/Modal/Kripke.lean:49
Uses 2 · Used by 7
Modal
StructureKripke model#✓fully proved
A Kripke model consists of a nonempty collection of worlds, an accessibility relation, and an atom valuation.
structure KripkeModel (World : Type u) (Atom : Type v) where
/-- There is at least one world. -/
nonempty_world : Nonempty World
/-- The accessibility relation. -/
rel : World → World → Prop
/-- The atoms true at each world. -/
valuation : World → Atom → Prop
Used by 162
Kripke Model
DefinitionSatisfaction in a Kripke model#✓fully proved
Let \(M\) be a Kripke model with accessibility relation \(R\). Satisfaction of a modal formula at a world \(w\) of \(M\) is defined by recursion on the formula: \(w\) satisfies an atom \(p\) if and only if the valuation of \(M\) makes \(p\) true at \(w\); \(w\) never satisfies \(\bot\); \(w\) satisfies \(\varphi \to \psi\) if and only if \(w\) satisfies \(\psi\) whenever it satisfies \(\varphi\); and \(w\) satisfies \(\Box\varphi\) if and only if every world \(v\) with \(w \mathrel{R} v\) satisfies \(\varphi\).
def Satisfies (model : KripkeModel World Atom) (world : World) : Formula Atom → Prop
| .atom atom => model.valuation world atom
| .bot => False
| .imp phi psi => Satisfies model world phi → Satisfies model world psi
| .box phi => ∀ next, model.rel world next → Satisfies model next phi
structure KripkeModel (World : Type u) (Atom : Type v) where
/-- There is at least one world. -/
nonempty_world : Nonempty World
/-- The accessibility relation. -/
rel : World → World → Prop
/-- The atoms true at each world. -/
valuation : World → Atom → Prop
CSLibExt/Logics/Modal/Kripke.lean:83
inductive Formula (α : Type u) : Type u where
| atom : α → Formula α
| bot : Formula α
| imp : Formula α → Formula α → Formula α
| box : Formula α → Formula α
deriving DecidableEq, Repr
CSLibExt/Logics/Modal/Kripke.lean:34
Uses 2 · Used by 63
DefinitionGlobal validity in a Kripke model#✓fully proved
A formula \(\varphi\) is globally valid in a Kripke model \(M\) when \(\varphi\) is satisfied at every world of \(M\).
def Valid (model : KripkeModel World Atom) (phi : Formula Atom) : Prop :=
∀ world, model.Satisfies world phi
structure KripkeModel (World : Type u) (Atom : Type v) where
/-- There is at least one world. -/
nonempty_world : Nonempty World
/-- The accessibility relation. -/
rel : World → World → Prop
/-- The atoms true at each world. -/
valuation : World → Atom → Prop
CSLibExt/Logics/Modal/Kripke.lean:83
inductive Formula (α : Type u) : Type u where
| atom : α → Formula α
| bot : Formula α
| imp : Formula α → Formula α → Formula α
| box : Formula α → Formula α
deriving DecidableEq, Repr
CSLibExt/Logics/Modal/Kripke.lean:34
Uses 3 · Used by 36
TheoremFalsity is valid in no Kripke model#✓fully proved
For every Kripke model \(M\), the formula \(\bot\) is not valid in \(M\): since \(M\) has at least one world and no world satisfies \(\bot\), some world of \(M\) fails to satisfy \(\bot\).
@[simp] theorem not_valid_bot (model : KripkeModel World Atom) :
¬model.Valid (.bot : Formula Atom)
structure KripkeModel (World : Type u) (Atom : Type v) where
/-- There is at least one world. -/
nonempty_world : Nonempty World
/-- The accessibility relation. -/
rel : World → World → Prop
/-- The atoms true at each world. -/
valuation : World → Atom → Prop
CSLibExt/Logics/Modal/Kripke.lean:83
inductive Formula (α : Type u) : Type u where
| atom : α → Formula α
| bot : Formula α
| imp : Formula α → Formula α → Formula α
| box : Formula α → Formula α
deriving DecidableEq, Repr
CSLibExt/Logics/Modal/Kripke.lean:34
Uses 4
TheoremSemantics of possibility#✓fully proved
Let \(M\) be a Kripke model with accessibility relation \(R\), and let \(\Diamond\varphi\) denote the formula \(\neg\Box\neg\varphi\), where \(\neg\chi\) is \(\chi \to \bot\). For every world \(w\) and modal formula \(\varphi\), \(w\) satisfies \(\Diamond\varphi\) in \(M\) if and only if there is a world \(v\) with \(w \mathrel{R} v\) such that \(v\) satisfies \(\varphi\) in \(M\).
theorem satisfies_dia (model : KripkeModel World Atom) (world : World)
(phi : Formula Atom) :
model.Satisfies world phi.dia ↔
∃ next, model.rel world next ∧ model.Satisfies next phi
structure KripkeModel (World : Type u) (Atom : Type v) where
/-- There is at least one world. -/
nonempty_world : Nonempty World
/-- The accessibility relation. -/
rel : World → World → Prop
/-- The atoms true at each world. -/
valuation : World → Atom → Prop
CSLibExt/Logics/Modal/Kripke.lean:83
inductive Formula (α : Type u) : Type u where
| atom : α → Formula α
| bot : Formula α
| imp : Formula α → Formula α → Formula α
| box : Formula α → Formula α
deriving DecidableEq, Repr
CSLibExt/Logics/Modal/Kripke.lean:34
Uses 4 · Used by 4
TheoremValidity of axiom K on Kripke models#✓fully proved
The K axiom is valid on every Kripke model.
theorem valid_axiomK (model : KripkeModel World Atom) (phi psi : Formula Atom) :
model.Valid (Formula.axiomK phi psi)
structure KripkeModel (World : Type u) (Atom : Type v) where
/-- There is at least one world. -/
nonempty_world : Nonempty World
/-- The accessibility relation. -/
rel : World → World → Prop
/-- The atoms true at each world. -/
valuation : World → Atom → Prop
CSLibExt/Logics/Modal/Kripke.lean:83
inductive Formula (α : Type u) : Type u where
| atom : α → Formula α
| bot : Formula α
| imp : Formula α → Formula α → Formula α
| box : Formula α → Formula α
deriving DecidableEq, Repr
CSLibExt/Logics/Modal/Kripke.lean:34
def axiomK (phi psi : Formula Atom) : Formula Atom :=
.imp (.box (.imp phi psi)) (.imp (.box phi) (.box psi))
CSLibExt/Logics/Modal/Kripke.lean:61
Uses 5 · Used by 1
TheoremAxiom T is valid on reflexive Kripke models#✓fully proved
Let \(M\) be a Kripke model whose accessibility relation \(R\) is reflexive: \(R\,w\,w\) for every world \(w\). Then for every formula \(\varphi\) the T axiom \(\Box\varphi \to \varphi\) is globally valid in \(M\).
theorem valid_axiomT (model : KripkeModel World Atom)
(reflexive : ∀ world, model.rel world world) (phi : Formula Atom) :
model.Valid (Formula.axiomT phi)
structure KripkeModel (World : Type u) (Atom : Type v) where
/-- There is at least one world. -/
nonempty_world : Nonempty World
/-- The accessibility relation. -/
rel : World → World → Prop
/-- The atoms true at each world. -/
valuation : World → Atom → Prop
CSLibExt/Logics/Modal/Kripke.lean:83
inductive Formula (α : Type u) : Type u where
| atom : α → Formula α
| bot : Formula α
| imp : Formula α → Formula α → Formula α
| box : Formula α → Formula α
deriving DecidableEq, Repr
CSLibExt/Logics/Modal/Kripke.lean:34
def axiomT (phi : Formula Atom) : Formula Atom := .imp (.box phi) phi
CSLibExt/Logics/Modal/Kripke.lean:65
Uses 5 · Used by 6
TheoremAxiom 4 is valid on transitive Kripke models#✓fully proved
Let \(M\) be a Kripke model whose accessibility relation \(R\) is transitive: \(R\,u\,v\) and \(R\,v\,w\) imply \(R\,u\,w\) for all worlds \(u, v, w\). Then for every formula \(\varphi\) the 4 axiom \(\Box\varphi \to \Box\Box\varphi\) is globally valid in \(M\).
theorem valid_axiomFour (model : KripkeModel World Atom)
(transitive : ∀ {first second third},
model.rel first second → model.rel second third → model.rel first third)
(phi : Formula Atom) : model.Valid (Formula.axiomFour phi)
structure KripkeModel (World : Type u) (Atom : Type v) where
/-- There is at least one world. -/
nonempty_world : Nonempty World
/-- The accessibility relation. -/
rel : World → World → Prop
/-- The atoms true at each world. -/
valuation : World → Atom → Prop
CSLibExt/Logics/Modal/Kripke.lean:83
inductive Formula (α : Type u) : Type u where
| atom : α → Formula α
| bot : Formula α
| imp : Formula α → Formula α → Formula α
| box : Formula α → Formula α
deriving DecidableEq, Repr
CSLibExt/Logics/Modal/Kripke.lean:34
def axiomFour (phi : Formula Atom) : Formula Atom := .imp (.box phi) (.box (.box phi))
CSLibExt/Logics/Modal/Kripke.lean:68
Uses 5 · Used by 2
TheoremAxiom D is valid on serial Kripke models#✓fully proved
Let \(M\) be a Kripke model whose accessibility relation \(R\) is serial: every world \(w\) has some world \(v\) with \(R\,w\,v\). Then for every formula \(\varphi\) the D axiom \(\Box\varphi \to \Diamond\varphi\), where \(\Diamond\varphi\) abbreviates \(\neg\Box\neg\varphi\), is globally valid in \(M\).
theorem valid_axiomD (model : KripkeModel World Atom)
(serial : ∀ world, ∃ next, model.rel world next) (phi : Formula Atom) :
model.Valid (Formula.axiomD phi)
structure KripkeModel (World : Type u) (Atom : Type v) where
/-- There is at least one world. -/
nonempty_world : Nonempty World
/-- The accessibility relation. -/
rel : World → World → Prop
/-- The atoms true at each world. -/
valuation : World → Atom → Prop
CSLibExt/Logics/Modal/Kripke.lean:83
inductive Formula (α : Type u) : Type u where
| atom : α → Formula α
| bot : Formula α
| imp : Formula α → Formula α → Formula α
| box : Formula α → Formula α
deriving DecidableEq, Repr
CSLibExt/Logics/Modal/Kripke.lean:34
def axiomD (phi : Formula Atom) : Formula Atom := .imp (.box phi) (dia phi)
CSLibExt/Logics/Modal/Kripke.lean:71
Uses 7
TheoremAxiom B is valid on symmetric Kripke models#✓fully proved
Let \(M\) be a Kripke model whose accessibility relation \(R\) is symmetric: \(R\,u\,v\) implies \(R\,v\,u\) for all worlds \(u, v\). Then for every formula \(\varphi\) the B axiom \(\varphi \to \Box\Diamond\varphi\), where \(\Diamond\varphi\) abbreviates \(\neg\Box\neg\varphi\), is globally valid in \(M\).
theorem valid_axiomB (model : KripkeModel World Atom)
(symmetric : ∀ {first second}, model.rel first second → model.rel second first)
(phi : Formula Atom) : model.Valid (Formula.axiomB phi)
structure KripkeModel (World : Type u) (Atom : Type v) where
/-- There is at least one world. -/
nonempty_world : Nonempty World
/-- The accessibility relation. -/
rel : World → World → Prop
/-- The atoms true at each world. -/
valuation : World → Atom → Prop
CSLibExt/Logics/Modal/Kripke.lean:83
inductive Formula (α : Type u) : Type u where
| atom : α → Formula α
| bot : Formula α
| imp : Formula α → Formula α → Formula α
| box : Formula α → Formula α
deriving DecidableEq, Repr
CSLibExt/Logics/Modal/Kripke.lean:34
def axiomB (phi : Formula Atom) : Formula Atom := .imp phi (.box (dia phi))
CSLibExt/Logics/Modal/Kripke.lean:74
Uses 7
TheoremAxiom 5 is valid on euclidean Kripke models#✓fully proved
Let \(M\) be a Kripke model whose accessibility relation \(R\) is euclidean: \(R\,u\,v\) and \(R\,u\,w\) imply \(R\,v\,w\) for all worlds \(u, v, w\). Then for every formula \(\varphi\) the 5 axiom \(\Diamond\varphi \to \Box\Diamond\varphi\), where \(\Diamond\varphi\) abbreviates \(\neg\Box\neg\varphi\), is globally valid in \(M\).
theorem valid_axiomFive (model : KripkeModel World Atom)
(euclidean : ∀ {first second third}, model.rel first second → model.rel first third →
model.rel second third)
(phi : Formula Atom) : model.Valid (Formula.axiomFive phi)
structure KripkeModel (World : Type u) (Atom : Type v) where
/-- There is at least one world. -/
nonempty_world : Nonempty World
/-- The accessibility relation. -/
rel : World → World → Prop
/-- The atoms true at each world. -/
valuation : World → Atom → Prop
CSLibExt/Logics/Modal/Kripke.lean:83
inductive Formula (α : Type u) : Type u where
| atom : α → Formula α
| bot : Formula α
| imp : Formula α → Formula α → Formula α
| box : Formula α → Formula α
deriving DecidableEq, Repr
CSLibExt/Logics/Modal/Kripke.lean:34
def axiomFive (phi : Formula Atom) : Formula Atom := .imp (dia phi) (.box (dia phi))
CSLibExt/Logics/Modal/Kripke.lean:77
Uses 7 · Used by 2
Modal
StructureBounded morphism#✓fully proved
Let \(M\) and \(N\) be Kripke models over the same atoms, with sets of worlds \(W\) and \(V\) and accessibility relations \(R_M\) and \(R_N\). A bounded morphism from \(M\) to \(N\) is a map \(f : W \to V\) such that every atom holds at a world \(w\) in \(M\) if and only if it holds at \(f(w)\) in \(N\); whenever \(w \mathrel{R_M} w'\), also \(f(w) \mathrel{R_N} f(w')\) (forth); and whenever \(f(w) \mathrel{R_N} v'\), there is a world \(w'\) with \(w \mathrel{R_M} w'\) and \(f(w') = v'\) (back).
Bounded morphisms are also called p-morphisms.
structure BoundedMorphism (source : KripkeModel W Atom) (target : KripkeModel V Atom) where
/-- The underlying map on worlds. -/
toFun : W → V
atom_iff : ∀ world atom,
source.valuation world atom ↔ target.valuation (toFun world) atom
forth : ∀ {world next}, source.rel world next → target.rel (toFun world) (toFun next)
back : ∀ {world imageNext}, target.rel (toFun world) imageNext →
∃ next, source.rel world next ∧ toFun next = imageNext
structure KripkeModel (World : Type u) (Atom : Type v) where
/-- There is at least one world. -/
nonempty_world : Nonempty World
/-- The accessibility relation. -/
rel : World → World → Prop
/-- The atoms true at each world. -/
valuation : World → Atom → Prop
CSLibExt/Logics/Modal/Kripke.lean:83
toFun : W → V
CSLibExt/Logics/Modal/Kripke.lean:236
Bounded Morphism
TheoremExtensionality for bounded morphisms#✓fully proved
Two bounded morphisms \(f\) and \(g\) between the same Kripke models are equal if \(f(w) = g(w)\) for every world \(w\).
@[ext]
theorem ext (first second : BoundedMorphism source middle)
(maps_eq : ∀ world, first world = second world) : first = second
structure BoundedMorphism (source : KripkeModel W Atom) (target : KripkeModel V Atom) where
/-- The underlying map on worlds. -/
toFun : W → V
atom_iff : ∀ world atom,
source.valuation world atom ↔ target.valuation (toFun world) atom
forth : ∀ {world next}, source.rel world next → target.rel (toFun world) (toFun next)
back : ∀ {world imageNext}, target.rel (toFun world) imageNext →
∃ next, source.rel world next ∧ toFun next = imageNext
CSLibExt/Logics/Modal/Kripke.lean:234
Uses 2
DefinitionIdentity bounded morphism#✓fully proved
For every Kripke model \(M\), the identity map on the worlds of \(M\) is a bounded morphism from \(M\) to itself.
def id (model : KripkeModel W Atom) : BoundedMorphism model model where
toFun := _root_.id
atom_iff := by simp
forth := fun h => h
back := by
intro world next h
exact ⟨next, h, rfl⟩
structure KripkeModel (World : Type u) (Atom : Type v) where
/-- There is at least one world. -/
nonempty_world : Nonempty World
/-- The accessibility relation. -/
rel : World → World → Prop
/-- The atoms true at each world. -/
valuation : World → Atom → Prop
CSLibExt/Logics/Modal/Kripke.lean:83
structure BoundedMorphism (source : KripkeModel W Atom) (target : KripkeModel V Atom) where
/-- The underlying map on worlds. -/
toFun : W → V
atom_iff : ∀ world atom,
source.valuation world atom ↔ target.valuation (toFun world) atom
forth : ∀ {world next}, source.rel world next → target.rel (toFun world) (toFun next)
back : ∀ {world imageNext}, target.rel (toFun world) imageNext →
∃ next, source.rel world next ∧ toFun next = imageNext
CSLibExt/Logics/Modal/Kripke.lean:234
Uses 2
DefinitionComposition of bounded morphisms#✓fully proved
Let \(M_1\), \(M_2\), \(M_3\) be Kripke models over the same atoms. If \(f\) is a bounded morphism from \(M_1\) to \(M_2\) and \(g\) is a bounded morphism from \(M_2\) to \(M_3\), then the composite map \(g \circ f\) on worlds is a bounded morphism from \(M_1\) to \(M_3\).
def comp (second : BoundedMorphism middle target)
(first : BoundedMorphism source middle) : BoundedMorphism source target where
toFun := second ∘ first
atom_iff := by
intro world atom
exact (first.atom_iff world atom).trans (second.atom_iff (first world) atom)
forth := fun h => second.forth (first.forth h)
back := by
intro world imageNext h
obtain ⟨middleNext, hMiddle, rfl⟩ := second.back h
obtain ⟨sourceNext, hSource, rfl⟩ := first.back hMiddle
exact ⟨sourceNext, hSource, rfl⟩
structure BoundedMorphism (source : KripkeModel W Atom) (target : KripkeModel V Atom) where
/-- The underlying map on worlds. -/
toFun : W → V
atom_iff : ∀ world atom,
source.valuation world atom ↔ target.valuation (toFun world) atom
forth : ∀ {world next}, source.rel world next → target.rel (toFun world) (toFun next)
back : ∀ {world imageNext}, target.rel (toFun world) imageNext →
∃ next, source.rel world next ∧ toFun next = imageNext
CSLibExt/Logics/Modal/Kripke.lean:234
Uses 2
TheoremInvariance of modal satisfaction under bounded morphisms#✓fully proved
Let \(f\) be a bounded morphism from a Kripke model \(M\) to a Kripke model \(N\) over the same atoms. Then for every modal formula \(\varphi\) and every world \(w\) of \(M\), \(w\) satisfies \(\varphi\) in \(M\) if and only if \(f(w)\) satisfies \(\varphi\) in \(N\).
theorem satisfies_iff (morphism : BoundedMorphism source middle)
(phi : Formula Atom) (world : W) :
source.Satisfies world phi ↔ middle.Satisfies (morphism world) phi
structure BoundedMorphism (source : KripkeModel W Atom) (target : KripkeModel V Atom) where
/-- The underlying map on worlds. -/
toFun : W → V
atom_iff : ∀ world atom,
source.valuation world atom ↔ target.valuation (toFun world) atom
forth : ∀ {world next}, source.rel world next → target.rel (toFun world) (toFun next)
back : ∀ {world imageNext}, target.rel (toFun world) imageNext →
∃ next, source.rel world next ∧ toFun next = imageNext
CSLibExt/Logics/Modal/Kripke.lean:234
inductive Formula (α : Type u) : Type u where
| atom : α → Formula α
| bot : Formula α
| imp : Formula α → Formula α → Formula α
| box : Formula α → Formula α
deriving DecidableEq, Repr
CSLibExt/Logics/Modal/Kripke.lean:34
Uses 4 · Used by 1
TheoremSurjective bounded morphisms preserve and reflect validity#✓fully proved
Let \(M\) and \(N\) be Kripke models over the same atoms and let \(f\) be a bounded morphism from \(M\) to \(N\) whose map on worlds is surjective. Then for every formula \(\varphi\), \(\varphi\) is globally valid in \(M\) if and only if \(\varphi\) is globally valid in \(N\).
theorem valid_iff_of_surjective (morphism : BoundedMorphism source middle)
(surjective : Function.Surjective morphism) (phi : Formula Atom) :
source.Valid phi ↔ middle.Valid phi
structure BoundedMorphism (source : KripkeModel W Atom) (target : KripkeModel V Atom) where
/-- The underlying map on worlds. -/
toFun : W → V
atom_iff : ∀ world atom,
source.valuation world atom ↔ target.valuation (toFun world) atom
forth : ∀ {world next}, source.rel world next → target.rel (toFun world) (toFun next)
back : ∀ {world imageNext}, target.rel (toFun world) imageNext →
∃ next, source.rel world next ∧ toFun next = imageNext
CSLibExt/Logics/Modal/Kripke.lean:234
inductive Formula (α : Type u) : Type u where
| atom : α → Formula α
| bot : Formula α
| imp : Formula α → Formula α → Formula α
| box : Formula α → Formula α
deriving DecidableEq, Repr
CSLibExt/Logics/Modal/Kripke.lean:34
Uses 6
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.