Cached hash code, cached results, and other data for Level
.
hash : 32-bits
hasMVar : 1-bit
hasParam : 1-bit
depth : 24-bits
Instances For
instance
Lean.instForInLMVarIdMapProdLMVarId
{m : Type u_1 → Type u_2}
{α : Type}
:
ForIn m (Lean.LMVarIdMap α) (Lean.LMVarId × α)
- 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
@[implemented_by Lean.Level.data._override]
Equations
- One or more equations did not get rendered due to their size.
- Lean.Level.data Lean.Level.zero = Lean.Level.mkData 2221 0 false
- Lean.Level.data (Lean.Level.mvar mvarId) = Lean.Level.mkData (mixHash 2237 (hash mvarId)) 0 true
- Lean.Level.data (Lean.Level.param name) = Lean.Level.mkData (mixHash 2239 (hash name)) 0 false true
Instances For
@[export lean_level_mk_max]
Instances For
@[export lean_level_mk_imax]
Instances For
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 = 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
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
Instances For
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
Return true if u
and v
denote the same level.
Check is currently incomplete.
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
Instances For
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
Instances For
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]
Instances For
@[implemented_by _private.Lean.Level.0.Lean.Level.updateMax!Impl]
Instances For
@[implemented_by _private.Lean.Level.0.Lean.Level.updateIMax!Impl]
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 #[]]
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Level.substParams.go s Lean.Level.zero = Lean.Level.zero
- Lean.Level.substParams.go s (Lean.Level.param n) = match s n with | some u' => u' | none => Lean.Level.param n
- Lean.Level.substParams.go s u = u
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)
:
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
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
- 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