Sorts and their Lean descriptions #
Srt is an SMT-LIB sort of the current scope, Typ a pure Lean description of one, and ToTyp
the class mapping a Lean type to the Typ it denotes. The sort constructors are in Cvc.Srt.
- mk' :: (
- doc? : Option (Lean.TSyntax `Lean.Parser.Command.docComment)
- mainId : Lean.Ident
- tParam? : Option Lean.Ident
- subId : Lean.Ident
- ofSubId : Lean.Ident
- toSubId : Lean.Ident
- idTerm : Lean.Term
- idSig : Lean.Term
- idDef : Lean.Term
- )
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- tg.namespaced code = Lean.Elab.Command.withNamespace (Lean.TSyntax.getId tg.mainId) code
Instances For
Equations
- Cvc.TypeGen.elaborate stx = do let stx ← stx Lean.Elab.Command.elabCommand stx.raw
Instances For
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
- 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
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- Cvc.«cvcCustomDefKwDef0%» = Lean.ParserDescr.node `Cvc.«cvcCustomDefKwDef0%» 1024 (Lean.ParserDescr.symbol "def0% ")
Instances For
Equations
- Cvc.«cvcCustomDefKwDef1%» = Lean.ParserDescr.node `Cvc.«cvcCustomDefKwDef1%» 1024 (Lean.ParserDescr.symbol "def1% ")
Instances For
Equations
- Cvc.«cvcCustomDefKwDef2%» = Lean.ParserDescr.node `Cvc.«cvcCustomDefKwDef2%» 1024 (Lean.ParserDescr.symbol "def2% ")
Instances For
Equations
- Cvc.«cvcCustomDefKwDef3%» = Lean.ParserDescr.node `Cvc.«cvcCustomDefKwDef3%» 1024 (Lean.ParserDescr.symbol "def3% ")
Instances For
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
Re-exported from lean-cvc5 #
The enums Kind, SortKind, ProofRule and ProofRewriteRule, and the type Op, are lean-cvc5's
own, re-exported so that naming one does not mean reaching into cvc5.
Equality operator.
Equations
Instances For
The string cvc5 prints for this value.
Instances For
Equations
cvc5's hash of this value.
Instances For
Equations
Equations
cvc5's hash of this value.
Equations
Instances For
Equations
Equations
- Cvc.Datatype.instToString = { toString := Cvc.Datatype.instToString._aux_1 }
The string cvc5 prints for this value.
Equations
Instances For
Equations
A declared datatype, as read back from its sort.
Equations
Instances For
Equality operator.
Equations
Instances For
A constructor declaration being built, added to a Datatype.Decl.
Instances For
The string cvc5 prints for this value.
Instances For
Equality operator.
Instances For
Equations
cvc5's hash of this value.
Instances For
Equations
Equations
The string cvc5 prints for this value.
Instances For
Equality operator.
Instances For
A constructor of a declared datatype.
Equations
Instances For
cvc5's hash of this value.
Instances For
Equations
Equations
Equations
A field selector of a datatype constructor.
Equations
Instances For
Equations
Equations
Equations
The string cvc5 prints for this value.
Instances For
cvc5's hash of this value.
Instances For
Equality operator.
Instances For
Less than or equal comparison.
Equations
Instances For
Equations
- Cvc.Srt.instOrd = { compare := Cvc.Srt.instOrd._aux_1 }
Equations
- Cvc.Srt.instToString = { toString := Cvc.Srt.instToString._aux_1 }
Greater than or equal comparison.
Equations
Instances For
Comparison for structural equality.
Equations
Instances For
Equations
- Cvc.Srt.instLE = { le := Cvc.Srt.instLE._aux_1 }
Comparison of two sorts.
Equations
Instances For
cvc5's hash of this value.
Equations
Instances For
Greater than comparison.
Equations
Instances For
Less than comparison.
Equations
Instances For
The string cvc5 prints for this value.
Equations
Instances For
Equations
- Cvc.Srt.instBEq = { beq := Cvc.Srt.instBEq._aux_1 }
Equations
Equations
- Cvc.Srt.instLT = { lt := Cvc.Srt.instLT._aux_1 }
Equations
Equations
Equations
- Cvc.Srt.instBEqAbstract.beq x✝ y✝ = (x✝.ctorIdx == y✝.ctorIdx)
Instances For
Equations
- Cvc.Srt.instOrdAbstract = { compare := Cvc.Srt.instOrdAbstract.ord }
Equations
- Cvc.Srt.instOrdAbstract.ord x✝ y✝ = compare x✝.ctorIdx y✝.ctorIdx
Instances For
Equations
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
- Cvc.Srt.instReprAbstract.repr Cvc.Srt.Abstract.bitVec prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Cvc.Srt.Abstract.bitVec")).group prec✝
- Cvc.Srt.instReprAbstract.repr Cvc.Srt.Abstract.float prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Cvc.Srt.Abstract.float")).group prec✝
- Cvc.Srt.instReprAbstract.repr Cvc.Srt.Abstract.function prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Cvc.Srt.Abstract.function")).group prec✝
Instances For
Equations
- Cvc.Srt.instReprAbstract = { reprPrec := Cvc.Srt.instReprAbstract.repr }
Equations
- Cvc.Srt.Abstract.bitVec.toString = "BitVec _"
- Cvc.Srt.Abstract.float.toString = "Float _ _"
- Cvc.Srt.Abstract.finiteField.toString = "FiniteField _"
- Cvc.Srt.Abstract.function.toString = "_ → _"
Instances For
Equations
- Cvc.Srt.Abstract.instToString = { toString := Cvc.Srt.Abstract.toString }
Equations
Instances For
Equations
- Cvc.Srt.Abstract.instOrd = { compare := fun (a1 a2 : Cvc.Srt.Abstract) => compare a1.ctorIdx a2.ctorIdx }
Equations
- Cvc.Srt.Abstract.instLE = { le := fun (x1 x2 : Cvc.Srt.Abstract) => x1.ble x2 = true }
Equations
- Cvc.Srt.Abstract.instLT = { lt := fun (x1 x2 : Cvc.Srt.Abstract) => x1.blt x2 = true }
Sort descriptions #
Typ describes a sort Lean-side, and Typ? adds the sorts cvc5 calls abstract: the fully
abstract ?, and ?BITVECTOR_TYPE, ?FLOATINGPOINT_TYPE, ?FINITE_FIELD_TYPE and ?->. cvc5
accepts an abstract sort only as a set, bag or sequence element, as an array's index or element, and
as a function's codomain. Those positions take a Typ? and every other takes a Typ, so no Typ
describes a sort cvc5 would reject.
A sort, described Lean-side; never an abstract sort.
- bool : Typ
- int : Typ
- real : Typ
- string : Typ
- regex : Typ
- roundingMode : Typ
- bitVec (size : Nat) : Typ
- float (exp sig : Nat) : Typ
- finiteField (size : Nat) : Typ
- arrayTo (idx elm : Typ?) : Typ
- bag (elm : Typ?) : Typ
- set (elm : Typ?) : Typ
- seq (elm : Typ?) : Typ
- nullable
(elm : Typ)
: Typ
cvc5's
Nullable, denoted Lean-side byOption. - prod
(args : List Typ)
: Typ
A tuple, of the given components.
- record
(fields : List (String × Typ))
: Typ
A record, of named fields.
The order is part of the sort:
{a : Int, b : Bool}and{b : Bool, a : Int}are different. - datatype
(name : String)
: Typ
A datatype, by the name it was declared under.
Typ.toSrtfails unless a datatype of that name has been declared in the current scope, withSrt.datatype,Srt.datatypesorSolver.declareDatatype. - function
(dom : Typ)
(cod : Typ?)
: Typ
A function sort, its codomain possibly abstract.
- uninterpreted
(name : String)
: Typ
An uninterpreted sort, by name; like
datatype, it must be declared (Srt.uninterpreted).
Instances For
Equations
- Cvc.instOrdTyp = { compare := Cvc.instOrdTyp.ord_1 }
Equations
- Cvc.instOrdTyp? = { compare := Cvc.instOrdTyp?.ord_2 }
Equations
- Cvc.instHashableTyp = { hash := Cvc.instHashableTyp.hash_1 }
Equations
Every Typ is a Typ?, so the wrapping is implicit.
Equations
- Cvc.instCoeTypTyp? = { coe := Cvc.Typ?.typ }
Typ's constructors, mirrored #
Dot notation resolves against the expected type, so .set .int would look for Typ?.int and fail.
These restore it, and @[match_pattern] makes them usable in patterns as well as in terms.
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Instances For
Equations
- Cvc.Typ?.bitVec size = Cvc.Typ?.typ (Cvc.Typ.bitVec size)
Instances For
Equations
- Cvc.Typ?.float exp sig = Cvc.Typ?.typ (Cvc.Typ.float exp sig)
Instances For
Equations
- Cvc.Typ?.finiteField size = Cvc.Typ?.typ (Cvc.Typ.finiteField size)
Instances For
Equations
- idx.arrayTo elm = Cvc.Typ?.typ (Cvc.Typ.arrayTo idx elm)
Instances For
Equations
- Cvc.Typ?.nullable elm = Cvc.Typ?.typ elm.nullable
Instances For
Equations
- Cvc.Typ?.prod args = Cvc.Typ?.typ (Cvc.Typ.prod args)
Instances For
Equations
- Cvc.Typ?.record fields = Cvc.Typ?.typ (Cvc.Typ.record fields)
Instances For
Equations
- Cvc.Typ?.datatype name = Cvc.Typ?.typ (Cvc.Typ.datatype name)
Instances For
Equations
- Cvc.Typ?.function dom cod = Cvc.Typ?.typ (dom.function cod)
Instances For
Equations
- Cvc.Typ?.uninterpreted name = Cvc.Typ?.typ (Cvc.Typ.uninterpreted name)
Instances For
Structural equality.
Equations
- Cvc.Typ.bool.beq Cvc.Typ.bool = true
- Cvc.Typ.int.beq Cvc.Typ.int = true
- Cvc.Typ.real.beq Cvc.Typ.real = true
- Cvc.Typ.string.beq Cvc.Typ.string = true
- Cvc.Typ.regex.beq Cvc.Typ.regex = true
- Cvc.Typ.roundingMode.beq Cvc.Typ.roundingMode = true
- (Cvc.Typ.bitVec s₁).beq (Cvc.Typ.bitVec s₂) = (s₁ == s₂)
- (Cvc.Typ.float e₁ s₁).beq (Cvc.Typ.float e₂ s₂) = (e₁ == e₂ && s₁ == s₂)
- (Cvc.Typ.finiteField s₁).beq (Cvc.Typ.finiteField s₂) = (s₁ == s₂)
- (Cvc.Typ.arrayTo i₁ e₁).beq (Cvc.Typ.arrayTo i₂ e₂) = (i₁.beq i₂ && e₁.beq e₂)
- (Cvc.Typ.bag e₁).beq (Cvc.Typ.bag e₂) = e₁.beq e₂
- (Cvc.Typ.set e₁).beq (Cvc.Typ.set e₂) = e₁.beq e₂
- (Cvc.Typ.seq e₁).beq (Cvc.Typ.seq e₂) = e₁.beq e₂
- e₁.nullable.beq e₂.nullable = e₁.beq e₂
- (Cvc.Typ.prod as₁).beq (Cvc.Typ.prod as₂) = Cvc.Typ.beqList as₁ as₂
- (Cvc.Typ.record fs₁).beq (Cvc.Typ.record fs₂) = Cvc.Typ.beqFields fs₁ fs₂
- (Cvc.Typ.datatype n₁).beq (Cvc.Typ.datatype n₂) = (n₁ == n₂)
- (d₁.function c₁).beq (d₂.function c₂) = (d₁.beq d₂ && c₁.beq c₂)
- (Cvc.Typ.uninterpreted name₁).beq (Cvc.Typ.uninterpreted name₂) = (name₁ == name₂)
- x✝¹.beq x✝ = false
Instances For
Structural equality.
Equations
- Cvc.Typ.beqList [] [] = true
- Cvc.Typ.beqList (hd₁ :: tl₁) (hd₂ :: tl₂) = (hd₁.beq hd₂ && Cvc.Typ.beqList tl₁ tl₂)
- Cvc.Typ.beqList x✝¹ x✝ = false
Instances For
Structural equality.
Equations
- (Cvc.Typ?.typ t₁).beq (Cvc.Typ?.typ t₂) = t₁.beq t₂
- Cvc.Typ?.any.beq Cvc.Typ?.any = true
- (Cvc.Typ?.abstract a₁).beq (Cvc.Typ?.abstract a₂) = decide (a₁ = a₂)
- x✝¹.beq x✝ = false
Instances For
Cvc.Typ.beq is reflexive.
Cvc.Typ.beq is reflexive.
Cvc.Typ.beq holds only of equals.
Cvc.Typ.beq holds only of equals.
Cvc.Typ.beq holds only of equals.
Cvc.Typ.beq holds only of equals.
Equations
- t₁.instDecidableEq t₂ = decidable_of_iff (t₁.beq t₂ = true) ⋯
Equations
- t₁.instDecidableEq t₂ = decidable_of_iff (t₁.beq t₂ = true) ⋯
String representation.
Equations
- One or more equations did not get rendered due to their size.
- Cvc.Typ.bool.toString paren = "Bool"
- Cvc.Typ.int.toString paren = "Int"
- Cvc.Typ.real.toString paren = "Real"
- Cvc.Typ.string.toString paren = "String"
- Cvc.Typ.regex.toString paren = "Regex"
- Cvc.Typ.roundingMode.toString paren = "RoundingMode"
- (Cvc.Typ.bitVec size).toString paren = (fun (s : String) => if paren = true then toString "(" ++ toString s ++ toString ")" else s) (toString "BitVec " ++ toString size)
- (Cvc.Typ.finiteField size).toString paren = (fun (s : String) => if paren = true then toString "(" ++ toString s ++ toString ")" else s) (toString "FiniteField " ++ toString size)
- (Cvc.Typ.bag elm).toString paren = (fun (s : String) => if paren = true then toString "(" ++ toString s ++ toString ")" else s) (toString "Bag " ++ toString (elm.toString true))
- (Cvc.Typ.set elm).toString paren = (fun (s : String) => if paren = true then toString "(" ++ toString s ++ toString ")" else s) (toString "Set " ++ toString (elm.toString true))
- (Cvc.Typ.seq elm).toString paren = (fun (s : String) => if paren = true then toString "(" ++ toString s ++ toString ")" else s) (toString "Seq " ++ toString (elm.toString true))
- elm.nullable.toString paren = (fun (s : String) => if paren = true then toString "(" ++ toString s ++ toString ")" else s) (toString "Option " ++ toString (elm.toString true))
- (Cvc.Typ.prod []).toString paren = "Unit"
- (Cvc.Typ.prod [α]).toString paren = toString "(× " ++ toString α.toString ++ toString ")"
- (Cvc.Typ.prod args).toString paren = (fun (s : String) => if paren = true then toString "(" ++ toString s ++ toString ")" else s) (Cvc.Typ.tupleArgsFold args "")
- (Cvc.Typ.datatype name).toString paren = name
Instances For
String representation.
Equations
Instances For
Renders a record's fields, for Typ.toString.
Equations
- One or more equations did not get rendered due to their size.
- Cvc.Typ.fieldsFold [] x✝ = x✝