Sequents #
Optional loaded formulas (Olfs) #
In nodes we optionally have a negated loaded formula on the left or right.
Equations
Instances For
The subset relation on Option α from Option.instHasSubsetOption is decidable.
Equations
- o1.instDecidableSubset 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.
Equations
- oldO.change Ocond newO = Option.overwrite (oldO \ Ocond) newO
Instances For
Equations
- Olf.isNone none = True
- Olf.isNone (some (Sum.inl nlf)) = False
- Olf.isNone (some (Sum.inr nlf)) = False
Instances For
Equations
- Olf.isLeft none = False
- Olf.isLeft (some (Sum.inl nlf)) = True
- Olf.isLeft (some (Sum.inr nlf)) = False
Instances For
Equations
- Olf.isRight none = False
- Olf.isRight (some (Sum.inl nlf)) = False
- 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 #
Equations
- instReprSequent = { reprPrec := instReprSequent._aux_1 }
Components and sides of sequents #
(Joint) vocabulary of sequents #
Formulas as elements of sequents #
Equations
- instDecidableMemFormulaSequent = Prod.casesOn X fun (L : Finset Formula) (snd : Finset Formula × Olf) => Prod.casesOn snd fun (R : Finset Formula) (o : Olf) => id (id inferInstance)
Equations
Equations
- AnyNegFormula.mem_Sequent x✝ (~''(AnyFormula.normal φ)) = (~φ ∈ x✝)
- AnyNegFormula.mem_Sequent x✝ (~''(AnyFormula.loaded χ)) = ((~'χ) ∈ x✝)
Instances For
Equations
Closed, basic, loaded and free sequents #
A variant of Fintype.decidableExistsFintype, used by instDecidableClosed.
Equations
- 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 #
Removing loaded formulas from sequents #
Equations
Instances For
Equations
- (~''(AnyFormula.normal φ)).in_side Side.LL (L, fst, snd) = (~φ ∈ L)
- (~''(AnyFormula.normal φ)).in_side Side.RR (fst, R, snd) = (~φ ∈ R)
- (~''(AnyFormula.loaded χ)).in_side Side.LL (fst, fst_1, O) = (O = some (Sum.inl (~'χ)))
- (~''(AnyFormula.loaded χ)).in_side Side.RR (fst, fst_1, O) = (O = some (Sum.inr (~'χ)))
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
- instReprWhateverFormula = { reprPrec := instReprWhateverFormula.repr }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- instDecidableEqWhateverFormula.decEq (WhateverFormula.any a) (WhateverFormula.any b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
- instDecidableEqWhateverFormula.decEq (WhateverFormula.any a) (WhateverFormula.negLoad a_1) = isFalse ⋯
- instDecidableEqWhateverFormula.decEq (WhateverFormula.negLoad a) (WhateverFormula.any a_1) = isFalse ⋯
- instDecidableEqWhateverFormula.decEq (WhateverFormula.negLoad a) (WhateverFormula.negLoad b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
Instances For
Equations
Equations
Equations
Equations
- Olf.wForms none = ∅
- Olf.wForms (some (Sum.inl nlf)) = {WhateverFormula.negLoad nlf}
- Olf.wForms (some (Sum.inr nlf)) = {WhateverFormula.negLoad nlf}
Instances For
Equations
- 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
Instances For
Equations
- listLex.instDecidableRel le [] x✝ = isTrue trivial
- listLex.instDecidableRel le (head :: tail) [] = isFalse not_false
- listLex.instDecidableRel le (a :: as) (b :: bs) = inferInstance
Equations
- 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
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
- loadFormulaOfKey [] x✝ = ⌊?'x✝⌋AnyFormula.normal x✝
- loadFormulaOfKey [α] x✝ = ⌊α⌋AnyFormula.normal x✝
- loadFormulaOfKey (α :: β :: δ) x✝ = ⌊α⌋AnyFormula.loaded (loadFormulaOfKey (β :: δ) x✝)
Instances For
The key of a loaded formula determines it.
An order on sequents, via a key #
Finsets of formulas with the same fsort are equal.
NOTE: This could be moved to Pdl/Syntax.lean.
A linear order on sequents, used to define Finset.seqSort.
Instances For
Equations
Sort a finite set of sequents into a list, using Sequent.le.
Equations
- A.seqSort = A.sort Sequent.le