Skip to content

[Merged by Bors] - feat: add orthogonality lemmas for 2-dimensional inner product spaces - #35956

Closed
Scarlett-le wants to merge 13 commits into
leanprover-community:masterfrom
Scarlett-le:feat/inner-product-rejection-orthogonal
Closed

Scarlett-le wants to merge 13 commits into
leanprover-community:masterfrom
Scarlett-le:feat/inner-product-rejection-orthogonal

Conversation

@Scarlett-le

@Scarlett-le Scarlett-le commented Mar 2, 2026 •

Copy link
Copy Markdown
Contributor

In a two-dimensional inner product space over 𝕜, if u is orthogonal to v and v is orthogonal to w (with v ≠ 0 and w ≠ 0), then u ∈ 𝕜 ∙ w.

@github-actions github-actions Bot added the t-analysis Analysis (normed *, calculus) label Mar 2, 2026
@github-actions

github-actions Bot commented Mar 2, 2026 •

Copy link
Copy Markdown

PR summary 1e540354c5

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

+ eq_span_singleton_of_mem_of_finrank_eq_one
+ mem_span_singleton_of_inner_eq_zero_of_inner_eq_zero

You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci

## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.

Declarations diff (Lean)

✅ Lean-aware diff — post-build, computed from the Lean environment (commit 1e54035).

  • +2 new declarations
  • −0 removed declarations
+Submodule.mem_span_singleton_of_inner_eq_zero_of_inner_eq_zero
+eq_span_singleton_of_mem_of_finrank_eq_one

No changes to strong technical debt.

No changes to weak technical debt.

Current commit 1e540354c5
Reference commit b2b4859138

This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/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).

@j-loreaux j-loreaux added the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Mar 10, 2026
@Scarlett-le
Scarlett-le force-pushed the feat/inner-product-rejection-orthogonal branch from 0b154d7 to bc4f03e Compare March 12, 2026 07:15
@jsm28 jsm28 removed the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Mar 16, 2026
@Scarlett-le
Scarlett-le requested a review from j-loreaux March 17, 2026 09:20
Comment on lines +144 to +151
/-- If a nonzero vector `w` and a vector `u` are both orthogonal to the same nonzero vector `v`
in a two-dimensional inner product space, then `u` lies in the span of `w`. -/
theorem mem_span_singleton_of_inner_eq_zero_of_inner_eq_zero
{𝕜 E : Type*} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E]
[Fact (finrank 𝕜 E = 2)] {u v w : E}
(hv : v ≠ 0) (hw : w ≠ 0)
(huv : ⟪v, u⟫_𝕜 = 0) (hwv : ⟪v, w⟫_𝕜 = 0) :
u ∈ Submodule.span 𝕜 {w} := by

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can I also ask what you need this result for? It's rather specialized.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Regarding mem_span_singleton_of_inner_eq_zero_of_inner_eq_zero: I use it three times in the Arc file (through_right, mem_interior_through, and not_mem_avoiding), so inlining would introduce significant duplication. It also captures a natural and reusable geometric fact — in a 2-dimensional inner product space, the orthogonal complement of any nonzero vector is 1-dimensional, so any two vectors orthogonal to the same nonzero vector are linearly dependent. I think this is general enough to be useful API beyond just this file.

@j-loreaux j-loreaux added the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Mar 18, 2026
@Scarlett-le
Scarlett-le requested a review from j-loreaux March 20, 2026 07:11
@Scarlett-le
Scarlett-le force-pushed the feat/inner-product-rejection-orthogonal branch from bc4f03e to baf9b35 Compare June 3, 2026 07:51
@Scarlett-le
Scarlett-le force-pushed the feat/inner-product-rejection-orthogonal branch from baf9b35 to f278820 Compare June 3, 2026 08:39

@j-loreaux j-loreaux left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Scarlett-le I'm sorry this sat for a very long time. The reason is that you never removed the awaiting-author tag, so this PR did not appear in the queue.

@Scarlett-le

Copy link
Copy Markdown
Contributor Author

@Scarlett-le I'm sorry this sat for a very long time. The reason is that you never removed the awaiting-author tag, so this PR did not appear in the queue.

Sorry about that! I didn't have write access to the repository, so I wasn't able to change the label myself. I've now addressed the review feedback and pushed the changes. Waiting for review.

@wwylele

wwylele commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

You can remove tag by typing -awaiting-author

@Scarlett-le

Copy link
Copy Markdown
Contributor Author

-awaiting-author

@github-actions github-actions Bot removed the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Jun 25, 2026
@j-loreaux j-loreaux changed the title feat: add orthogonality lemmas for inner product spacesonal feat: add orthogonality lemmas for 2-dimensional inner product spaces Jul 7, 2026
@j-loreaux j-loreaux added the auto-merge-after-CI Please do not add manually. Requests for a bot to merge automatically once CI is done. label Jul 7, 2026
@mathlib-auto-merge

Copy link
Copy Markdown

As this PR is labelled auto-merge-after-CI, we are now sending it to bors:

bors merge

@mathlib-bors mathlib-bors Bot added the ready-to-merge This PR has been sent to bors. label Jul 8, 2026
mathlib-bors Bot pushed a commit that referenced this pull request Jul 8, 2026
…#35956)

In a two-dimensional inner product space over `𝕜`, if `u` is orthogonal to `v` and `v` is orthogonal to `w` (with `v ≠ 0` and `w ≠ 0`), then `u ∈ 𝕜 ∙ w`.

Co-authored-by: Scarlett-le <[email protected]>
Co-authored-by: Jireh Loreaux <[email protected]>
@mathlib-bors mathlib-bors Bot added the bors-staging This PR is currently being built by bors on the staging branch. label Jul 8, 2026
@mathlib-bors

mathlib-bors Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

@mathlib-bors mathlib-bors Bot changed the title feat: add orthogonality lemmas for 2-dimensional inner product spaces [Merged by Bors] - feat: add orthogonality lemmas for 2-dimensional inner product spaces Jul 8, 2026
@mathlib-bors mathlib-bors Bot closed this Jul 8, 2026
michaellee94 pushed a commit to michaellee94/mathlib4 that referenced this pull request Jul 11, 2026
…leanprover-community#35956)

In a two-dimensional inner product space over `𝕜`, if `u` is orthogonal to `v` and `v` is orthogonal to `w` (with `v ≠ 0` and `w ≠ 0`), then `u ∈ 𝕜 ∙ w`.

Co-authored-by: Scarlett-le <[email protected]>
Co-authored-by: Jireh Loreaux <[email protected]>
mpacholski pushed a commit to mpacholski/mathlib4 that referenced this pull request Jul 16, 2026
…leanprover-community#35956)

In a two-dimensional inner product space over `𝕜`, if `u` is orthogonal to `v` and `v` is orthogonal to `w` (with `v ≠ 0` and `w ≠ 0`), then `u ∈ 𝕜 ∙ w`.

Co-authored-by: Scarlett-le <[email protected]>
Co-authored-by: Jireh Loreaux <[email protected]>
mpacholski pushed a commit to mpacholski/mathlib4 that referenced this pull request Jul 30, 2026
…leanprover-community#35956)

In a two-dimensional inner product space over `𝕜`, if `u` is orthogonal to `v` and `v` is orthogonal to `w` (with `v ≠ 0` and `w ≠ 0`), then `u ∈ 𝕜 ∙ w`.

Co-authored-by: Scarlett-le <[email protected]>
Co-authored-by: Jireh Loreaux <[email protected]>
mpacholski pushed a commit to mpacholski/mathlib4 that referenced this pull request Jul 30, 2026
…leanprover-community#35956)

In a two-dimensional inner product space over `𝕜`, if `u` is orthogonal to `v` and `v` is orthogonal to `w` (with `v ≠ 0` and `w ≠ 0`), then `u ∈ 𝕜 ∙ w`.

Co-authored-by: Scarlett-le <[email protected]>
Co-authored-by: Jireh Loreaux <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-after-CI Please do not add manually. Requests for a bot to merge automatically once CI is done. bors-staging This PR is currently being built by bors on the staging branch. ready-to-merge This PR has been sent to bors. t-analysis Analysis (normed *, calculus)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants