Skip to content
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: Define dual submodule wrt bilinear form #8997

Closed
wants to merge 5 commits into from

Conversation

erdOne
Copy link
Member

@erdOne erdOne commented Dec 12, 2023


Open in Gitpod

erdOne and others added 2 commits December 12, 2023 19:00
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@erdOne erdOne added the awaiting-review The author would like community review of the PR label Dec 12, 2023
Copy link
Member

@riccardobrasca riccardobrasca left a comment

Choose a reason for hiding this comment

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

Thanks!

bors d+

Mathlib/LinearAlgebra/BilinearForm/Basic.lean Outdated Show resolved Hide resolved
Mathlib/LinearAlgebra/BilinearForm/DualLattice.lean Outdated Show resolved Hide resolved
intro z hz
simpa using congr_arg (algebraMap R S) (LinearMap.congr_fun e ⟨z, hz⟩)

lemma dualSubmodule_span_of_basis {ι} [Fintype ι] [DecidableEq ι] [FiniteDimensional S M]
Copy link
Member

Choose a reason for hiding this comment

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

FiniteDimensional S M is automatic since you have a finite basis.

Copy link
Member Author

Choose a reason for hiding this comment

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

But dualBasis needs [FiniteDimensional S M]. Or maybe we should remove that from dualBasis.

Copy link
Member

Choose a reason for hiding this comment

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

You can write

let _ : FiniteDimensional S M := ...

before the : and it should be happy (not 100% sure the syntax is exactly that, but it is similar, and I forgot if we want let or letI here).

Copy link
Member

Choose a reason for hiding this comment

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

lemma dualSubmodule_span_of_basis {ι} [Fintype ι] [DecidableEq ι] (hB : B.Nondegenerate)
    (b : Basis ι S M) :
    letI _ : FiniteDimensional S M := FiniteDimensional.of_fintype_basis b
    B.dualSubmodule (Submodule.span R (Set.range b)) =
      Submodule.span R (Set.range <| B.dualBasis hB b) := by
  let _ : FiniteDimensional S M := FiniteDimensional.of_fintype_basis b
  apply le_antisymm
  · intro x hx
    rw [← (B.dualBasis hB b).sum_repr x]
    apply sum_mem
    rintro i -
    obtain ⟨r, hr⟩ := hx (b i) (Submodule.subset_span ⟨_, rfl⟩)
    simp only [dualBasis_repr_apply, ← hr, Algebra.linearMap_apply, algebraMap_smul]
    apply Submodule.smul_mem
    exact Submodule.subset_span ⟨_, rfl⟩
  · rw [Submodule.span_le]
    rintro _ ⟨i, rfl⟩ y hy
    obtain ⟨f, rfl⟩ := (mem_span_range_iff_exists_fun _).mp hy
    simp only [sum_right, bilin_smul_right]
    apply sum_mem
    rintro j -
    rw [← IsScalarTower.algebraMap_smul S (f j), B.bilin_smul_right, apply_dualBasis_left,
      mul_ite, mul_one, mul_zero, ← (algebraMap R S).map_zero, ← apply_ite]
    exact ⟨_, rfl⟩

Copy link
Member Author

Choose a reason for hiding this comment

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

I added that over at dualBasis.

@mathlib-bors
Copy link

mathlib-bors bot commented Dec 12, 2023

✌️ erdOne can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added delegated and removed awaiting-review The author would like community review of the PR labels Dec 12, 2023
@erdOne
Copy link
Member Author

erdOne commented Dec 12, 2023

bors merge

mathlib-bors bot pushed a commit that referenced this pull request Dec 12, 2023
Co-authored-by: Andrew Yang <36414270+erdOne@users.noreply.github.com>
@mathlib-bors
Copy link

mathlib-bors bot commented Dec 12, 2023

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat: Define dual submodule wrt bilinear form [Merged by Bors] - feat: Define dual submodule wrt bilinear form Dec 12, 2023
@mathlib-bors mathlib-bors bot closed this Dec 12, 2023
@mathlib-bors mathlib-bors bot deleted the erd1/duallattice branch December 12, 2023 16:52
awueth pushed a commit that referenced this pull request Dec 19, 2023
Co-authored-by: Andrew Yang <36414270+erdOne@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants