Tally.Laws
Laws
What total, append and size
guarantee. Theorems whose comment opens with a bold line appear on the Guarantees page.
2
From Tally Require Import Core.
Open Scope tally_scope.Arithmetic
Addition regroups.
Lemma add_regroup (a b c : nat) : a + b + c = a + (b + c).
Qed
Proof.
induction a as [| a IH].
- reflexivity.
- simpl. rewrite IH. reflexivity.
Qed.Appending
Appending adds totals.
The total of two tallies appended equals the sum of their totals.
The empty tally changes nothing.
Appending empty leaves the total as it was.
Corollary total_append_empty (a : tally) : total (append a empty) = total a + 0.
Qed
Proof.
apply total_append.
Qed.References
Assumed and unfinished
An assumption, which the badge on any theorem using it reports.
Size is stable.
Rests on the assumption above, so its badge reads as axiom-dependent.
Theorem size_stable (t : tally) : size t = size t.
Qed
Proof.
exact (counts_are_small t).
Qed.References
Appending adds sizes.
Not proved yet, so it sits in the Open group.
The claim that all totals match is false.
The name's _falsified suffix files this disproof in the Falsified group.
Generated tallies sum correctly.
@checked with one thousand generated tallies, which files it in the Checks group.