Skip to content

Commit

Permalink
Real polynorm (#157)
Browse files Browse the repository at this point in the history
* Implement Real polynorm.

* Explicit casts.
  • Loading branch information
abdoo8080 authored Dec 17, 2024
1 parent ed0b650 commit 9ad1c39
Show file tree
Hide file tree
Showing 4 changed files with 397 additions and 36 deletions.
2 changes: 1 addition & 1 deletion Smt/Reconstruct/Int.lean
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ where
if !pf.getResult[0]!.getSort.isInteger then return none
let a : Q(Int) ← reconstructTerm pf.getResult[0]!
let b : Q(Int) ← reconstructTerm pf.getResult[1]!
addTac q($a = $b) Int.nativePolyNorm
addTac q($a = $b) Int.polyNorm
| .ARITH_POLY_NORM_REL =>
if !pf.getChildren[0]!.getResult[0]![0]!.getSort.isInteger then return none
reconstructArithPolyNormRel pf
Expand Down
2 changes: 1 addition & 1 deletion Smt/Reconstruct/Rat.lean
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ where
if pf.getResult[0]!.getSort.isInteger then return none
let a : Q(Rat) ← reconstructTerm pf.getResult[0]!
let b : Q(Rat) ← reconstructTerm pf.getResult[1]!
addTac q($a = $b) Rat.nativePolyNorm
addTac q($a = $b) Rat.polyNorm
| .ARITH_POLY_NORM_REL =>
if pf.getChildren[0]!.getResult[0]![0]!.getSort.isInteger then return none
reconstructArithPolyNormRel pf
Expand Down
2 changes: 1 addition & 1 deletion Smt/Reconstruct/Rat/Polynorm.lean
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ end Smt.Reconstruct.Rat.Tactic
example (x y z : Rat) : 1 * (x + y) * z / 4 = 1 / (2 * 2) * (z * y + x * z) := by
poly_norm

example (x y : Int) (z : Rat) : 1 * (x + y) * z / 4 = 1 / (2 * 2) * (z * y + x * z) := by
example (x y : Int) (z : Rat) : 1 * (x + y) * z / 4 = 1 / (2 * 2) * (z * y + x * z) := by
poly_norm

example (x y : Int) (z : Rat) : 1 * ↑(x + y) * z / 4 = 1 / (2 * 2) * (z * ↑y + ↑x * z) := by
Expand Down
Loading

0 comments on commit 9ad1c39

Please sign in to comment.