Skip to content

Commit 7f6aec4

Browse files
committed
Misc fixes
1 parent be024c8 commit 7f6aec4

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Auto/Parser/SMTParser.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def smtSymbolToLeanName (s : String) : List (Name × SymbolInput) :=
253253
| "-" => [(``HSub.hSub, Minus)] -- Minus is left-associative when given ≥ 2 arguments but is also used for unary negation
254254
| "nsub" => [(``Nat.sub, Minus)]
255255
| "*" => [(``HMul.hMul, LeftAssocNoConstraint)]
256-
| "/" => [(``HDiv.hDiv, LeftAssocNoConstraint)]
256+
| "div" => [(``Int.ediv, LeftAssocNoConstraint)]
257257
| "or" => [(``Or, LeftAssocAllProp), (``or, LeftAssocAllBool)]
258258
| "and" => [(``And, LeftAssocAllProp), (``and, LeftAssocAllBool)]
259259
| "not" => [(``Not, UnaryProp), (``not, UnaryBool)]
@@ -276,7 +276,7 @@ def builtInSymbolMap : Std.HashMap String Expr :=
276276
let map := map.insert "-" (mkConst ``HSub.hSub)
277277
let map := map.insert "nsub" (mkConst ``Nat.sub)
278278
let map := map.insert "*" (mkConst ``HMul.hMul)
279-
let map := map.insert "/" (mkConst ``HDiv.hDiv)
279+
let map := map.insert "div" (mkConst ``Int.ediv)
280280
let map := map.insert "or" (mkConst ``Or)
281281
let map := map.insert "and" (mkConst ``And)
282282
let map := map.insert "not" (mkConst ``Not)
@@ -357,7 +357,7 @@ def correctType (e : Expr) (parseTermConstraint : ParseTermConstraint) : MetaM E
357357
else return e
358358
| expectedType t => do
359359
if ← isDefEq eType t then return e
360-
else if eType.isProp && (← isDefEq t (mkConst ``Bool)) then whnf $ ← mkAppOptM ``decide #[some e, none]
360+
else if eType.isProp && (← isDefEq t (mkConst ``Bool)) then whnf $ ← mkAppOptM ``decide #[some e, ← mkAppM ``Classical.propDecidable #[e]]
361361
else if (← isDefEq eType (mkConst ``Bool)) && t.isProp then whnf $ ← mkAppM ``Eq #[e, mkConst ``true]
362362
else if (← isDefEq eType (mkConst ``Nat)) && (← isDefEq t (mkConst ``Int)) then return ← mkAppM ``Int.ofNat #[e]
363363
else if (← isDefEq eType (mkConst ``Int)) && (← isDefEq t (mkConst ``Nat)) then return ← mkAppM ``Int.natAbs #[e]

Auto/Tactic.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -995,6 +995,7 @@ def ppOptionsSetting (o : Options) : Options :=
995995
let o := o.set `pp.analyze true
996996
let o := o.set `pp.proofs true
997997
let o := o.set `pp.funBinderTypes true
998+
let o := o.set `pp.analyze.trustOfNat false
998999
o.set `pp.piBinderTypes true
9991000

10001001
@[tactic autoGetHints]

0 commit comments

Comments
 (0)