Cached hash code, cached results, and other data for Level
.
hash : 32-bits
hasMVar : 1-bit
hasParam : 1-bit
depth : 24-bits
Equations
Equations
Equations
- Lean.instBEqData = { beq := fun a b => a == b }
Equations
Equations
- Lean.Level.Data.hasMVar c = (UInt64.land (UInt64.shiftRight c 32) 1 == 1)
Equations
- Lean.Level.Data.hasParam c = (UInt64.land (UInt64.shiftRight c 33) 1 == 1)
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.instInhabitedMVarId = { default := { name := default } }
Equations
- Lean.instBEqMVarId = { beq := [anonymous] }
Equations
- Lean.instHashableMVarId = { hash := [anonymous] }
Equations
- Lean.instReprMVarId = { reprPrec := [anonymous] }
Equations
- Lean.instReprMVarId_1 = { reprPrec := fun n p => reprPrec n.name p }
Equations
- Lean.MVarIdSet = Std.RBTree Lean.MVarId fun a a_1 => Lean.Name.quickCmp a.name a_1.name
Equations
- Lean.instForInMVarIdSetMVarId = inferInstanceAs (ForIn m (Std.RBTree Lean.MVarId fun a a_1 => Lean.Name.quickCmp a.name a_1.name) Lean.MVarId)
Equations
- Lean.MVarIdMap α = Std.RBMap Lean.MVarId α fun a a_1 => Lean.Name.quickCmp a.name a_1.name
Equations
- Lean.instEmptyCollectionMVarIdMap = inferInstanceAs (EmptyCollection (Std.RBMap Lean.MVarId α fun a a_1 => Lean.Name.quickCmp a.name a_1.name))
instance
Lean.instForInMVarIdMapProdMVarId
{m : Type u_1 → Type u_2}
{α : Type}
:
ForIn m (Lean.MVarIdMap α) (Lean.MVarId × α)
Equations
- Lean.instForInMVarIdMapProdMVarId = inferInstanceAs (ForIn m (Std.RBMap Lean.MVarId α fun a a_1 => Lean.Name.quickCmp a.name a_1.name) (Lean.MVarId × α))
- zero: Lean.Level.Data → Lean.Level
- succ: Lean.Level → Lean.Level.Data → Lean.Level
- max: Lean.Level → Lean.Level → Lean.Level.Data → Lean.Level
- imax: Lean.Level → Lean.Level → Lean.Level.Data → Lean.Level
- param: Lean.Name → Lean.Level.Data → Lean.Level
- mvar: Lean.MVarId → Lean.Level.Data → Lean.Level
Equations
- Lean.instInhabitedLevel = { default := Lean.Level.zero default }
Equations
- Lean.instReprLevel = { reprPrec := [anonymous] }
@[inline]
Equations
- One or more equations did not get rendered due to their size.
Equations
Equations
- Lean.Level.instHashableLevel = { hash := Lean.Level.hash }
Equations
Equations
Equations
@[export lean_level_hash]
Equations
@[export lean_level_has_mvar]
Equations
@[export lean_level_has_param]
Equations
@[export lean_level_depth]
Equations
Equations
- Lean.levelZero = Lean.Level.zero (Lean.Level.mkData 2221 0 false)
Equations
- Lean.mkLevelMVar mvarId = Lean.Level.mvar mvarId (Lean.Level.mkData (mixHash 2237 (hash mvarId)) 0 true)
Equations
- Lean.mkLevelParam name = Lean.Level.param name (Lean.Level.mkData (mixHash 2239 (hash name)) 0 false true)
Equations
- Lean.mkLevelSucc u = Lean.Level.succ u (Lean.Level.mkData (mixHash 2243 (hash u)) (Lean.Level.depth u + 1) (Lean.Level.hasMVar u) (Lean.Level.hasParam u))
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.
@[export lean_level_mk_zero]
Equations
@[export lean_level_mk_succ]
Equations
@[export lean_level_mk_mvar]
Equations
@[export lean_level_mk_param]
Equations
@[export lean_level_mk_max]
Equations
@[export lean_level_mk_imax]
Equations
Equations
- Lean.Level.isZero _fun_discr = match _fun_discr with | Lean.Level.zero a => true | x => false
Equations
- Lean.Level.isSucc _fun_discr = match _fun_discr with | Lean.Level.succ a a_1 => true | x => false
Equations
- Lean.Level.isMax _fun_discr = match _fun_discr with | Lean.Level.max a a_1 a_2 => true | x => false
Equations
- Lean.Level.isIMax _fun_discr = match _fun_discr with | Lean.Level.imax a a_1 a_2 => true | x => false
Equations
- Lean.Level.isMaxIMax _fun_discr = match _fun_discr with | Lean.Level.max a a_1 a_2 => true | Lean.Level.imax a a_1 a_2 => true | x => false
Equations
- Lean.Level.isParam _fun_discr = match _fun_discr with | Lean.Level.param a a_1 => true | x => false
Equations
- Lean.Level.isMVar _fun_discr = match _fun_discr with | Lean.Level.mvar a a_1 => true | x => false
Equations
- One or more equations did not get rendered due to their size.
If result is true, then forall assignments A
which assigns all parameters and metavariables occuring
in l
, l[A] != zero
Equations
- Lean.Level.isNeverZero (Lean.Level.zero a) = false
- Lean.Level.isNeverZero (Lean.Level.param a a_1) = false
- Lean.Level.isNeverZero (Lean.Level.mvar a a_1) = false
- Lean.Level.isNeverZero (Lean.Level.succ a a_1) = true
- Lean.Level.isNeverZero (Lean.Level.max l₁ l₂ a) = (Lean.Level.isNeverZero l₁ || Lean.Level.isNeverZero l₂)
- Lean.Level.isNeverZero (Lean.Level.imax a l₂ a_1) = Lean.Level.isNeverZero l₂
Equations
Equations
- Lean.Level.addOffsetAux 0 _fun_discr = _fun_discr
- Lean.Level.addOffsetAux (Nat.succ n) _fun_discr = Lean.Level.addOffsetAux n (Lean.mkLevelSucc _fun_discr)
Equations
Equations
- Lean.Level.getOffsetAux (Lean.Level.succ u a) _fun_discr = Lean.Level.getOffsetAux u (_fun_discr + 1)
- Lean.Level.getOffsetAux _fun_discr _fun_discr = _fun_discr
Equations
- Lean.Level.getOffset lvl = Lean.Level.getOffsetAux lvl 0
Equations
- Lean.Level.getLevelOffset (Lean.Level.succ a a_1) = Lean.Level.getLevelOffset a
- Lean.Level.getLevelOffset _fun_discr = _fun_discr
Equations
- Lean.Level.toNat lvl = match Lean.Level.getLevelOffset lvl with | Lean.Level.zero a => some (Lean.Level.getOffset lvl) | x => none
Equations
- Lean.Level.instBEqLevel = { beq := Lean.Level.beq }
occurs u l
return true
iff u
occurs in l
.
Equations
- Lean.Level.occurs _fun_discr (Lean.Level.succ v₁ a) = (_fun_discr == Lean.Level.succ v₁ a || Lean.Level.occurs _fun_discr v₁)
- Lean.Level.occurs _fun_discr (Lean.Level.max v₁ v₂ a) = (_fun_discr == Lean.Level.max v₁ v₂ a || Lean.Level.occurs _fun_discr v₁ || Lean.Level.occurs _fun_discr v₂)
- Lean.Level.occurs _fun_discr (Lean.Level.imax v₁ v₂ a) = (_fun_discr == Lean.Level.imax v₁ v₂ a || Lean.Level.occurs _fun_discr v₁ || Lean.Level.occurs _fun_discr v₂)
- Lean.Level.occurs _fun_discr _fun_discr = (_fun_discr == _fun_discr)
Equations
- One or more equations did not get rendered due to their size.
A total order on level expressions that has the following properties
succ l
is an immediate successor ofl
.zero
is the minimal element. This total order is used in the normalization procedure.
Equations
- Lean.Level.normLt l₁ l₂ = Lean.Level.normLtAux l₁ 0 l₂ 0
Equations
- Lean.Level.isEquiv u v = (u == v || Lean.Level.normalize u == Lean.Level.normalize v)
Reduce (if possible) universe level by 1
Equations
- Lean.Level.dec (Lean.Level.zero a) = none
- Lean.Level.dec (Lean.Level.param a a_1) = none
- Lean.Level.dec (Lean.Level.mvar a a_1) = none
- Lean.Level.dec (Lean.Level.succ a a_1) = some a
- Lean.Level.dec (Lean.Level.max l₁ l₂ a) = do let a ← Lean.Level.dec l₁ let a_1 ← Lean.Level.dec l₂ pure (Lean.mkLevelMax a a_1)
- Lean.Level.dec (Lean.Level.imax a l₂ a_1) = do let a ← Lean.Level.dec a let a_1 ← Lean.Level.dec l₂ pure (Lean.mkLevelMax a a_1)
- leaf: Lean.Name → Lean.Level.PP.Result
- num: Nat → Lean.Level.PP.Result
- offset: Lean.Level.PP.Result → Nat → Lean.Level.PP.Result
- maxNode: List Lean.Level.PP.Result → Lean.Level.PP.Result
- imaxNode: List Lean.Level.PP.Result → Lean.Level.PP.Result
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.
Equations
- Lean.Level.PP.toResult (Lean.Level.zero a) = Lean.Level.PP.Result.num 0
- Lean.Level.PP.toResult (Lean.Level.succ a a_1) = Lean.Level.PP.Result.succ (Lean.Level.PP.toResult a)
- Lean.Level.PP.toResult (Lean.Level.max a a_1 a_2) = Lean.Level.PP.Result.max (Lean.Level.PP.toResult a) (Lean.Level.PP.toResult a_1)
- Lean.Level.PP.toResult (Lean.Level.imax a a_1 a_2) = Lean.Level.PP.Result.imax (Lean.Level.PP.toResult a) (Lean.Level.PP.toResult a_1)
- Lean.Level.PP.toResult (Lean.Level.param a a_1) = Lean.Level.PP.Result.leaf a
- Lean.Level.PP.toResult (Lean.Level.mvar a a_1) = let n := Lean.Name.replacePrefix a.name `_uniq (Lean.Name.mkSimple "?u"); Lean.Level.PP.Result.leaf n
Equations
Equations
- Lean.Level.instToFormatLevel = { format := fun u => Lean.Level.format u }
Equations
- Lean.Level.instToStringLevel = { toString := fun u => Lean.Format.pretty (Lean.Level.format u) }
Equations
- Lean.Level.quote u prec = Lean.Level.PP.Result.quote (Lean.Level.PP.toResult u) prec
Equations
- Lean.Level.instQuoteLevelMkStrAnonymous = Lean.Quote.mk `level fun u => Lean.Level.quote u
@[export lean_level_mk_max_simp]
Equations
- One or more equations did not get rendered due to their size.
@[export lean_level_mk_imax_simp]
Equations
- One or more equations did not get rendered due to their size.
@[extern lean_level_update_succ]
def
Lean.Level.updateSucc
(lvl : Lean.Level)
(newLvl : Lean.Level)
(h : Lean.Level.isSucc lvl = true)
:
Equations
- Lean.Level.updateSucc lvl newLvl h = Lean.mkLevelSucc newLvl
@[inline]
Equations
- One or more equations did not get rendered due to their size.
@[extern lean_level_update_max]
def
Lean.Level.updateMax
(lvl : Lean.Level)
(newLhs : Lean.Level)
(newRhs : Lean.Level)
(h : Lean.Level.isMax lvl = true)
:
Equations
- Lean.Level.updateMax lvl newLhs newRhs h = Lean.mkLevelMax' newLhs newRhs
@[inline]
Equations
- One or more equations did not get rendered due to their size.
@[extern lean_level_update_imax]
def
Lean.Level.updateIMax
(lvl : Lean.Level)
(newLhs : Lean.Level)
(newRhs : Lean.Level)
(h : Lean.Level.isIMax lvl = true)
:
Equations
- Lean.Level.updateIMax lvl newLhs newRhs h = Lean.mkLevelIMax' newLhs newRhs
@[inline]
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Level.mkNaryMax [] = Lean.levelZero
- Lean.Level.mkNaryMax [u] = u
- Lean.Level.mkNaryMax (u :: us) = Lean.mkLevelMax' u (Lean.Level.mkNaryMax us)
@[specialize]
Equations
- One or more equations did not get rendered due to their size.
- Lean.Level.instantiateParams s (Lean.Level.zero a) = Lean.Level.zero a
- Lean.Level.instantiateParams s (Lean.Level.param n a) = match s n with | some u' => u' | none => Lean.Level.param n a
- Lean.Level.instantiateParams s _fun_discr = _fun_discr
Equations
@[inline]
Equations
@[inline]
Equations
@[inline]
Equations
Equations
- Lean.Level.collectMVars (Lean.Level.succ v a) s = Lean.Level.collectMVars v s
- Lean.Level.collectMVars (Lean.Level.max u_2 v a) s = Lean.Level.collectMVars u_2 (Lean.Level.collectMVars v s)
- Lean.Level.collectMVars (Lean.Level.imax u_2 v a) s = Lean.Level.collectMVars u_2 (Lean.Level.collectMVars v s)
- Lean.Level.collectMVars (Lean.Level.mvar n a) s = Std.RBTree.insert s n
- Lean.Level.collectMVars u s = s
Equations
- Lean.Level.find? u p = Lean.Level.find?.visit p u
Equations
- One or more equations did not get rendered due to their size.
- Lean.Level.find?.visit p (Lean.Level.succ v a) = if p (Lean.Level.succ v a) = true then pure (Lean.Level.succ v a) else Lean.Level.find?.visit p v
- Lean.Level.find?.visit p u = if p u = true then pure u else failure
Equations
- Lean.Level.any u p = Option.isSome (Lean.Level.find? u p)