We proved 2 theorems:
Let
Define a function
For every
We consider polynomials in one indeterminate (x) with coefficients in
Theorem (Collatz on
Define a function
If
Both projects utilize Lean 4 version lean v4.26.0-rc2. mathlib documentation loogle various LLM models (such as gemini and chatgpt).
Workflow
First, we've read the proof and we made sure that we understand each logical implication.
Next, we sat together to define the necessary definitions and the proofs skeleton.
Afterwards, we tried to divide the proof to smaller lemmas and we split the work between both of us.
We also tried to make a lemma for every nontrivial logical step in the original proof.
For proving each lemma, we had several ways of trying it. First we tried to find if there is already a proof for that, or something similar enough in mathlib - we tried searching in mathlib documentation itself, in loogle or asking an LLM to search for one. Usually the search was unsuccessful and we ended up proving each lemma by unfolding every definition.
Difficulities we encountered
One difficulty was getting used to work and do arithmetic with Fin.
For example, in g_k_inv lemma, we found it difficult to prove that
Another diffiuculty we had was how to properly prove with nested induction, which wasn't succesful until we added 'generalizing' for the inner induction.