-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - feat: port LinearAlgebra.CliffordAlgebra.Grading #5349
Conversation
-- TODO: this `simp_rw` is not actually doing anything, lean4#1926 | ||
simp_rw [Subtype.coe_mk, ZMod.nat_coe_zmod_eq_iff, add_comm n.val] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leanprover/lean4#1926. The proof fails without the effect this line is supposed to have.
This PR/issue depends on:
|
Mathbin -> Mathlib fix certain import statements move "by" to end of line add import to Mathlib.lean
dc23f95
to
3ced1df
Compare
simp_rw [Subtype.coe_mk, ZMod.nat_coe_zmod_eq_iff, add_comm n.val] | ||
-- porting note: was `simp_rw [Subtype.coe_mk, ZMod.nat_coe_zmod_eq_iff, add_comm n.val]` | ||
-- leanprover/lean4#1926 is to blame. | ||
dsimp only [Subtype.coe_mk] | ||
let hlean1926 : ∀ val : ℕ, ↑val = n ↔ ∃ k, val = 2 * k + ZMod.val n := by | ||
intro val | ||
simp_rw [ZMod.nat_coe_zmod_eq_iff, add_comm n.val] | ||
have := fun val : ℕ => forall_prop_congr' | ||
(q := fun property => ∀ x (hx : x ∈ LinearMap.range (ι Q) ^ val), | ||
P x (Submodule.mem_iSup_of_mem { val := val, property := property } hx)) | ||
(hq := fun property => Iff.rfl) (hp := hlean1926 val) | ||
simp_rw [this]; clear this | ||
-- end porting note |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is extremely unfortunate, and is a major regression in simp
's ability to deal with dependent types.
let hlean1926'' : x ∈ LinearMap.range (ι Q) ^ 2 | ||
↔ x ∈ LinearMap.range (ι Q) * LinearMap.range (ι Q) := by | ||
rw [pow_two] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interestingly the proof fails if I use a have
instead of a let
, as then the induction motive below is wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for carefully documenting the regressions. Let's hope they get fixed soon!
bors merge
This runs into some annoying problems with leanprover/lean4#1926 which makes working with the dependent types much worse than it was in Lean 3.
Pull request successfully merged into master. Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
This runs into some annoying problems with leanprover/lean4#1926 which makes working with the dependent types much worse than it was in Lean 3.
This runs into some annoying problems with leanprover/lean4#1926 which makes working with the dependent types much worse than it was in Lean 3.
This runs into some annoying problems with leanprover/lean4#1926 which makes working with the dependent types much worse than it was in Lean 3.
This runs into some annoying problems with leanprover/lean4#1926 which makes working with the dependent types much worse than it was in Lean 3.
This runs into some annoying problems with leanprover/lean4#1926 which makes working with the dependent types much worse than it was in Lean 3.