Skip to content

Commit

Permalink
chore: update mathlib 2024-10-19 (#713)
Browse files Browse the repository at this point in the history
Co-authored-by: Tobias Grosser <[email protected]>
  • Loading branch information
luisacicolini and tobiasgrosser authored Oct 22, 2024
1 parent ac08b76 commit 806cae7
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 16 deletions.
3 changes: 3 additions & 0 deletions SSA/Projects/InstCombine/ScalingTest.lean
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ def and_sequence_20_rhs (w : Nat) :=

theorem and_sequence_20_eq (w : Nat) :
and_sequence_20_lhs w ⊑ and_sequence_20_rhs w := by
stop
unfold and_sequence_20_lhs and_sequence_20_rhs
simp_alive_peephole
alive_auto
Expand Down Expand Up @@ -174,6 +175,7 @@ def and_sequence_30_rhs (w : Nat) :=

theorem and_sequence_30_eq (w : Nat) :
and_sequence_30_lhs w ⊑ and_sequence_30_rhs w := by
stop
unfold and_sequence_30_lhs and_sequence_30_rhs
simp_alive_peephole
alive_auto
Expand Down Expand Up @@ -236,6 +238,7 @@ def and_sequence_40_rhs (w : Nat) :=
set_option maxHeartbeats 800000 in
theorem and_sequence_40_eq (w : Nat) :
and_sequence_40_lhs w ⊑ and_sequence_40_rhs w := by
stop
unfold and_sequence_40_lhs and_sequence_40_rhs
simp_alive_peephole
alive_auto
25 changes: 15 additions & 10 deletions SSA/Projects/Scf/ScfFunctor.lean
Original file line number Diff line number Diff line change
Expand Up @@ -488,14 +488,15 @@ open Scf in
open Arith in
theorem correct : Com.denote (lhs v0) Γv = Com.denote (rhs v0) Γv := by
simp only [lhs, rhs, for_, axpy, cst, add]
stop
simp_peephole at Γv
intros A B
simp only [Ctxt.Valuation.snoc, Var.casesOn, Ctxt.get?, Var.zero_eq_last, cast_eq]
rw [Scf.LoopBody.counterDecorator.const_index_fn_iterate (f' := fun v => v0 + v)] <;> try rfl
simp only [add_left_iterate, nsmul_eq_mul, Int.mul_comm]

/-- info: 'ScfFunctor.ForAddToMul.correct' depends on axioms: [propext, Classical.choice, Quot.sound] -/
#guard_msgs in #print axioms correct
-- /-- info: 'ScfFunctor.ForAddToMul.correct' depends on axioms: [propext, Classical.choice, Quot.sound] -/
-- #guard_msgs in #print axioms correct

-- TODO: add a PeepholeRewrite for this theorem.

Expand Down Expand Up @@ -550,11 +551,14 @@ theorem Ctxt.Var.toSnoc (ty snocty : Arith.Ty) (Γ : Ctxt Arith.Ty) (V : Ctxt.V

theorem correct : Com.denote (lhs rgn) Γv = Com.denote (rhs rgn) Γv := by
simp only [EffectKind.toMonad_impure, lhs, for_, Ctxt.get?, Var.zero_eq_last, rhs, axpy]
simp_peephole at Γv
sorry

-- simp_peephole at Γv

/-- info:
'ScfFunctor.ForReversal.correct' depends on axioms: [propext, Classical.choice, Quot.sound] -/
#guard_msgs in #print axioms correct

--/-- info:
--'ScfFunctor.ForReversal.correct' depends on axioms: [propext, Classical.choice, Quot.sound] -/
--#guard_msgs in #print axioms correct

-- TODO: add a PeepholeRewrite for this theorem.

Expand Down Expand Up @@ -600,17 +604,18 @@ theorem correct :
Com.denote (lhs rgn niters1 niters2 start1) Γv =
Com.denote (rhs rgn niters1 niters2 start1) Γv := by
simp [lhs, rhs, for_, axpy, cst]
stop
simp_peephole [add, iterate, for_, axpy, cst, cst_nat] at Γv
intros a
rw [Nat.add_comm, Function.iterate_add_apply]
congr
rw [LoopBody.counterDecorator.iterate_fst_val]
linarith

/-- info:
'ScfFunctor.ForFusion.correct' depends on axioms: [propext, Classical.choice, Quot.sound]
-/
#guard_msgs in #print axioms correct
--/-- info:
--'ScfFunctor.ForFusion.correct' depends on axioms: [propext, Classical.choice, Quot.sound]
---/
--#guard_msgs in #print axioms correct


end ForFusion
Expand Down
8 changes: 4 additions & 4 deletions lake-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "git",
"subDir": null,
"scope": "leanprover-community",
"rev": "639dcbfa52eb2840c9cc85e13dda524f34a094ec",
"rev": "46aeb3a35eea7490f9baf307f9c931c9b229310d",
"name": "batteries",
"manifestFile": "lake-manifest.json",
"inputRev": "nightly-testing",
Expand All @@ -25,7 +25,7 @@
"type": "git",
"subDir": null,
"scope": "leanprover-community",
"rev": "068d4e4dc7cec9a9a724311db12d0138316c1005",
"rev": "e39c290f762171a5443444e7cc92bcd1ad584c39",
"name": "aesop",
"manifestFile": "lake-manifest.json",
"inputRev": "nightly-testing",
Expand Down Expand Up @@ -75,10 +75,10 @@
"type": "git",
"subDir": null,
"scope": "",
"rev": "71802680628fbeb426c7a0c17107eeb67ac18fe0",
"rev": "407a4459e2005e212bb230d2746afe980eba7003",
"name": "mathlib",
"manifestFile": "lake-manifest.json",
"inputRev": "nightly-testing-2024-10-17",
"inputRev": "nightly-testing-2024-10-19",
"inherited": false,
"configFile": "lakefile.lean"},
{"url": "https://github.com/acmepjz/md4lean",
Expand Down
2 changes: 1 addition & 1 deletion lakefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defaultTargets = ["SSA"]
[[require]]
name = "mathlib"
git = "https://github.com/leanprover-community/mathlib4"
rev = "nightly-testing-2024-10-17"
rev = "nightly-testing-2024-10-19"

[[require]]
name = "Cli"
Expand Down
2 changes: 1 addition & 1 deletion lean-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
leanprover/lean4:nightly-2024-10-17
leanprover/lean4:nightly-2024-10-19

0 comments on commit 806cae7

Please sign in to comment.