The surface syntax of TLA⁺ modules, as accepted by the parser — a CST close to the concrete grammar (https://lamport.azurewebsites.net/tla/TLAPlus2Grammar.tla), prior to desugaring.
Positions are not stored structurally in these types: every constructor produced by the parser
is tagged out-of-band via the @@/posOf/match_source mechanism in Common/Position.lean.
The entire set of prefix operators reserved in TLA⁺. Fin _ parameters distinguish
alternative spellings of the same operator (given in doc-comment order).
- «-» : PrefixOperator
- - «\neg » : Fin 3 → PrefixOperator
¬:\neg,\lnot, or~ - «[]» : PrefixOperator
□:[] - «<>» : PrefixOperator
◇:<> - DOMAIN : PrefixOperator
- ENABLED : PrefixOperator
- SUBSET : PrefixOperator
- UNCHANGED : PrefixOperator
- UNION : PrefixOperator
Instances For
Equations
- SurfaceTLAPlus.instBEqPrefixOperator.beq SurfaceTLAPlus.PrefixOperator.«-» SurfaceTLAPlus.PrefixOperator.«-» = true
- SurfaceTLAPlus.instBEqPrefixOperator.beq (SurfaceTLAPlus.PrefixOperator.«\neg » a) (SurfaceTLAPlus.PrefixOperator.«\neg » b) = (a == b)
- SurfaceTLAPlus.instBEqPrefixOperator.beq SurfaceTLAPlus.PrefixOperator.«[]» SurfaceTLAPlus.PrefixOperator.«[]» = true
- SurfaceTLAPlus.instBEqPrefixOperator.beq SurfaceTLAPlus.PrefixOperator.«<>» SurfaceTLAPlus.PrefixOperator.«<>» = true
- SurfaceTLAPlus.instBEqPrefixOperator.beq SurfaceTLAPlus.PrefixOperator.DOMAIN SurfaceTLAPlus.PrefixOperator.DOMAIN = true
- SurfaceTLAPlus.instBEqPrefixOperator.beq SurfaceTLAPlus.PrefixOperator.ENABLED SurfaceTLAPlus.PrefixOperator.ENABLED = true
- SurfaceTLAPlus.instBEqPrefixOperator.beq SurfaceTLAPlus.PrefixOperator.SUBSET SurfaceTLAPlus.PrefixOperator.SUBSET = true
- SurfaceTLAPlus.instBEqPrefixOperator.beq SurfaceTLAPlus.PrefixOperator.UNCHANGED SurfaceTLAPlus.PrefixOperator.UNCHANGED = true
- SurfaceTLAPlus.instBEqPrefixOperator.beq SurfaceTLAPlus.PrefixOperator.UNION SurfaceTLAPlus.PrefixOperator.UNION = true
- SurfaceTLAPlus.instBEqPrefixOperator.beq x✝¹ x✝ = false
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.«-» SurfaceTLAPlus.PrefixOperator.«-» = isTrue ⋯
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.«-» (SurfaceTLAPlus.PrefixOperator.«\neg » x_2) = isFalse ⋯
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.«-» SurfaceTLAPlus.PrefixOperator.«[]» = isFalse SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq._proof_4
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.«-» SurfaceTLAPlus.PrefixOperator.«<>» = isFalse SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq._proof_5
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.«-» SurfaceTLAPlus.PrefixOperator.DOMAIN = isFalse SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq._proof_6
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.«-» SurfaceTLAPlus.PrefixOperator.ENABLED = isFalse SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq._proof_7
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.«-» SurfaceTLAPlus.PrefixOperator.SUBSET = isFalse SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq._proof_8
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.«-» SurfaceTLAPlus.PrefixOperator.UNION = isFalse SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq._proof_10
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq (SurfaceTLAPlus.PrefixOperator.«\neg » x_2) SurfaceTLAPlus.PrefixOperator.«-» = isFalse ⋯
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq (SurfaceTLAPlus.PrefixOperator.«\neg » a) (SurfaceTLAPlus.PrefixOperator.«\neg » b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq (SurfaceTLAPlus.PrefixOperator.«\neg » x_2) SurfaceTLAPlus.PrefixOperator.«[]» = isFalse ⋯
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq (SurfaceTLAPlus.PrefixOperator.«\neg » x_2) SurfaceTLAPlus.PrefixOperator.«<>» = isFalse ⋯
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq (SurfaceTLAPlus.PrefixOperator.«\neg » x_2) SurfaceTLAPlus.PrefixOperator.DOMAIN = isFalse ⋯
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq (SurfaceTLAPlus.PrefixOperator.«\neg » x_2) SurfaceTLAPlus.PrefixOperator.ENABLED = isFalse ⋯
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq (SurfaceTLAPlus.PrefixOperator.«\neg » x_2) SurfaceTLAPlus.PrefixOperator.SUBSET = isFalse ⋯
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq (SurfaceTLAPlus.PrefixOperator.«\neg » x_2) SurfaceTLAPlus.PrefixOperator.UNCHANGED = isFalse ⋯
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq (SurfaceTLAPlus.PrefixOperator.«\neg » x_2) SurfaceTLAPlus.PrefixOperator.UNION = isFalse ⋯
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.«[]» SurfaceTLAPlus.PrefixOperator.«-» = isFalse SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq._proof_20
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.«[]» (SurfaceTLAPlus.PrefixOperator.«\neg » x_2) = isFalse ⋯
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.«[]» SurfaceTLAPlus.PrefixOperator.«[]» = isTrue ⋯
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.«[]» SurfaceTLAPlus.PrefixOperator.«<>» = isFalse SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq._proof_22
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.«[]» SurfaceTLAPlus.PrefixOperator.DOMAIN = isFalse SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq._proof_23
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.«[]» SurfaceTLAPlus.PrefixOperator.SUBSET = isFalse SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq._proof_25
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.«[]» SurfaceTLAPlus.PrefixOperator.UNION = isFalse SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq._proof_27
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.«<>» SurfaceTLAPlus.PrefixOperator.«-» = isFalse SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq._proof_28
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.«<>» (SurfaceTLAPlus.PrefixOperator.«\neg » x_2) = isFalse ⋯
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.«<>» SurfaceTLAPlus.PrefixOperator.«[]» = isFalse SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq._proof_30
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.«<>» SurfaceTLAPlus.PrefixOperator.«<>» = isTrue ⋯
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.«<>» SurfaceTLAPlus.PrefixOperator.DOMAIN = isFalse SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq._proof_31
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.«<>» SurfaceTLAPlus.PrefixOperator.SUBSET = isFalse SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq._proof_33
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.«<>» SurfaceTLAPlus.PrefixOperator.UNION = isFalse SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq._proof_35
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.DOMAIN SurfaceTLAPlus.PrefixOperator.«-» = isFalse SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq._proof_36
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.DOMAIN (SurfaceTLAPlus.PrefixOperator.«\neg » x_2) = isFalse ⋯
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.DOMAIN SurfaceTLAPlus.PrefixOperator.«[]» = isFalse SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq._proof_38
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.DOMAIN SurfaceTLAPlus.PrefixOperator.«<>» = isFalse SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq._proof_39
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.DOMAIN SurfaceTLAPlus.PrefixOperator.DOMAIN = isTrue ⋯
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.ENABLED SurfaceTLAPlus.PrefixOperator.«-» = isFalse SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq._proof_44
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.ENABLED (SurfaceTLAPlus.PrefixOperator.«\neg » x_2) = isFalse ⋯
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.ENABLED SurfaceTLAPlus.PrefixOperator.ENABLED = isTrue ⋯
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.SUBSET SurfaceTLAPlus.PrefixOperator.«-» = isFalse SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq._proof_52
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.SUBSET (SurfaceTLAPlus.PrefixOperator.«\neg » x_2) = isFalse ⋯
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.SUBSET SurfaceTLAPlus.PrefixOperator.«[]» = isFalse SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq._proof_54
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.SUBSET SurfaceTLAPlus.PrefixOperator.«<>» = isFalse SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq._proof_55
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.SUBSET SurfaceTLAPlus.PrefixOperator.SUBSET = isTrue ⋯
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.UNCHANGED (SurfaceTLAPlus.PrefixOperator.«\neg » x_2) = isFalse ⋯
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.UNCHANGED SurfaceTLAPlus.PrefixOperator.UNCHANGED = isTrue ⋯
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.UNION SurfaceTLAPlus.PrefixOperator.«-» = isFalse SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq._proof_68
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.UNION (SurfaceTLAPlus.PrefixOperator.«\neg » x_2) = isFalse ⋯
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.UNION SurfaceTLAPlus.PrefixOperator.«[]» = isFalse SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq._proof_70
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.UNION SurfaceTLAPlus.PrefixOperator.«<>» = isFalse SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq._proof_71
- SurfaceTLAPlus.instDecidableEqPrefixOperator.decEq SurfaceTLAPlus.PrefixOperator.UNION SurfaceTLAPlus.PrefixOperator.UNION = isTrue ⋯
Instances For
Equations
Instances For
Instances For
Instances For
Equations
- One or more equations did not get rendered due to their size.
The entire set of postfix operators reserved in TLA⁺.
- «^+» : PostfixOperator
^+ - «^*» : PostfixOperator
^* - «^#» : PostfixOperator
^# - «'» : PostfixOperator
'
Instances For
Equations
- SurfaceTLAPlus.instBEqPostfixOperator.beq x✝ y✝ = (x✝.ctorIdx == y✝.ctorIdx)
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
The entire set of infix operators reserved in TLA⁺.
- «!!» : InfixOperator
- ## : InfixOperator
- «$$» : InfixOperator
- «$» : InfixOperator
- «%%» : InfixOperator
- «%» : InfixOperator
- «&&» : InfixOperator
- «&» : InfixOperator
- «(+) » : Fin 2 → InfixOperator
⊕:(+)or\oplus - «(-) » : Fin 2 → InfixOperator
⊝:(-)or\ominus - «(.) » : Fin 2 → InfixOperator
⊙:(.)or\odot - «(/) » : Fin 2 → InfixOperator
⊘:(/)or\oslash - «(\X) » : Fin 2 → InfixOperator
⊗:(\X)or\otimes - «\X » : Fin 2 → InfixOperator
×:\Xor\times. Not actually a binary operator in the grammar, but treated as such for simplicity. - «**» : InfixOperator
- «*» : InfixOperator
- «++» : InfixOperator
- «+» : InfixOperator
- «-+->» : InfixOperator
- «--» : InfixOperator
- «-|» : InfixOperator
⊣:-| - «-» : InfixOperator
- «...» : InfixOperator
- «..» : InfixOperator
- «.» : InfixOperator
- «//» : InfixOperator
- «/= » : Fin 2 → InfixOperator
≠:/=or# - «/\ » : Fin 2 → InfixOperator
∧:/\or\land - «/» : InfixOperator
- «::=» : InfixOperator
⩴:::= - «:=» : InfixOperator
≔::= - «:>» : InfixOperator
- «<:» : InfixOperator
- «<=> » : Fin 2 → InfixOperator
≡:<=>or\equiv - «=< » : Fin 3 → InfixOperator
≤:=<,<=, or\leq - «=>» : InfixOperator
⇒:=> - «=|» : InfixOperator
⫤:=| - «<» : InfixOperator
- «=» : InfixOperator
- «>= » : Fin 2 → InfixOperator
≥:>=or\geq - «>» : InfixOperator
- ?? : InfixOperator
- ? : InfixOperator
- «@@» : InfixOperator
- «\/ » : Fin 2 → InfixOperator
∨:\/or\lor - «^^» : InfixOperator
- «^» : InfixOperator
- «|-» : InfixOperator
⊢:|- - «|=» : InfixOperator
⊨:|= - «||» : InfixOperator
‖:|| - «|» : InfixOperator
- «~>» : InfixOperator
⤳:~> - «\approx» : InfixOperator
- «\sqsupseteq» : InfixOperator
- «\asymp» : InfixOperator
- «\gg» : InfixOperator
- «\star» : InfixOperator
- «\bigcirc» : InfixOperator
- «\in» : InfixOperator
∈:\in - «\preceq» : InfixOperator
- «\prec» : InfixOperator
- «\subseteq» : InfixOperator
- «\subset» : InfixOperator
- «\bullet» : InfixOperator
- «\cap » : Fin 2 → InfixOperator
∩:\capor\intersect - «\propto» : InfixOperator
- «\succeq» : InfixOperator
- «\succ» : InfixOperator
- «\cdot» : InfixOperator
- «\simeq» : InfixOperator
- «\sim» : InfixOperator
- «\ll» : InfixOperator
- «\supseteq» : InfixOperator
- «\supset» : InfixOperator
- «\cong» : InfixOperator
- «\sqcap» : InfixOperator
- «\cup » : Fin 2 → InfixOperator
∪:\cupor\union - «\o » : Fin 2 → InfixOperator
∘:\oor\circ - «\sqcup» : InfixOperator
- «\div» : InfixOperator
- «\sqsubseteq» : InfixOperator
- «\sqsubset» : InfixOperator
- «\uplus» : InfixOperator
- «\doteq» : InfixOperator
- «\wr» : InfixOperator
- «\sqsupset» : InfixOperator
- «\notin» : InfixOperator
∉:\notin - «\» : InfixOperator
backslash,
\
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Equations
- One or more equations did not get rendered due to their size.
TLA⁺ types, in the same format as Apalache.
- bool : Typ
- int : Typ
- str : Typ
- function : Typ → Typ → Typ
τ -> τ - set : Typ → Typ
Set(τ) - seq : Typ → Typ
Seq(τ) - bag : Typ → Typ
Bag(τ) - tuple : List Typ → Typ
<<τ₁, …, τₙ>> - operator : List Typ → Typ → Typ
(τ₁, …, τₙ) => τₙ₊₁ - var : String → Typ
A rigid, universally-quantified type variable
a. - const : String → Typ
CONSTANT— an abstract type. - record : List (String × Typ) → Typ
- channel : Typ → Typ
Channel(τ). Covariant:τ <: τ' → Channel(τ) <: Channel(τ'). - address : Typ
Address. - mvar : ℕ → Typ
A metavariable
?n, resolved during type checking; never appears in a fully-elaboratedTypedTLAPlusterm.
Instances For
Equations
- SurfaceTLAPlus.instReprTyp = { reprPrec := SurfaceTLAPlus.instReprTyp.repr }
Equations
Equations
Whether τ is Channel-shaped: a bare Channel(τ'), or an indexed channel family dom -> Channel(τ') (as Elaborator/PlusCal.lean's checkChannelDecl encodes it). Shared by
WellFormedness/Declarations.lean (checks 2(a)/(d)) and WellFormedness/Restrictions.lean (check
- as one source of truth for "legal channel type."
Equations
- x_1.channel.isChannelLike = true
- (x_1.function x_2.channel).isChannelLike = true
- x✝.isChannelLike = false
Instances For
Equations
Groups of variables bound in quantifiers (\A/\E/…).
- var
{α β : Type}
: α → String → β → QuantifierBound α β
x ∈ A - varTuple
{α β : Type}
: List (α × String) → β → QuantifierBound α β
⟨x, y, …, z⟩ ∈ A - vars
{α β : Type}
: List (α × String) → β → QuantifierBound α β
x, y, …, z ∈ A
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
- SurfaceTLAPlus.instDecidableEqQuantifierBound.decEq (SurfaceTLAPlus.QuantifierBound.var a a_1 a_2) (SurfaceTLAPlus.QuantifierBound.varTuple a_3 a_4) = isFalse ⋯
- SurfaceTLAPlus.instDecidableEqQuantifierBound.decEq (SurfaceTLAPlus.QuantifierBound.var a a_1 a_2) (SurfaceTLAPlus.QuantifierBound.vars a_3 a_4) = isFalse ⋯
- SurfaceTLAPlus.instDecidableEqQuantifierBound.decEq (SurfaceTLAPlus.QuantifierBound.varTuple a a_1) (SurfaceTLAPlus.QuantifierBound.var a_2 a_3 a_4) = isFalse ⋯
- SurfaceTLAPlus.instDecidableEqQuantifierBound.decEq (SurfaceTLAPlus.QuantifierBound.varTuple a a_1) (SurfaceTLAPlus.QuantifierBound.vars a_2 a_3) = isFalse ⋯
- SurfaceTLAPlus.instDecidableEqQuantifierBound.decEq (SurfaceTLAPlus.QuantifierBound.vars a a_1) (SurfaceTLAPlus.QuantifierBound.var a_2 a_3 a_4) = isFalse ⋯
- SurfaceTLAPlus.instDecidableEqQuantifierBound.decEq (SurfaceTLAPlus.QuantifierBound.vars a a_1) (SurfaceTLAPlus.QuantifierBound.varTuple a_2 a_3) = isFalse ⋯
Instances For
Equations
- SurfaceTLAPlus.instBEqQuantifierBound.beq (SurfaceTLAPlus.QuantifierBound.var a a_1 a_2) (SurfaceTLAPlus.QuantifierBound.var b b_1 b_2) = (a == b && (a_1 == b_1 && a_2 == b_2))
- SurfaceTLAPlus.instBEqQuantifierBound.beq (SurfaceTLAPlus.QuantifierBound.varTuple a a_1) (SurfaceTLAPlus.QuantifierBound.varTuple b b_1) = (a == b && a_1 == b_1)
- SurfaceTLAPlus.instBEqQuantifierBound.beq (SurfaceTLAPlus.QuantifierBound.vars a a_1) (SurfaceTLAPlus.QuantifierBound.vars b b_1) = (a == b && a_1 == b_1)
- SurfaceTLAPlus.instBEqQuantifierBound.beq x✝¹ x✝ = false
Instances For
Equations
- SurfaceTLAPlus.QuantifierBound.bimap f g (SurfaceTLAPlus.QuantifierBound.var ann v x_1) = SurfaceTLAPlus.QuantifierBound.var (f ann) v (g x_1)
- SurfaceTLAPlus.QuantifierBound.bimap f g (SurfaceTLAPlus.QuantifierBound.vars vs x_1) = SurfaceTLAPlus.QuantifierBound.vars (Bifunctor.fst f <$> vs) (g x_1)
- SurfaceTLAPlus.QuantifierBound.bimap f g (SurfaceTLAPlus.QuantifierBound.varTuple vs x_1) = SurfaceTLAPlus.QuantifierBound.varTuple (Bifunctor.fst f <$> vs) (g x_1)
Instances For
Equations
- SurfaceTLAPlus.instBifunctorQuantifierBound = { bimap := fun {α α' β β' : Type} => SurfaceTLAPlus.QuantifierBound.bimap }
Equations
- SurfaceTLAPlus.QuantifierBound.bitraverse f g (SurfaceTLAPlus.QuantifierBound.var ann v x_1) = (fun (x1 : γ) (x2 : δ) => SurfaceTLAPlus.QuantifierBound.var x1 v x2) <$> f ann <*> g x_1
- SurfaceTLAPlus.QuantifierBound.bitraverse f g (SurfaceTLAPlus.QuantifierBound.vars vs x_1) = SurfaceTLAPlus.QuantifierBound.vars <$> traverse (bitraverse f pure) vs <*> g x_1
- SurfaceTLAPlus.QuantifierBound.bitraverse f g (SurfaceTLAPlus.QuantifierBound.varTuple vs x_1) = SurfaceTLAPlus.QuantifierBound.varTuple <$> traverse (bitraverse f pure) vs <*> g x_1
Instances For
Equations
- One or more equations did not get rendered due to their size.
Either a single bound variable x, or a tuple of them ⟨x, y, …, z⟩.
An inductive rather than an alias for 𝒱 ⊕ List 𝒱, for the same reason QuantifierBound is one.
Expression.choose/.collect instantiate this at α × String, and α is itself a datatype being
declared wherever Expression is nested inside one — Parser_/Annotations.lean's Annotation
holds Expression (List Annotation). Lean's nested-inductive compiler inspects constructor
argument types syntactically, and a recursive occurrence may sit under List/Prod/Sum or
another inductive, but not under a definition, whose head stays opaque; reducibility does not
help, an abbrev fails exactly as a def does ("contains a non valid occurrence of the datatypes
being declared"). This was invisible while the element type was plain String: no α, hence no
occurrence to check.
- var {α : Type} (ann : α) (x : String) : IdentifierOrTuple α
- tuple {α : Type} (xs : List (α × String)) : IdentifierOrTuple α
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- SurfaceTLAPlus.instBEqIdentifierOrTuple.beq (SurfaceTLAPlus.IdentifierOrTuple.var a a_1) (SurfaceTLAPlus.IdentifierOrTuple.var b b_1) = (a == b && a_1 == b_1)
- SurfaceTLAPlus.instBEqIdentifierOrTuple.beq (SurfaceTLAPlus.IdentifierOrTuple.tuple a) (SurfaceTLAPlus.IdentifierOrTuple.tuple b) = (a == b)
- SurfaceTLAPlus.instBEqIdentifierOrTuple.beq x✝¹ x✝ = false
Instances For
Equations
- One or more equations did not get rendered due to their size.
- SurfaceTLAPlus.instDecidableEqIdentifierOrTuple.decEq (SurfaceTLAPlus.IdentifierOrTuple.var ann x_2) (SurfaceTLAPlus.IdentifierOrTuple.tuple xs) = isFalse ⋯
- SurfaceTLAPlus.instDecidableEqIdentifierOrTuple.decEq (SurfaceTLAPlus.IdentifierOrTuple.tuple xs) (SurfaceTLAPlus.IdentifierOrTuple.var ann x_2) = isFalse ⋯
- SurfaceTLAPlus.instDecidableEqIdentifierOrTuple.decEq (SurfaceTLAPlus.IdentifierOrTuple.tuple a) (SurfaceTLAPlus.IdentifierOrTuple.tuple b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
Instances For
Independent of α — the empty tuple needs no annotation.
Equations
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.
TLA⁺ expressions as accepted syntactically, before desugaring. The α parameter carries
whatever comment-annotation payload the caller wants attached at binder sites (e.g. @type
annotations).
- var
{α : Type}
: String → Expression α
An unqualified identifier.
- opCall
{α : Type}
: Expression α → List (Expression α) → Expression α
An operator call
f(e₁, …, eₙ). - prefixCall {α : Type} : PrefixOperator → Expression α → Expression α
- infixCall {α : Type} : Expression α → InfixOperator → Expression α → Expression α
- postfixCall {α : Type} : Expression α → PostfixOperator → Expression α
- parens {α : Type} : Expression α → Expression α
- bforall
{α : Type}
: List (QuantifierBound α (Expression α)) → Expression α → Expression α
Bounded universal quantification
\A q \in A : e. - bexists
{α : Type}
: List (QuantifierBound α (Expression α)) → Expression α → Expression α
Bounded existential quantification
\E q \in A : p. - forall
{α : Type}
: List String → Expression α → Expression α
Unbounded universal quantification
\A x, y, …, z : p. - exists
{α : Type}
: List String → Expression α → Expression α
Unbounded existential quantification
\E x, y, …, z : p. - fforall
{α : Type}
: List String → Expression α → Expression α
Temporal universal quantification
\AA x, y, …, z : p. - eexists
{α : Type}
: List String → Expression α → Expression α
Temporal existential quantification
\EE x, y, …, z : p. - choose
{α : Type}
: IdentifierOrTuple α → Option (Expression α) → Expression α → Expression α
Hilbert's epsilon operator
CHOOSE x \in A : p. Each bound name carries its own annotation, the same wayQuantifierBounddoes — a binder here is as annotatable as one in\A/\E. - set
{α : Type}
: List (Expression α) → Expression α
A literal set
{e₁, …, eₙ}. - collect
{α : Type}
: IdentifierOrTuple α → Expression α → Expression α → Expression α
Set collection/filtering
{x \in A : p}. Bound names carry annotations, as inchoose. - map'
{α : Type}
: Expression α → List (QuantifierBound α (Expression α)) → Expression α
The image of a function by a set
{e : x \in A}. - fnCall
{α : Type}
: Expression α → List (Expression α) → Expression α
A function call
f[e₁, …, eₙ]. - fn
{α : Type}
: List (QuantifierBound α (Expression α)) → Expression α → Expression α
A function literal
[x \in A, …, z \in B ↦ e]. - fnSet
{α : Type}
: Expression α → Expression α → Expression α
The set of all functions from a domain to a codomain,
[A -> B]. - record
{α : Type}
: List (α × String × Expression α) → Expression α
A literal record
[a |-> e₁, …, z |-> eₙ]. - recordSet
{α : Type}
: List (α × String × Expression α) → Expression α
The set of all records whose fields are in the given sets,
[a : A, …, z : Z]. - except
{α : Type}
: Expression α → List (List (String ⊕ List (Expression α)) × Expression α) → Expression α
Function update
[f EXCEPT ![e₁] = e₂]. - recordAccess
{α : Type}
: Expression α → String → Expression α
Record access
r.x. - tuple
{α : Type}
: List (Expression α) → Expression α
A literal tuple
<<e₁, …, eₙ>>. - if
{α : Type}
: Expression α → Expression α → Expression α → Expression α
Conditional
IF e₁ THEN e₂ ELSE e₃. - case
{α : Type}
: List (Expression α × Expression α) → Option (Expression α) → Expression α
Case distinction
CASE p₁ -> e₁ [] … [] OTHER -> eₙ₊₁. - conj
{α : Type}
: List (Expression α) → Expression α
Conjunction list
/\ P /\ … /\ R. - disj
{α : Type}
: List (Expression α) → Expression α
Disjunction list
\/ P \/ … \/ R. - nat {α : Type} : String → Expression α
- str {α : Type} : String → Expression α
- at
{α : Type}
: Expression α
@, TLA⁺'s self-reference insideEXCEPT. - true {α : Type} : Expression α
- false {α : Type} : Expression α
- stutter
{α : Type}
: Expression α → Expression α → Expression α
The stuttering-allowed action
[A]_e.
Instances For
Equations
Equations
Equations
Equations
- SurfaceTLAPlus.instFunctorExpression = { map := fun {α β : Type} => SurfaceTLAPlus.Expression.map }
Equations
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.
A top-level TLA⁺ declaration, prior to desugaring. Own type rather than the Core/Declaration.lean
shared one CoreTLAPlus/TypedTLAPlus reuse verbatim: a function definition's binder list here
may still be shared-domain (x, y \in S) or tuple-pattern (<<x,y>> \in S) sugar — the same
QuantifierBound shape \A/\E/set-builders already accept — which Desugarer/TLAPlus.lean
flattens down to CoreTLAPlus.Declaration.function's plain per-binder form before anything past
desugaring ever sees it. RECURSIVE and module INSTANCE are not represented.
- constants {α : Type} : List (String × α) → Declaration α
- variables {α : Type} : List (String × α) → Declaration α
- assume {α : Type} : Expression α → Declaration α
- operator
{α : Type}
: α → String → List (String × ℕ) → Expression α → Declaration α
An operator definition, optionally with higher-order arguments. Each parameter's
Natis its arity (0forx,3forF(_, _, _), …). - function
{α : Type}
: α → String → List (QuantifierBound α (Expression α)) → Expression α → Declaration α
A function definition. Each binder may itself be a shared-domain or tuple-pattern shorthand (
QuantifierBound, same shape quantifiers accept).
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.
A parsed TLA⁺ module, EXTENDS-list and all, wrapping the embedded (Distributed) PlusCal
algorithm at whatever α the caller instantiates it at — kept abstract to avoid a cyclic
import between the two Core ASTs. Own type for the same reason Declaration above is: its
declarations₁/declarations₂ are lists of this Declaration, not Core/Declaration.lean's
shared one.
- name : String
- declarations₁ : List (Declaration β)
- pcalAlgorithm : Option α
- declarations₂ : List (Declaration β)
Instances For
Equations
Hand-written, same reason as Declaration's Repr instance above.
Equations
- One or more equations did not get rendered due to their size.
@@ posOf m, for the same reason SurfacePlusCal.Process/.Algorithm's instances carry it:
mapping a module rebuilds the structure, and a rebuilt node that isn't re-registered has no
position of its own — posOf then answers for it with whatever unrelated value last occupied
that address (Common/Position.lean).
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.