Cached hash code, cached results, and other data for Level
.
hash : 32-bits
hasMVar : 1-bit
hasParam : 1-bit
depth : 24-bits
Equations
Instances For
Equations
Equations
Instances For
Equations
- Lean.instBEqData = { beq := fun (a b : UInt64) => a == b }
Equations
Instances For
Equations
- Lean.Level.Data.hasMVar c = (UInt64.land (UInt64.shiftRight c 32) 1 == 1)
Instances For
Equations
- Lean.Level.Data.hasParam c = (UInt64.land (UInt64.shiftRight c 33) 1 == 1)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.instInhabitedLevelMVarId = { default := { name := default } }
Equations
- Lean.instBEqLevelMVarId = { beq := Lean.beqLevelMVarId✝ }
Equations
- Lean.instHashableLevelMVarId = { hash := Lean.hashLevelMVarId✝ }
Equations
- Lean.instReprLevelMVarId = { reprPrec := Lean.reprLevelMVarId✝ }
Equations
- Lean.instReprLMVarId = { reprPrec := fun (n : Lean.LMVarId) (p : Nat) => reprPrec n.name p }
Equations
- Lean.LMVarIdSet = Lean.RBTree Lean.LMVarId fun (x x_1 : Lean.LMVarId) => Lean.Name.quickCmp x.name x_1.name
Instances For
Equations
- Lean.instForInLMVarIdSetLMVarId = inferInstanceAs (ForIn m (Lean.RBTree Lean.LMVarId fun (x x_1 : Lean.LMVarId) => Lean.Name.quickCmp x.name x_1.name) Lean.LMVarId)
Equations
- Lean.LMVarIdMap α = Lean.RBMap Lean.LMVarId α fun (x x_1 : Lean.LMVarId) => Lean.Name.quickCmp x.name x_1.name
Instances For
Equations
- Lean.instEmptyCollectionLMVarIdMap = inferInstanceAs (EmptyCollection (Lean.RBMap Lean.LMVarId α fun (x x_1 : Lean.LMVarId) => Lean.Name.quickCmp x.name x_1.name))
instance
Lean.instForInLMVarIdMapProdLMVarId
{m : Type u_1 → Type u_2}
{α : Type}
:
ForIn m (Lean.LMVarIdMap α) (Lean.LMVarId × α)
Equations
- Lean.instForInLMVarIdMapProdLMVarId = inferInstanceAs (ForIn m (Lean.RBMap Lean.LMVarId α fun (x x_1 : Lean.LMVarId) => Lean.Name.quickCmp x.name x_1.name) (Lean.LMVarId × α))
@[implemented_by Lean.Level.data._override]
Instances For
- zero: Lean.Level
- succ: Lean.Level → Lean.Level
- max: Lean.Level → Lean.Level → Lean.Level
- imax: Lean.Level → Lean.Level → Lean.Level
- param: Lake.Name → Lean.Level
- mvar: Lean.LMVarId → Lean.Level
Instances For
Equations
- Lean.instInhabitedLevel = { default := Lean.Level.zero }
Equations
- Lean.instReprLevel = { reprPrec := Lean.reprLevel✝ }
Equations
Instances For
Equations
- Lean.Level.instHashableLevel = { hash := Lean.Level.hash }
Equations
Instances For
Equations
Instances For
Equations
Instances For
@[export lean_level_hash]
Equations
Instances For
@[export lean_level_has_mvar]
Equations
Instances For
@[export lean_level_has_param]
Equations
Instances For
@[export lean_level_depth]
Equations
Instances For
Equations
- Lean.mkLevelMVar mvarId = Lean.Level.mvar mvarId
Instances For
Equations
- Lean.mkLevelParam name = Lean.Level.param name
Instances For
Equations
Instances For
Equations
- Lean.mkLevelMax u v = Lean.Level.max u v
Instances For
Equations
- Lean.mkLevelIMax u v = Lean.Level.imax u v
Instances For
Equations
Instances For
@[export lean_level_mk_zero]
Equations
Instances For
@[export lean_level_mk_succ]
Equations
Instances For
@[export lean_level_mk_mvar]
Equations
Instances For
@[export lean_level_mk_param]
Equations
Instances For
@[export lean_level_mk_max]
Equations
Instances For
@[export lean_level_mk_imax]
Equations
Instances For
Equations
- Lean.Level.isZero x = match x with | Lean.Level.zero => true | x => false
Instances For
Equations
- Lean.Level.isSucc x = match x with | Lean.Level.succ a => true | x => false
Instances For
Equations
- Lean.Level.isMax x = match x with | Lean.Level.max a a_1 => true | x => false
Instances For
Equations
- Lean.Level.isIMax x = match x with | Lean.Level.imax a a_1 => true | x => false
Instances For
Equations
- Lean.Level.isMaxIMax x = match x with | Lean.Level.max a a_1 => true | Lean.Level.imax a a_1 => true | x => false
Instances For
Equations
- Lean.Level.isParam x = match x with | Lean.Level.param a => true | x => false
Instances For
Equations
- Lean.Level.isMVar x = match x with | Lean.Level.mvar a => true | x => false
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
If result is true, then forall assignments A
which assigns all parameters and metavariables occurring
in l
, l[A] != zero
Equations
- Lean.Level.isNeverZero Lean.Level.zero = false
- Lean.Level.isNeverZero (Lean.Level.param a) = false
- Lean.Level.isNeverZero (Lean.Level.mvar a) = false
- Lean.Level.isNeverZero (Lean.Level.succ a) = true
- Lean.Level.isNeverZero (Lean.Level.max l₁ l₂) = (Lean.Level.isNeverZero l₁ || Lean.Level.isNeverZero l₂)
- Lean.Level.isNeverZero (Lean.Level.imax a l₂) = Lean.Level.isNeverZero l₂
Instances For
Equations
Instances For
Equations
- Lean.Level.instOfNat n = { ofNat := Lean.Level.ofNat n }
Equations
Instances For
Equations
Instances For
Equations
- Lean.Level.getOffsetAux (Lean.Level.succ u) x = Lean.Level.getOffsetAux u (x + 1)
- Lean.Level.getOffsetAux x✝ x = x
Instances For
Equations
- Lean.Level.getOffset lvl = Lean.Level.getOffsetAux lvl 0
Instances For
Equations
Instances For
Equations
- Lean.Level.toNat lvl = match Lean.Level.getLevelOffset lvl with | Lean.Level.zero => some (Lean.Level.getOffset lvl) | x => none
Instances For
Equations
- Lean.Level.instBEqLevel = { beq := Lean.Level.beq }
occurs u l
return true
iff u
occurs in l
.
Equations
- Lean.Level.occurs x (Lean.Level.succ v₁) = (x == Lean.Level.succ v₁ || Lean.Level.occurs x v₁)
- Lean.Level.occurs x (Lean.Level.max v₁ v₂) = (x == Lean.Level.max v₁ v₂ || Lean.Level.occurs x v₁ || Lean.Level.occurs x v₂)
- Lean.Level.occurs x (Lean.Level.imax v₁ v₂) = (x == Lean.Level.imax v₁ v₂ || Lean.Level.occurs x v₁ || Lean.Level.occurs x v₂)
- Lean.Level.occurs x✝ x = (x✝ == x)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
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
Instances For
Return true if u
and v
denote the same level.
Check is currently incomplete.
Equations
- Lean.Level.isEquiv u v = (u == v || Lean.Level.normalize u == Lean.Level.normalize v)
Instances For
Reduce (if possible) universe level by 1
Equations
- Lean.Level.dec Lean.Level.zero = none
- Lean.Level.dec (Lean.Level.param a) = none
- Lean.Level.dec (Lean.Level.mvar a) = none
- Lean.Level.dec (Lean.Level.succ a) = some a
- Lean.Level.dec (Lean.Level.max l₁ l₂) = do let __do_lift ← Lean.Level.dec l₁ let __do_lift_1 ← Lean.Level.dec l₂ pure (Lean.mkLevelMax __do_lift __do_lift_1)
- Lean.Level.dec (Lean.Level.imax a l₂) = do let __do_lift ← Lean.Level.dec a let __do_lift_1 ← Lean.Level.dec l₂ pure (Lean.mkLevelMax __do_lift __do_lift_1)
Instances For
- leaf: Lake.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
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Level.PP.Result.max x✝ x = match x✝, x with | f, Lean.Level.PP.Result.maxNode Fs => Lean.Level.PP.Result.maxNode (f :: Fs) | f₁, f₂ => Lean.Level.PP.Result.maxNode [f₁, f₂]
Instances For
Equations
- Lean.Level.PP.Result.imax x✝ x = match x✝, x with | f, Lean.Level.PP.Result.imaxNode Fs => Lean.Level.PP.Result.imaxNode (f :: Fs) | f₁, f₂ => Lean.Level.PP.Result.imaxNode [f₁, f₂]
Instances For
Equations
- Lean.Level.PP.toResult Lean.Level.zero = Lean.Level.PP.Result.num 0
- Lean.Level.PP.toResult (Lean.Level.succ a) = Lean.Level.PP.Result.succ (Lean.Level.PP.toResult a)
- Lean.Level.PP.toResult (Lean.Level.max a a_1) = 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) = Lean.Level.PP.Result.imax (Lean.Level.PP.toResult a) (Lean.Level.PP.toResult a_1)
- Lean.Level.PP.toResult (Lean.Level.param a) = Lean.Level.PP.Result.leaf a
- Lean.Level.PP.toResult (Lean.Level.mvar a) = let n := Lean.Name.replacePrefix a.name `_uniq (Lean.Name.mkSimple "?u"); Lean.Level.PP.Result.leaf n
Instances For
Equations
Instances For
Equations
- Lean.Level.instToFormatLevel = { format := fun (u : Lean.Level) => Lean.Level.format u }
Equations
- Lean.Level.instToStringLevel = { toString := fun (u : Lean.Level) => Lean.Format.pretty (Lean.Level.format u) }
Equations
- Lean.Level.quote u prec = Lean.Level.PP.Result.quote (Lean.Level.PP.toResult u) prec
Instances For
Equations
- Lean.Level.instQuoteLevelMkStr1 = Lean.Quote.mk `level fun (u : Lean.Level) => Lean.Level.quote u
Equations
- Lean.mkLevelMax' u v = Lean.mkLevelMaxCore u v fun (x : Unit) => Lean.mkLevelMax u v
Instances For
Equations
- Lean.simpLevelMax' u v d = Lean.mkLevelMaxCore u v fun (x : Unit) => d
Instances For
Equations
- Lean.mkLevelIMax' u v = Lean.mkLevelIMaxCore u v fun (x : Unit) => Lean.mkLevelIMax u v
Instances For
Equations
- Lean.simpLevelIMax' u v d = Lean.mkLevelIMaxCore u v fun (x : Unit) => d
Instances For
The update functions try to avoid allocating new values using pointer equality.
Note that if the update*!
functions are used under a match-expression,
the compiler will eliminate the double-match.
@[implemented_by _private.Lean.Level.0.Lean.Level.updateSucc!Impl]
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[implemented_by _private.Lean.Level.0.Lean.Level.updateMax!Impl]
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[implemented_by _private.Lean.Level.0.Lean.Level.updateIMax!Impl]
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Level.mkNaryMax [] = Lean.levelZero
- Lean.Level.mkNaryMax [u] = u
- Lean.Level.mkNaryMax (u :: us) = Lean.mkLevelMax' u (Lean.Level.mkNaryMax us)
Instances For
@[specialize #[]]
Equations
Instances For
Instances For
Equations
- Lean.Level.getParamSubst (p :: ps) (u :: us) x = if (p == x) = true then some u else Lean.Level.getParamSubst ps us x
- Lean.Level.getParamSubst x✝¹ x✝ x = none
Instances For
def
Lean.Level.instantiateParams
(u : Lean.Level)
(paramNames : List Lake.Name)
(vs : List Lean.Level)
:
Equations
- Lean.Level.instantiateParams u paramNames vs = Lean.Level.substParams u (Lean.Level.getParamSubst paramNames vs)
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Level.geq.go u Lean.Level.zero = (u == Lean.Level.zero || true)
- Lean.Level.geq.go u (Lean.Level.max v₁ v₂) = (u == Lean.Level.max v₁ v₂ || Lean.Level.geq.go u v₁ && Lean.Level.geq.go u v₂)
- Lean.Level.geq.go (Lean.Level.max u₁ u₂) v = (Lean.Level.max u₁ u₂ == v || (Lean.Level.geq.go u₁ v || Lean.Level.geq.go u₂ v))
- Lean.Level.geq.go u (Lean.Level.imax v₁ v₂) = (u == Lean.Level.imax v₁ v₂ || Lean.Level.geq.go u v₁ && Lean.Level.geq.go u v₂)
- Lean.Level.geq.go (Lean.Level.imax a u₂) v = (Lean.Level.imax a u₂ == v || Lean.Level.geq.go u₂ v)
- Lean.Level.geq.go (Lean.Level.succ u_2) (Lean.Level.succ v_2) = (Lean.Level.succ u_2 == Lean.Level.succ v_2 || Lean.Level.geq.go u_2 v_2)
Instances For
@[inline, reducible]
Equations
Instances For
@[inline, reducible]
Equations
Instances For
@[inline, reducible]
Equations
Instances For
@[inline, reducible]
Equations
Instances For
@[inline, reducible]
Equations
Instances For
Equations
- Lean.Level.collectMVars (Lean.Level.succ v) s = Lean.Level.collectMVars v s
- Lean.Level.collectMVars (Lean.Level.max u_2 v) s = Lean.Level.collectMVars u_2 (Lean.Level.collectMVars v s)
- Lean.Level.collectMVars (Lean.Level.imax u_2 v) s = Lean.Level.collectMVars u_2 (Lean.Level.collectMVars v s)
- Lean.Level.collectMVars (Lean.Level.mvar n) s = Lean.RBTree.insert s n
- Lean.Level.collectMVars u s = s
Instances For
Equations
- Lean.Level.find? u p = Lean.Level.find?.visit p u
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Level.find?.visit p (Lean.Level.succ v) = if p (Lean.Level.succ v) = true then pure (Lean.Level.succ v) else Lean.Level.find?.visit p v
- Lean.Level.find?.visit p u = if p u = true then pure u else failure
Instances For
Equations
- Lean.Level.any u p = Option.isSome (Lean.Level.find? u p)
Instances For
@[inline, reducible]