Skip to content

[ add ] proof of Carette's Lemma for relation m ≡ n (mod o) for {{NonZero o}}#2971

Open
jamesmckinna wants to merge 2 commits intoagda:masterfrom
jamesmckinna:jacques-lemma
Open

[ add ] proof of Carette's Lemma for relation m ≡ n (mod o) for {{NonZero o}}#2971
jamesmckinna wants to merge 2 commits intoagda:masterfrom
jamesmckinna:jacques-lemma

Conversation

@jamesmckinna
Copy link
Copy Markdown
Collaborator

@jamesmckinna jamesmckinna commented Mar 27, 2026

Taken from the discussion at https://agda.zulipchat.com/#narrow/channel/264623-stdlib/topic/suc.20injective.20under.20_.25_/with/582024092 :

  • introduces definition m ≲%[ o ] n = ∃ λ k → n ≡ m + k * o
  • characterises the relation m % o ≡ n % o in terms of (the symmetric closure of) m ≲%[ o ] n
  • gives two proofs of 'Carette's Lemma' (suc m) % o ≡ (suc n) % o → m % o ≡ n % o
    • indirect, via the characterisation
    • direct, via a slick proof due to @alexarice

Possible TODO:

@jamesmckinna jamesmckinna added this to the v2.4 milestone Mar 27, 2026
@jamesmckinna jamesmckinna requested a review from Taneb March 27, 2026 18:24
@jamesmckinna jamesmckinna requested a review from gallais March 27, 2026 18:25
Comment on lines +516 to +518
carettesLemma eq with %o≡%o⇒≡%[o] eq
... | fwd (k , eq) = ≲%[o]⇒%o≡%o (k , cong pred eq)
... | bwd (k , eq) = sym (≲%[o]⇒%o≡%o (k , cong pred eq))
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It seems as though this should be refactorable in terms of SymClosure.(g)fold but I don't quite see it right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant