@@ -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]
0 commit comments