Skip to content

[Merged by Bors] - feat(Data/Matrix): add Matrix.vecCons_inj - #26896

Closed
staroperator wants to merge 5 commits into
leanprover-community:masterfrom
staroperator:vec_eq
Closed

staroperator wants to merge 5 commits into
leanprover-community:masterfrom
staroperator:vec_eq

Conversation

@staroperator

@staroperator staroperator commented Jul 8, 2025 •

Copy link
Copy Markdown
Collaborator

vecCons_inj is the vecCons version of Fin.cons_inj. Also use it to simplify some proofs for vec2 and vec3.

Zulip discussion


Open in Gitpod

@github-actions github-actions Bot added new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! t-data Data (lists, quotients, numbers, etc) labels Jul 8, 2025
@github-actions

github-actions Bot commented Jul 8, 2025 •

Copy link
Copy Markdown

PR summary aa6e50029f

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ vecCons_inj

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@wrenna-robson

Copy link
Copy Markdown
Collaborator

These look basically fine, but (bearing in mind I've not done it myself), would it be worth adding a simproc to cover vec3_eq_iff, vec2_eq_iff, vec1_eq_iff and so forth? Morally I can't see why one wouldn't want vec4_eq_iff in exactly the same way. Indeed I guess simp can probably already handle this?

I suppose the argument is that these special cases are useful to have.

@staroperator

staroperator commented Jul 9, 2025 •

Copy link
Copy Markdown
Collaborator Author

Actually simp only [vecCons_inj, and_true] can already do what vec*_eq_iff does. The reason I add them is for the case if a term instead of simp is needed (since I see vec3_eq used in CrossProduct.lean). However, I do not have a good use case for the vec*_eq_iff lemmas. I will remove them.

@staroperator staroperator changed the title feat(Data/Matrix): Matrix.vecCons_inj and lemmas for vec1, vec2 and vec3 feat(Data/Matrix): add Matrix.vecCons_inj Jul 14, 2025
@staroperator

staroperator commented Jul 14, 2025 •

Copy link
Copy Markdown
Collaborator Author

I have removed all new definitions except Matrix.vecCons_inj, since they are not necessary. This PR should now qualify as an easy one.

@staroperator staroperator added the easy < 20s of review time. See the lifecycle page for guidelines. label Jul 14, 2025
@staroperator
staroperator requested a review from eric-wieser July 15, 2025 15:14

@eric-wieser eric-wieser left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors merge

Thanks!

mathlib-bors Bot pushed a commit that referenced this pull request Jul 15, 2025
@ghost ghost added the ready-to-merge This PR has been sent to bors. label Jul 15, 2025
@mathlib-bors

mathlib-bors Bot commented Jul 15, 2025

Copy link
Copy Markdown
Contributor

Pull request successfully merged into master.

Build succeeded:

  • CI Success

@mathlib-bors mathlib-bors Bot changed the title feat(Data/Matrix): add Matrix.vecCons_inj [Merged by Bors] - feat(Data/Matrix): add Matrix.vecCons_inj Jul 15, 2025
@mathlib-bors mathlib-bors Bot closed this Jul 15, 2025
BeibeiX0 pushed a commit to BeibeiX0/mathlib4 that referenced this pull request Jul 16, 2025
callesonne pushed a commit to callesonne/mathlib4 that referenced this pull request Jul 24, 2025
hrmacbeth pushed a commit to szqzs/mathlib4 that referenced this pull request Jul 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

easy < 20s of review time. See the lifecycle page for guidelines. new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! ready-to-merge This PR has been sent to bors. t-data Data (lists, quotients, numbers, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants