Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Auto/Translation/LamReif.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,6 @@ def reifMapLam0Arg2NoLit : Std.HashMap (Name × Name) (Expr × LamTerm) :=
Std.HashMap.ofList [
((``NatCast.natCast, ``Int), (.const ``Int.ofNat [], .base .iofNat)),
((``Neg.neg, ``Int), (.const ``Int.neg [], .base .ineg)),
((`Abs.abs, ``Int), (.const ``Int.abs [], .base .iabs)),
((``LE.le, ``Nat), (.const ``Nat.le [], .base .nle)),
((``LE.le, ``Int), (.const ``Int.le [], .base .ile)),
((``LE.le, ``String), (.const ``String.le [], .base .sle)),
Expand Down Expand Up @@ -1381,6 +1380,14 @@ def processLam0Arg3 (e fn arg₁ arg₂ _arg₃ : Expr) : MetaM (Option LamTerm)
return .some (.base (.bvVal n nv))
return .none
| _ => return .none
| .const `abs _ =>
match arg₁ with
| .const ``Int _ =>
if (← Meta.isDefEqD fn (.const `abs [.zero])) then
return .some (.base .iabs)
else
return .none
| _ => return .none
| _ => return .none

def processLam0Arg4 (e fn arg₁ arg₂ _arg₃ _arg₄ : Expr) : MetaM (Option LamTerm) := do
Expand Down