parent
892bfe2c5f
commit
280525f1fc
2 changed files with 15 additions and 1 deletions
|
|
@ -82,8 +82,10 @@ private partial def mkKey (e : Expr) : CanonM Key := do
|
|||
return key
|
||||
else
|
||||
let key ← match e with
|
||||
| .sort .. | .fvar .. | .bvar .. | .const .. | .lit .. =>
|
||||
| .sort .. | .fvar .. | .bvar .. | .lit .. =>
|
||||
pure { e := (← shareCommon e) }
|
||||
| .const n ls =>
|
||||
pure { e := (← shareCommon (.const n (List.replicate ls.length levelZero))) }
|
||||
| .mvar .. =>
|
||||
-- We instantiate assigned metavariables because the
|
||||
-- pretty-printer also instantiates them.
|
||||
|
|
|
|||
12
tests/lean/run/issue3848.lean
Normal file
12
tests/lean/run/issue3848.lean
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
theorem sizeOf_snd_lt_sizeOf_list
|
||||
{α : Type u} {β : Type v} [SizeOf α] [SizeOf β] {x : α × β} {xs : List (α × β)} :
|
||||
x ∈ xs → sizeOf x.snd < 1 + sizeOf xs
|
||||
:= by
|
||||
intro h
|
||||
have h1 := List.sizeOf_lt_of_mem h
|
||||
have h2 : sizeOf x = 1 + sizeOf x.1 + sizeOf x.2 := rfl
|
||||
cases x; dsimp at *
|
||||
omega -- this only works if universe levels are normalizes by the omega canonicalizier
|
||||
|
||||
-- another example
|
||||
theorem ex.{u,v} : sizeOf PUnit.{(max u v) + 1} = sizeOf PUnit.{max (u + 1) (v + 1)} := by omega
|
||||
Loading…
Add table
Reference in a new issue