Sequents #
Optional loaded formulas (Olfs) #
In nodes we optionally have a negated loaded formula on the left or right.
Equations
Instances For
The vocabulary of the optional loaded formula, ignoring its side.
Equations
- PDL.Olf.voc none = ∅
- PDL.Olf.voc (some (Sum.inl nlf)) = nlf.voc
- PDL.Olf.voc (some (Sum.inr nlf)) = nlf.voc
Instances For
The subset relation on Option α from Option.instHasSubsetOption is decidable.
Equations
- PDL.Option.instDecidableSubset o1 o2 = Option.casesOn o1 (isTrue trivial) fun (a : α) => Option.casesOn o2 (isFalse ⋯) fun (b : α) => decidable_of_iff (a = b) ⋯
Instance that is used to say (O : Olf) \ (O' : Olf).
Equations
- One or more equations did not get rendered due to their size.
Use the new optional value when present, otherwise retain the old value.
Equations
- x✝.pdlOverwrite none = x✝
- x✝.pdlOverwrite (some x_3) = some x_3
Instances For
Remove the rule's required loading and install its new loading when present.
Equations
- oldO.change Ocond newO = Option.pdlOverwrite (oldO \ Ocond) newO
Instances For
Whether the optional loading is absent.
Equations
- PDL.Olf.isNone none = True
- PDL.Olf.isNone (some (Sum.inl nlf)) = False
- PDL.Olf.isNone (some (Sum.inr nlf)) = False
Instances For
Whether the optional loading belongs to the left component.
Equations
- PDL.Olf.isLeft none = False
- PDL.Olf.isLeft (some (Sum.inl nlf)) = True
- PDL.Olf.isLeft (some (Sum.inr nlf)) = False
Instances For
Whether the optional loading belongs to the right component.
Equations
- PDL.Olf.isRight none = False
- PDL.Olf.isRight (some (Sum.inl nlf)) = False
- PDL.Olf.isRight (some (Sum.inr nlf)) = True
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Sequents and their (multi)set quality #
A tableau node is labelled with two finite sets of formulas and an Olf.
Each formula is placed on the left or right and up to one formula may be loaded.
Equations
Instances For
Equations
- PDL.instReprSequent = { reprPrec := PDL.instReprSequent._aux_1 }
All ordinary formulas of a sequent, including its loading after unloading.
Equations
- PDL.Sequent.toFinset (L, R, O) = L ∪ R ∪ (Option.map (Sum.elim PDL.negUnload PDL.negUnload) O).toFinset
Instances For
Components and sides of sequents #
The optional loaded formula and its side.
Instances For
(Joint) vocabulary of sequents #
Like Olf.voc but without the ⊕ inside.
Equations
- PDL.onlfvoc none = ∅
- PDL.onlfvoc (some nlf) = nlf.voc
Instances For
The combined vocabulary of formula lists and optional loaded formulas.
Equations
- PDL.lfovoc L = L.toFinset.sup fun (x : List PDL.Formula × Option PDL.NegLoadFormula) => match x with | (fs, o) => fs.pdlFvoc ∪ PDL.onlfvoc o
Instances For
Equations
- PDL.lfovocFin L = L.sup fun (x : Finset PDL.Formula × Option PDL.NegLoadFormula) => match x with | (fs, o) => fs.pdlFvoc ∪ PDL.onlfvoc o
Instances For
Formulas as elements of sequents #
Equations
- PDL.instMembershipFormulaSequent = { mem := fun (X : PDL.Sequent) (φ : PDL.Formula) => φ ∈ X.L ∨ φ ∈ X.R }
Equations
Membership of a negated ordinary or loaded formula in a sequent.
Equations
Instances For
Equations
Closed, basic, loaded and free sequents #
A variant of Fintype.decidableExistsFintype, used by instDecidableClosed.
Equations
- PDL.Fintype.decidableExistsConjFintype = if h : ∃ (x : Subtype p), q ↑x then isTrue ⋯ else isFalse ⋯
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Semantics of sequents #
Equations
- PDL.modelCanSemImplySequent = { SemImplies := fun (x : PDL.KripkeModel W × W) (X : PDL.Sequent) => match x with | (M, w) => ∀ f ∈ X.toFinset, PDL.evaluate M w f }
Equations
- PDL.instSequentHasSat = { satisfiable := fun (Δ : PDL.Sequent) => ∃ (W : Type) (M : PDL.KripkeModel W) (w : W), PDL.vDash.SemImplies (M, w) Δ }
Removing loaded formulas from sequents #
Remove a negated formula from the ordinary components or from the optional loading.
Equations
Instances For
The component indicated by a sum constructor.
Equations
- PDL.sideOf (Sum.inl val) = PDL.Side.LL
- PDL.sideOf (Sum.inr val) = PDL.Side.RR
Instances For
Membership of a negated formula in the specified sequent component.
Equations
- (PDL.AnyNegFormula.neg (PDL.AnyFormula.normal φ)).inSide PDL.Side.LL (L, fst, snd) = (φ.neg ∈ L)
- (PDL.AnyNegFormula.neg (PDL.AnyFormula.normal φ)).inSide PDL.Side.RR (fst, R, snd) = (φ.neg ∈ R)
- (PDL.AnyNegFormula.neg (PDL.AnyFormula.loaded χ)).inSide PDL.Side.LL (fst, fst_1, O) = (O = some (Sum.inl (PDL.NegLoadFormula.neg χ)))
- (PDL.AnyNegFormula.neg (PDL.AnyFormula.loaded χ)).inSide PDL.Side.RR (fst, fst_1, O) = (O = some (Sum.inr (PDL.NegLoadFormula.neg χ)))
Instances For
Whatever formulas #
A type to describe all formulas that can occur in a sequent, without losing information about whether they are loaded or not.
Unfortunately our AnyFormula type does not include negated loaded formulas, so this is yet
another type to describe "whatever formula" can be in a sequent, without losing information.
- any : AnyFormula → WhateverFormula
- negLoad : NegLoadFormula → WhateverFormula
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- PDL.instReprWhateverFormula = { reprPrec := PDL.instReprWhateverFormula.repr }
Equations
- PDL.instDecidableEqWhateverFormula.decEq (PDL.WhateverFormula.any a) (PDL.WhateverFormula.any b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
- PDL.instDecidableEqWhateverFormula.decEq (PDL.WhateverFormula.any a) (PDL.WhateverFormula.negLoad a_1) = isFalse ⋯
- PDL.instDecidableEqWhateverFormula.decEq (PDL.WhateverFormula.negLoad a) (PDL.WhateverFormula.any a_1) = isFalse ⋯
- PDL.instDecidableEqWhateverFormula.decEq (PDL.WhateverFormula.negLoad a) (PDL.WhateverFormula.negLoad b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
Instances For
Equations
Equations
Equations
The optional loading viewed as a finset of tagged formulas.
Equations
- PDL.Olf.wForms none = ∅
- PDL.Olf.wForms (some (Sum.inl nlf)) = {PDL.WhateverFormula.negLoad nlf}
- PDL.Olf.wForms (some (Sum.inr nlf)) = {PDL.WhateverFormula.negLoad nlf}
Instances For
All ordinary and loaded formulas of a sequent, retaining their tags.
Equations
- PDL.Sequent.wForms (L, R, O) = Finset.image Coe.coe L ∪ Finset.image Coe.coe R ∪ O.wForms
Instances For
In a basic sequent all free diamonds are atomic.
In a basic sequent all loaded diamonds are atomic.
Sorting Finsets of Sequents #
Lexicographic orders on lists and pairs #
NOTE: The following two definitions and their properties are general, i.e. not about PDL at all. These could be moved to a separate file (or even might be in newer versions of Mathlib?).
Lexicographic extension of a relation le to lists: shorter lists come first,
and lists of the same shape are compared element-wise from left to right.
Equations
- PDL.listLex le [] x✝ = True
- PDL.listLex le (head :: tail) [] = False
- PDL.listLex le (a :: as) (b :: bs) = (le a b ∧ (a = b → PDL.listLex le as bs))
Instances For
Equations
- PDL.listLex.instDecidableRel le [] x✝ = isTrue trivial
- PDL.listLex.instDecidableRel le (head :: tail) [] = isFalse not_false
- PDL.listLex.instDecidableRel le (a :: as) (b :: bs) = inferInstance
Equations
- PDL.prodLex.instDecidableRel le1 le2 (a, b) (a', b') = inferInstance
An order on loaded formulas, via a key #
Every loaded formula is a non-empty sequence of loading boxes followed by a normal formula.
The key of a loaded formula records exactly this data, and hence determines it uniquely.
NOTE: This could be moved to Pdl/Syntax.lean.
Equations
- (PDL.LoadFormula.box α (PDL.AnyFormula.normal φ)).key = ([α], φ)
- (PDL.LoadFormula.box α (PDL.AnyFormula.loaded χ)).key = (α :: χ.key.1, χ.key.2)
Instances For
Inverse of LoadFormula.key, see LoadFormula.ofKey_key.
(The value for the empty list of programs is arbitrary.)
NOTE: This could be moved to Pdl/Syntax.lean.
Equations
- PDL.loadFormulaOfKey [] x✝ = PDL.LoadFormula.box (PDL.Program.test x✝) (PDL.AnyFormula.normal x✝)
- PDL.loadFormulaOfKey [α] x✝ = PDL.LoadFormula.box α (PDL.AnyFormula.normal x✝)
- PDL.loadFormulaOfKey (α :: β :: δ) x✝ = PDL.LoadFormula.box α (PDL.AnyFormula.loaded (PDL.loadFormulaOfKey (β :: δ) x✝))
Instances For
The key of a loaded formula determines it.
An order on sequents, via a key #
Key of an Olf: which side (if any) is loaded, together with the key of the loaded formula.
Equations
- PDL.Olf.key none = (0, [], PDL.Formula.bottom)
- PDL.Olf.key (some (Sum.inl (PDL.NegLoadFormula.neg χ))) = (1, χ.key)
- PDL.Olf.key (some (Sum.inr (PDL.NegLoadFormula.neg χ))) = (2, χ.key)
Instances For
Finsets of formulas with the same pdlSort are equal.
NOTE: This could be moved to Pdl/Syntax.lean.
Order used to compare the keys of Olfs.
Equations
- PDL.olfKeyLe = PDL.prodLex (fun (n m : ℕ) => n ≤ m) (PDL.prodLex (PDL.listLex PDL.Program.le) PDL.Formula.le)
Instances For
A linear order on sequents, used to define Finset.pdlSeqSort.
Equations
- X.le Y = PDL.seqKeyLe X.key Y.key