Equations
- Lean.Data.AC.instInhabitedExpr = { default := Lean.Data.AC.Expr.var default }
Equations
- Lean.Data.AC.instReprExpr = { reprPrec := Lean.Data.AC.reprExpr✝ }
Equations
- Lean.Data.AC.instBEqExpr = { beq := Lean.Data.AC.beqExpr✝ }
- value : α
- neutral : Option (PLift (Std.LawfulIdentity op self.value))
Instances For
- op : α → α → α
- assoc : Std.Associative self.op
- comm : Option (PLift (Std.Commutative self.op))
- idem : Option (PLift (Std.IdempotentOp self.op))
- arbitrary : α
Instances For
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.Data.AC.eval β ctx (Lean.Data.AC.Expr.var a) = Lean.Data.AC.EvalInformation.evalVar ctx a
- Lean.Data.AC.eval β ctx (a.op a_1) = Lean.Data.AC.EvalInformation.evalOp ctx (Lean.Data.AC.eval β ctx a) (Lean.Data.AC.eval β ctx a_1)
Instances For
Equations
- (Lean.Data.AC.Expr.var a).toList = [a]
- (a.op a_1).toList = a.toList.append a_1.toList
Instances For
Equations
- Lean.Data.AC.evalList β ctx [] = Lean.Data.AC.EvalInformation.arbitrary ctx
- Lean.Data.AC.evalList β ctx [x_1] = Lean.Data.AC.EvalInformation.evalVar ctx x_1
- Lean.Data.AC.evalList β ctx (x_1 :: xs) = Lean.Data.AC.EvalInformation.evalOp ctx (Lean.Data.AC.EvalInformation.evalVar ctx x_1) (Lean.Data.AC.evalList β ctx xs)
Instances For
Equations
- Lean.Data.AC.insert x [] = [x]
- Lean.Data.AC.insert x (a :: as) = if x < a then x :: a :: as else a :: Lean.Data.AC.insert x as
Instances For
Equations
- Lean.Data.AC.sort xs = Lean.Data.AC.sort.loop [] xs
Instances For
Equations
- Lean.Data.AC.sort.loop x✝ [] = x✝
- Lean.Data.AC.sort.loop x✝ (x_2 :: xs) = Lean.Data.AC.sort.loop (Lean.Data.AC.insert x_2 x✝) xs
Instances For
Equations
- Lean.Data.AC.mergeIdem [] = []
- Lean.Data.AC.mergeIdem (a :: as) = Lean.Data.AC.mergeIdem.loop a as
Instances For
Equations
- Lean.Data.AC.mergeIdem.loop x✝ (next :: rest) = if x✝ = next then Lean.Data.AC.mergeIdem.loop x✝ rest else x✝ :: Lean.Data.AC.mergeIdem.loop next rest
- Lean.Data.AC.mergeIdem.loop x✝ [] = [x✝]
Instances For
Equations
- Lean.Data.AC.removeNeutrals ctx (x_1 :: xs) = match Lean.Data.AC.removeNeutrals.loop ctx (x_1 :: xs) with | [] => [x_1] | ys => ys
- Lean.Data.AC.removeNeutrals ctx [] = []
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Data.AC.removeNeutrals.loop ctx [] = []
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
noncomputable def
Lean.Data.AC.List.two_step_induction
{motive : List Nat → Sort u}
(l : List Nat)
(empty : motive [])
(single : (a : Nat) → motive [a])
(step : (a b : Nat) → (l : List Nat) → motive (b :: l) → motive (a :: b :: l))
:
motive l
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
Lean.Data.AC.Context.unwrap_isNeutral
{α : Sort u_1}
{ctx : Context α}
{x : Nat}
:
ContextInformation.isNeutral ctx x = true →
Std.LawfulIdentity (EvalInformation.evalOp ctx) (EvalInformation.evalVar ctx x)
theorem
Lean.Data.AC.Context.evalList_removeNeutrals
{α : Sort u_1}
(ctx : Context α)
(e : List Nat)
:
evalList α ctx (removeNeutrals ctx e) = evalList α ctx e