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

Proved B is finite #211

Closed
wants to merge 2 commits into from
Closed

Conversation

4hma4d
Copy link
Contributor

@4hma4d 4hma4d commented Nov 8, 2024

Proved Module.Finite A B in BaseChange.lean
Closes #202

Closes #202

@kbuzzard
Copy link
Collaborator

kbuzzard commented Nov 9, 2024

Thanks a lot! This is great. I gave you a code review (edit: oops, but forgot to submit it -- I did this now) because I'm not sure I've seen you around before, but the code is fine; I was just showing you some tricks. You might want to consider upstreaming this result to mathlib -- I couldn't find it but I'm pretty sure that the experts there will know if it's there, and if it's not then I'm pretty sure they'll want it.

example : Module.Finite A B := by sorry -- I assume this is correct
example: Module.Finite A B := by
obtain ⟨ι, u, hi⟩ := FiniteDimensional.exists_is_basis_integral A K L
have: DecidableEq { x // x ∈ ι } := by exact Classical.typeDecidableEq { x // x ∈ ι }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
have: DecidableEq { x // x ∈ ι } := by exact Classical.typeDecidableEq { x // x ∈ ι }
classical

obtain ⟨ι, u, hi⟩ := FiniteDimensional.exists_is_basis_integral A K L
have: DecidableEq { x // x ∈ ι } := by exact Classical.typeDecidableEq { x // x ∈ ι }
have h := integralClosure_le_span_dualBasis u hi
let V := (Submodule.span A (Set.range ⇑((Algebra.traceForm K L).dualBasis (traceForm_nondegenerate K L) u)))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
let V := (Submodule.span A (Set.range ⇑((Algebra.traceForm K L).dualBasis (traceForm_nondegenerate K L) u)))
let V := (Submodule.span A (Set.range ⇑((Algebra.traceForm K L).dualBasis
(traceForm_nondegenerate K L) u)))

I am surprised that we don't have a linter telling you that we would like to have all lines <= 100 chars (mathlib has one and I think it's a good idea)

exact Set.finite_range ⇑((Algebra.traceForm K L).dualBasis (traceForm_nondegenerate K L) u)
have h3: Module.Finite A (integralClosure A L) := by
refine (@Module.Finite.iff_fg A L _ _ _ (Subalgebra.toSubmodule (integralClosure A L))).mpr ?_
exact (@isNoetherian_submodule A L _ _ _ V).mp h2 (Subalgebra.toSubmodule (integralClosure A L)) h
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
exact (@isNoetherian_submodule A L _ _ _ V).mp h2 (Subalgebra.toSubmodule (integralClosure A L)) h
exact isNoetherian_submodule.mp h2 (Subalgebra.toSubmodule (integralClosure A L)) h

You might have needed the @ when writing the code, but because it's an exact Lean can figure everything out.

Comment on lines 52 to 53
apply @Module.Finite.equiv A (integralClosure A L) B
exact AlgEquiv.toLinearEquiv (AlgEquiv.symm hb)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
apply @Module.Finite.equiv A (integralClosure A L) B
exact AlgEquiv.toLinearEquiv (AlgEquiv.symm hb)
exact Module.Finite.equiv <| AlgEquiv.toLinearEquiv (AlgEquiv.symm hb)

Similarly here you don't need the @s as long as you tell Lean exactly what you're proving; unification can do the rest.

@4hma4d
Copy link
Contributor Author

4hma4d commented Nov 9, 2024

Thanks for the review! I looked through mathlib again, and I found that B is noetherian is already there, so the proof becomes trivial 😅

@4hma4d
Copy link
Contributor Author

4hma4d commented Nov 11, 2024

I submitted leanprover-community/mathlib4#18842

@kbuzzard
Copy link
Collaborator

Thanks! Probably we should wait for that to get merged and bump mathlib and modify this PR to use it.

@kbuzzard
Copy link
Collaborator

Actually I just copied your mathlib PR into this repo :-) Many thanks for sorting this out!

@kbuzzard kbuzzard closed this Nov 12, 2024
@4hma4d 4hma4d deleted the FiniteClosure branch November 13, 2024 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The integral closure of a Dedekind domain in a finite separable extension is finite
2 participants