Commit afdc679
* definition of `Irreducible`; refactoring of `Prime` and `Composite`
* tidying up old cruft
* knock-on consequences: `Coprimality`
* considerable refactoring of `Primality`
* knock-on consequences: `Coprimality`
* refactoring: no appeal to `Data.Nat.Induction`
* refactoring: renamed `SmoothAt` and its constructor; added pattern synonym; proved `Decidable Irreducible`; misc. tweaks
* knock-on consequences: `Coprimality`
* refactoring: removed `NonZero` analysis; misc. tweaks
* knock-on consequences: `Coprimality`; tightened `import`s
* knock-on consequences: `Coprimality`; tightened `import`s
* refactoring: every number is `1-rough`
* knock-on consequences: `Coprimality`; use of smart constructor
* refactoring: every number is `0-rough`; streamlining; inverse to `prime`; documentation
* attempt to optimise for a nearly-common case pseudo-constructor
* fiddling now
* refactoring: better use of `primality` API
* `Rough` is bounded
* removed unnecessary implicits
* comment
* refactoring: comprehensive shift over to `NonTrivial` instances
* refactoring: oops!
* tidying up: removed infixes
* tidying up: restored `rough⇒≤`
* further refinements; added `NonTrivial` proofs
* tidying up
* moving definitions to `Data.Nat.Base`
* propagated changes; many more explicit s required?
* `NonTrivial` is `Recomputable`
* all instances of `NonTrivial` now irrelevant; weird to need `NonTrivial 2` explicitly
* tidying up `Coprimality`, eg with `variable`s
* `NonTrivial` is `Decidable`
* systematise proofs of `Decidable` properties via the `UpTo` predicates
* explicit quantifier now in `composite≢`
* Nathan's simplification
* interaction of `NonZero` and `NonTrivial` instances
* divisor now a record field; final lemmas: closure under divisibility; plus partial `CHANGELOG` entries
* '(non-)instances' become '(counter-)examples'
* stylistics
* removed `k` as a variable/parameter
* renamed fields and smart constructors
* moved smart constructors; made a local definition
* tidying up
* refactoring per review comments: equivalence of `UpTo` predicates; making more things `private`
* tidying up: names congruent to ordering relation
* removed variable `k`; removed old proof in favour of new one with `NonZero` instance
* removed `recomputable` in favour of a private lemma
* regularised use of instance brackets
* made instances more explicit
* made instances more explicit
* blank line
* made `nonTrivial⇒nonZero` take an explicit argument in lieu of being able to make it an `instance`
* regularised use of instance brackets
* regularised use of instance brackets
* trimming
* tidied up `Coprimality` entries
* Make HasBoundedNonTrivialDivisor infix
* Make NonTrivial into a record to fix instance resolution bug
* Move HasNonTrivialDivisor to Divisibility.Core and hide UpTo lemmas
* Rearrange file to follow standard ordering of lemmas in the rest of the library
* Move UpTo predicates into decidability proofs
* No-op refactoring to curb excessively long lines
* Make a couple of names consistent with style-guide
* new definition of `Prime`
* renamed fundamental definition
* one last reference in `CHANGELOG`
* more better words; one fewer definition
* tidied up `Definitions` section; rejigged order of proofs of properties to reflect definitional order
* refactored proof of `prime⇒irreducible`
* finishing touches
* missing lemma from irrelevant instance list
* regularised final proof to use `contradiction`
* added fixity `infix 10`
* added fixity `infix 10`; made `composite` a pattern synonym; knock-on improvements
* comprehensive `CHNAGELOG` entry; whitespace fixes
* Rename 1<2+ to sz<ss
* Rename hasNonTrivialDivisor relation
* Updated CHANGELOG
---------
Co-authored-by: MatthewDaggitt <matthewdaggitt@gmail.com>
1 parent 61335e5 commit afdc679
8 files changed
Lines changed: 550 additions & 151 deletions
File tree
- src/Data
- Nat
- Divisibility
- Rational
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
645 | 645 | | |
646 | 646 | | |
647 | 647 | | |
648 | | - | |
649 | | - | |
650 | | - | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
651 | 653 | | |
| 654 | + | |
| 655 | + | |
652 | 656 | | |
653 | 657 | | |
654 | 658 | | |
| |||
2754 | 2758 | | |
2755 | 2759 | | |
2756 | 2760 | | |
| 2761 | + | |
| 2762 | + | |
| 2763 | + | |
| 2764 | + | |
| 2765 | + | |
| 2766 | + | |
| 2767 | + | |
| 2768 | + | |
| 2769 | + | |
| 2770 | + | |
| 2771 | + | |
| 2772 | + | |
2757 | 2773 | | |
2758 | 2774 | | |
2759 | 2775 | | |
| |||
2779 | 2795 | | |
2780 | 2796 | | |
2781 | 2797 | | |
2782 | | - | |
| 2798 | + | |
2783 | 2799 | | |
2784 | 2800 | | |
| 2801 | + | |
| 2802 | + | |
| 2803 | + | |
| 2804 | + | |
| 2805 | + | |
| 2806 | + | |
| 2807 | + | |
| 2808 | + | |
2785 | 2809 | | |
2786 | 2810 | | |
2787 | | - | |
| 2811 | + | |
2788 | 2812 | | |
2789 | | - | |
2790 | | - | |
2791 | | - | |
2792 | | - | |
2793 | | - | |
2794 | | - | |
2795 | | - | |
| 2813 | + | |
| 2814 | + | |
| 2815 | + | |
| 2816 | + | |
| 2817 | + | |
| 2818 | + | |
| 2819 | + | |
| 2820 | + | |
| 2821 | + | |
| 2822 | + | |
| 2823 | + | |
| 2824 | + | |
| 2825 | + | |
| 2826 | + | |
| 2827 | + | |
| 2828 | + | |
| 2829 | + | |
| 2830 | + | |
| 2831 | + | |
| 2832 | + | |
| 2833 | + | |
2796 | 2834 | | |
2797 | 2835 | | |
2798 | 2836 | | |
| |||
2802 | 2840 | | |
2803 | 2841 | | |
2804 | 2842 | | |
2805 | | - | |
2806 | 2843 | | |
| 2844 | + | |
| 2845 | + | |
| 2846 | + | |
| 2847 | + | |
| 2848 | + | |
2807 | 2849 | | |
2808 | 2850 | | |
2809 | 2851 | | |
2810 | 2852 | | |
2811 | 2853 | | |
2812 | 2854 | | |
2813 | 2855 | | |
2814 | | - | |
| 2856 | + | |
2815 | 2857 | | |
2816 | 2858 | | |
2817 | 2859 | | |
| |||
2852 | 2894 | | |
2853 | 2895 | | |
2854 | 2896 | | |
2855 | | - | |
| 2897 | + | |
2856 | 2898 | | |
2857 | 2899 | | |
2858 | 2900 | | |
| |||
2878 | 2920 | | |
2879 | 2921 | | |
2880 | 2922 | | |
2881 | | - | |
2882 | | - | |
2883 | | - | |
2884 | | - | |
2885 | | - | |
2886 | | - | |
2887 | | - | |
2888 | | - | |
2889 | | - | |
2890 | | - | |
2891 | | - | |
2892 | | - | |
2893 | | - | |
| 2923 | + | |
| 2924 | + | |
| 2925 | + | |
| 2926 | + | |
| 2927 | + | |
| 2928 | + | |
| 2929 | + | |
| 2930 | + | |
| 2931 | + | |
| 2932 | + | |
| 2933 | + | |
| 2934 | + | |
| 2935 | + | |
2894 | 2936 | | |
2895 | | - | |
| 2937 | + | |
2896 | 2938 | | |
2897 | 2939 | | |
2898 | 2940 | | |
| |||
3629 | 3671 | | |
3630 | 3672 | | |
3631 | 3673 | | |
3632 | | - | |
| 3674 | + | |
| 3675 | + | |
| 3676 | + | |
3633 | 3677 | | |
3634 | 3678 | | |
3635 | 3679 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
| |||
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
62 | | - | |
| 66 | + | |
63 | 67 | | |
| 68 | + | |
64 | 69 | | |
65 | 70 | | |
66 | 71 | | |
| |||
72 | 77 | | |
73 | 78 | | |
74 | 79 | | |
75 | | - | |
| 80 | + | |
76 | 81 | | |
77 | 82 | | |
78 | 83 | | |
| |||
95 | 100 | | |
96 | 101 | | |
97 | 102 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
103 | 109 | | |
104 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
105 | 116 | | |
106 | 117 | | |
107 | 118 | | |
| |||
130 | 141 | | |
131 | 142 | | |
132 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
133 | 172 | | |
134 | 173 | | |
135 | 174 | | |
| |||
0 commit comments