Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
Change proofs
Browse files Browse the repository at this point in the history
  • Loading branch information
xroblot committed Jun 9, 2023
1 parent 19c6492 commit a72e99c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/algebra/module/zlattice.lean
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,21 @@ lemma floor_eq_self_of_mem (m : E) (h : m ∈ span ℤ (set.range b)) : (floor b
begin
apply b.ext_elem,
simp_rw [repr_floor_apply b],
exact λ i, int.floor_eq_self ((b.mem_span_iff_repr_mem ℤ _).mp h i),
intro i,
obtain ⟨z, hz⟩ := (b.mem_span_iff_repr_mem ℤ _).mp h i,
rw [← hz],
exact congr_arg (coe : ℤ → K) (int.floor_int_cast z),
end

@[simp]
lemma ceil_eq_self_of_mem (m : E) (h : m ∈ span ℤ (set.range b)) : (ceil b m : E) = m :=
begin
apply b.ext_elem,
simp_rw [repr_ceil_apply b],
exact λ i, int.ceil_eq_self ((b.mem_span_iff_repr_mem ℤ _).mp h i),
intro i,
obtain ⟨z, hz⟩ := (b.mem_span_iff_repr_mem ℤ _).mp h i,

This comment has been minimized.

Copy link
@eric-wieser

eric-wieser Jun 9, 2023

Member

I assume rfl doesn't work in this obtain?

This comment has been minimized.

Copy link
@xroblot

xroblot Jun 9, 2023

Author Collaborator

Unfortunately, not. The error is

subst tactic failed, hypothesis '{h.local_pp_name}' is not of the form (x = t) or (t = x).

Is there a trick I could use here?

This comment has been minimized.

Copy link
@eric-wieser

eric-wieser Jun 9, 2023

Member

What type is hz here?

Either way, it's fine with the current proof, I'm just curious.

This comment has been minimized.

Copy link
@xroblot

xroblot Jun 9, 2023

Author Collaborator
hz : ⇑(algebra_map ℤ K) z = ⇑(⇑(b.repr) m) I
rw [← hz],
exact congr_arg (coe : ℤ → K) (int.ceil_int_cast z),
end

/-- The map that sends a vector `E` to the fundamental domain of the lattice,
Expand Down

0 comments on commit a72e99c

Please sign in to comment.