- opaque: Lean.ReducibilityHints
- abbrev: Lean.ReducibilityHints
- regular: UInt32 → Lean.ReducibilityHints
Equations
- Lean.instInhabitedReducibilityHints = { default := Lean.ReducibilityHints.opaque }
Equations
- Lean.ReducibilityHints.getHeightEx h = match h with | Lean.ReducibilityHints.regular h => h | x => 0
Equations
- Lean.ReducibilityHints.lt x x = match x, x with | Lean.ReducibilityHints.abbrev, Lean.ReducibilityHints.abbrev => false | Lean.ReducibilityHints.abbrev, x => true | Lean.ReducibilityHints.regular d₁, Lean.ReducibilityHints.regular d₂ => decide (d₁ < d₂) | Lean.ReducibilityHints.regular x, Lean.ReducibilityHints.opaque => true | x, x_1 => false
Equations
- Lean.ReducibilityHints.isAbbrev x = match x with | Lean.ReducibilityHints.abbrev => true | x => false
Equations
- Lean.ReducibilityHints.isRegular x = match x with | Lean.ReducibilityHints.regular x => true | x => false
Equations
- Lean.instInhabitedConstantVal = { default := { name := default, levelParams := default, type := default } }
Equations
- Lean.instInhabitedAxiomVal = { default := { toConstantVal := default, isUnsafe := default } }
def
Lean.mkAxiomValEx
(name : Lean.Name)
(levelParams : List Lean.Name)
(type : Lean.Expr)
(isUnsafe : Bool)
:
Equations
- Lean.mkAxiomValEx name levelParams type isUnsafe = { toConstantVal := { name := name, levelParams := levelParams, type := type }, isUnsafe := isUnsafe }
Equations
- Lean.AxiomVal.isUnsafeEx v = v.isUnsafe
- unsafe: Lean.DefinitionSafety
- safe: Lean.DefinitionSafety
- partial: Lean.DefinitionSafety
Equations
- Lean.instReprDefinitionSafety = { reprPrec := [anonymous] }
Equations
- Lean.instBEqDefinitionSafety = { beq := [anonymous] }
Equations
- Lean.instInhabitedDefinitionSafety = { default := Lean.DefinitionSafety.unsafe }
- value : Lean.Expr
- hints : Lean.ReducibilityHints
- safety : Lean.DefinitionSafety
Equations
- Lean.instInhabitedDefinitionVal = { default := { toConstantVal := default, value := default, hints := default, safety := default } }
def
Lean.mkDefinitionValEx
(name : Lean.Name)
(levelParams : List Lean.Name)
(type : Lean.Expr)
(val : Lean.Expr)
(hints : Lean.ReducibilityHints)
(safety : Lean.DefinitionSafety)
:
Equations
- Lean.mkDefinitionValEx name levelParams type val hints safety = { toConstantVal := { name := name, levelParams := levelParams, type := type }, value := val, hints := hints, safety := safety }
Equations
- Lean.DefinitionVal.getSafetyEx v = v.safety
Equations
- Lean.instInhabitedTheoremVal = { default := { toConstantVal := default, value := default } }
Equations
- Lean.instInhabitedOpaqueVal = { default := { toConstantVal := default, value := default, isUnsafe := default } }
def
Lean.mkOpaqueValEx
(name : Lean.Name)
(levelParams : List Lean.Name)
(type : Lean.Expr)
(val : Lean.Expr)
(isUnsafe : Bool)
:
Equations
- Lean.mkOpaqueValEx name levelParams type val isUnsafe = { toConstantVal := { name := name, levelParams := levelParams, type := type }, value := val, isUnsafe := isUnsafe }
Equations
- Lean.OpaqueVal.isUnsafeEx v = v.isUnsafe
Equations
- Lean.instInhabitedConstructor = { default := { name := default, type := default } }
- name : Lean.Name
- type : Lean.Expr
- ctors : List Lean.Constructor
Equations
- Lean.instInhabitedInductiveType = { default := { name := default, type := default, ctors := default } }
- axiomDecl: Lean.AxiomVal → Lean.Declaration
- defnDecl: Lean.DefinitionVal → Lean.Declaration
- thmDecl: Lean.TheoremVal → Lean.Declaration
- opaqueDecl: Lean.OpaqueVal → Lean.Declaration
- quotDecl: Lean.Declaration
- mutualDefnDecl: List Lean.DefinitionVal → Lean.Declaration
- inductDecl: List Lean.Name → Nat → List Lean.InductiveType → Bool → Lean.Declaration
Equations
- Lean.instInhabitedDeclaration = { default := Lean.Declaration.axiomDecl default }
def
Lean.mkInductiveDeclEs
(lparams : List Lean.Name)
(nparams : Nat)
(types : List Lean.InductiveType)
(isUnsafe : Bool)
:
Equations
- Lean.mkInductiveDeclEs lparams nparams types isUnsafe = Lean.Declaration.inductDecl lparams nparams types isUnsafe
Equations
- Lean.Declaration.isUnsafeInductiveDeclEx x = match x with | Lean.Declaration.inductDecl x x_1 x_2 isUnsafe => isUnsafe | x => false
@[specialize]
def
Lean.Declaration.foldExprM
{α : Type}
{m : Type → Type}
[inst : Monad m]
(d : Lean.Declaration)
(f : α → Lean.Expr → m α)
(a : α)
:
m α
Equations
- Lean.Declaration.foldExprM d f a = match d with | Lean.Declaration.quotDecl => pure a | Lean.Declaration.axiomDecl { toConstantVal := { name := x, levelParams := x_1, type := type }, isUnsafe := x_2 } => f a type | Lean.Declaration.defnDecl { toConstantVal := { name := x, levelParams := x_1, type := type }, value := value, hints := x_2, safety := x_3 } => do let a ← f a type f a value | Lean.Declaration.opaqueDecl { toConstantVal := { name := x, levelParams := x_1, type := type }, value := value, isUnsafe := x_2 } => do let a ← f a type f a value | Lean.Declaration.thmDecl { toConstantVal := { name := x, levelParams := x_1, type := type }, value := value } => do let a ← f a type f a value | Lean.Declaration.mutualDefnDecl vals => List.foldlM (fun a v => do let a ← f a v.toConstantVal.type f a v.value) a vals | Lean.Declaration.inductDecl x x_1 inductTypes x_2 => List.foldlM (fun a inductType => do let a ← f a inductType.type List.foldlM (fun a ctor => f a ctor.type) a inductType.ctors) a inductTypes
@[inline]
def
Lean.Declaration.forExprM
{m : Type → Type}
[inst : Monad m]
(d : Lean.Declaration)
(f : Lean.Expr → m Unit)
:
m Unit
Equations
- Lean.Declaration.forExprM d f = Lean.Declaration.foldExprM d (fun x a => f a) ()
Equations
- Lean.instInhabitedInductiveVal = { default := { toConstantVal := default, numParams := default, numIndices := default, all := default, ctors := default, isRec := default, isUnsafe := default, isReflexive := default, isNested := default } }
def
Lean.mkInductiveValEx
(name : Lean.Name)
(levelParams : List Lean.Name)
(type : Lean.Expr)
(numParams : Nat)
(numIndices : Nat)
(all : List Lean.Name)
(ctors : List Lean.Name)
(isRec : Bool)
(isUnsafe : Bool)
(isReflexive : Bool)
(isNested : Bool)
:
Equations
- Lean.mkInductiveValEx name levelParams type numParams numIndices all ctors isRec isUnsafe isReflexive isNested = { toConstantVal := { name := name, levelParams := levelParams, type := type }, numParams := numParams, numIndices := numIndices, all := all, ctors := ctors, isRec := isRec, isUnsafe := isUnsafe, isReflexive := isReflexive, isNested := isNested }
Equations
- Lean.InductiveVal.isRecEx v = v.isRec
Equations
- Lean.InductiveVal.isUnsafeEx v = v.isUnsafe
Equations
- Lean.InductiveVal.isReflexiveEx v = v.isReflexive
Equations
- Lean.InductiveVal.isNestedEx v = v.isNested
Equations
- Lean.InductiveVal.numCtors v = List.length v.ctors
Equations
- Lean.instInhabitedConstructorVal = { default := { toConstantVal := default, induct := default, cidx := default, numParams := default, numFields := default, isUnsafe := default } }
def
Lean.mkConstructorValEx
(name : Lean.Name)
(levelParams : List Lean.Name)
(type : Lean.Expr)
(induct : Lean.Name)
(cidx : Nat)
(numParams : Nat)
(numFields : Nat)
(isUnsafe : Bool)
:
Equations
- Lean.mkConstructorValEx name levelParams type induct cidx numParams numFields isUnsafe = { toConstantVal := { name := name, levelParams := levelParams, type := type }, induct := induct, cidx := cidx, numParams := numParams, numFields := numFields, isUnsafe := isUnsafe }
Equations
- Lean.ConstructorVal.isUnsafeEx v = v.isUnsafe
Equations
- Lean.instInhabitedRecursorRule = { default := { ctor := default, nfields := default, rhs := default } }
Equations
- Lean.instInhabitedRecursorVal = { default := { toConstantVal := default, all := default, numParams := default, numIndices := default, numMotives := default, numMinors := default, rules := default, k := default, isUnsafe := default } }
def
Lean.mkRecursorValEx
(name : Lean.Name)
(levelParams : List Lean.Name)
(type : Lean.Expr)
(all : List Lean.Name)
(numParams : Nat)
(numIndices : Nat)
(numMotives : Nat)
(numMinors : Nat)
(rules : List Lean.RecursorRule)
(k : Bool)
(isUnsafe : Bool)
:
Equations
- Lean.mkRecursorValEx name levelParams type all numParams numIndices numMotives numMinors rules k isUnsafe = { toConstantVal := { name := name, levelParams := levelParams, type := type }, all := all, numParams := numParams, numIndices := numIndices, numMotives := numMotives, numMinors := numMinors, rules := rules, k := k, isUnsafe := isUnsafe }
Equations
- Lean.RecursorVal.kEx v = v.k
Equations
- Lean.RecursorVal.isUnsafeEx v = v.isUnsafe
Equations
- Lean.RecursorVal.getMajorIdx v = v.numParams + v.numMotives + v.numMinors + v.numIndices
Equations
- Lean.RecursorVal.getFirstIndexIdx v = v.numParams + v.numMotives + v.numMinors
Equations
- Lean.RecursorVal.getFirstMinorIdx v = v.numParams + v.numMotives
Equations
- Lean.RecursorVal.getInduct v = Lean.Name.getPrefix v.toConstantVal.name
- type: Lean.QuotKind
- ctor: Lean.QuotKind
- lift: Lean.QuotKind
- ind: Lean.QuotKind
Equations
- Lean.instInhabitedQuotKind = { default := Lean.QuotKind.type }
Equations
- Lean.instInhabitedQuotVal = { default := { toConstantVal := default, kind := default } }
def
Lean.mkQuotValEx
(name : Lean.Name)
(levelParams : List Lean.Name)
(type : Lean.Expr)
(kind : Lean.QuotKind)
:
Equations
- Lean.mkQuotValEx name levelParams type kind = { toConstantVal := { name := name, levelParams := levelParams, type := type }, kind := kind }
Equations
- Lean.QuotVal.kindEx v = v.kind
- axiomInfo: Lean.AxiomVal → Lean.ConstantInfo
- defnInfo: Lean.DefinitionVal → Lean.ConstantInfo
- thmInfo: Lean.TheoremVal → Lean.ConstantInfo
- opaqueInfo: Lean.OpaqueVal → Lean.ConstantInfo
- quotInfo: Lean.QuotVal → Lean.ConstantInfo
- inductInfo: Lean.InductiveVal → Lean.ConstantInfo
- ctorInfo: Lean.ConstructorVal → Lean.ConstantInfo
- recInfo: Lean.RecursorVal → Lean.ConstantInfo
Equations
- Lean.instInhabitedConstantInfo = { default := Lean.ConstantInfo.axiomInfo default }
Equations
- Lean.ConstantInfo.toConstantVal x = match x with | Lean.ConstantInfo.defnInfo { toConstantVal := d, value := x, hints := x_1, safety := x_2 } => d | Lean.ConstantInfo.axiomInfo { toConstantVal := d, isUnsafe := x } => d | Lean.ConstantInfo.thmInfo { toConstantVal := d, value := x } => d | Lean.ConstantInfo.opaqueInfo { toConstantVal := d, value := x, isUnsafe := x_1 } => d | Lean.ConstantInfo.quotInfo { toConstantVal := d, kind := x } => d | Lean.ConstantInfo.inductInfo { toConstantVal := d, numParams := x, numIndices := x_1, all := x_2, ctors := x_3, isRec := x_4, isUnsafe := x_5, isReflexive := x_6, isNested := x_7 } => d | Lean.ConstantInfo.ctorInfo { toConstantVal := d, induct := x, cidx := x_1, numParams := x_2, numFields := x_3, isUnsafe := x_4 } => d | Lean.ConstantInfo.recInfo { toConstantVal := d, all := x, numParams := x_1, numIndices := x_2, numMotives := x_3, numMinors := x_4, rules := x_5, k := x_6, isUnsafe := x_7 } => d
Equations
- Lean.ConstantInfo.isUnsafe x = match x with | Lean.ConstantInfo.defnInfo v => v.safety == Lean.DefinitionSafety.unsafe | Lean.ConstantInfo.axiomInfo v => v.isUnsafe | Lean.ConstantInfo.thmInfo v => false | Lean.ConstantInfo.opaqueInfo v => v.isUnsafe | Lean.ConstantInfo.quotInfo v => false | Lean.ConstantInfo.inductInfo v => v.isUnsafe | Lean.ConstantInfo.ctorInfo v => v.isUnsafe | Lean.ConstantInfo.recInfo v => v.isUnsafe
Equations
Equations
- Lean.ConstantInfo.levelParams d = (Lean.ConstantInfo.toConstantVal d).levelParams
Equations
Equations
Equations
- Lean.ConstantInfo.value? x = match x with | Lean.ConstantInfo.defnInfo { toConstantVal := { name := x, levelParams := x_1, type := x_2 }, value := r, hints := x_3, safety := x_4 } => some r | Lean.ConstantInfo.thmInfo { toConstantVal := { name := x, levelParams := x_1, type := x_2 }, value := r } => some r | x => none
Equations
- Lean.ConstantInfo.hasValue x = match x with | Lean.ConstantInfo.defnInfo { toConstantVal := { name := x, levelParams := x_1, type := x_2 }, value := r, hints := x_3, safety := x_4 } => true | Lean.ConstantInfo.thmInfo { toConstantVal := { name := x, levelParams := x_1, type := x_2 }, value := r } => true | x => false
Equations
- Lean.ConstantInfo.value! x = match x with | Lean.ConstantInfo.defnInfo { toConstantVal := { name := x, levelParams := x_1, type := x_2 }, value := r, hints := x_3, safety := x_4 } => r | Lean.ConstantInfo.thmInfo { toConstantVal := { name := x, levelParams := x_1, type := x_2 }, value := r } => r | x => panicWithPosWithDecl "Lean.Declaration" "Lean.ConstantInfo.value!" 367 33 "declaration with value expected"
Equations
- Lean.ConstantInfo.hints x = match x with | Lean.ConstantInfo.defnInfo { toConstantVal := { name := x, levelParams := x_1, type := x_2 }, value := x_3, hints := r, safety := x_4 } => r | x => Lean.ReducibilityHints.opaque
Equations
- Lean.ConstantInfo.isCtor x = match x with | Lean.ConstantInfo.ctorInfo x => true | x => false
Equations
- Lean.ConstantInfo.isInductive x = match x with | Lean.ConstantInfo.inductInfo x => true | x => false
@[extern lean_instantiate_type_lparams]
constant
Lean.ConstantInfo.instantiateTypeLevelParams
(c : Lean.ConstantInfo)
(ls : List Lean.Level)
:
@[extern lean_instantiate_value_lparams]
constant
Lean.ConstantInfo.instantiateValueLevelParams
(c : Lean.ConstantInfo)
(ls : List Lean.Level)
:
Equations
- Lean.mkRecName declName = Lean.Name.mkStr declName "rec"