Congruence Arithmetic — exact evidence

12 new Alpha v34 admissions; current4223/Stable432. Complete 215-node bundle checked by original HA and independent compiled Lean. Only the 5 listed roots claim separate ordinary-certificate checks.

Current library: Alpha v34, 4,223 checked-use theorems; Stable remains 432. Historical first admissions, original proof editions, and non-admitted aliases are preserved.

Each statement retains its explicit modulus, coprimality and divisibility assumptions. These twelve arithmetic laws do not assert all order, primitive-root, Carmichael, exponential or simultaneous-polynomial congruence goals are finished.

Actual same-live report · Exact first admissions

zero_add · unchanged support, not a new admission
forall n. 0 + n = n
  1. induction n
  2. simp
  3. simp [IH]
add_succ_left · unchanged support, not a new admission
forall n m. S n + m = S (n + m)
  1. intro n
  2. induction m
  3. simp
  4. simp [IH]
add_comm · unchanged support, not a new admission
forall n m. n + m = m + n
  1. intro n
  2. induction m
  3. simp [zero_add]
  4. simp [add_succ_left, IH]
add_assoc · unchanged support, not a new admission
forall n m k. (n + m) + k = n + (m + k)
  1. intro n
  2. intro m
  3. induction k
  4. simp
  5. simp [IH]
mul_zero_left · unchanged support, not a new admission
forall n. 0 * n = 0
  1. induction n
  2. simp
  3. simp [IH]
mul_succ_left · unchanged support, not a new admission
forall n m. S n * m = n * m + m
  1. intro n
  2. induction m
  3. simp
  4. specialize add_comm n
  5. specialize add_comm m
  6. simp [IH, add_comm, add_assoc]
mul_comm · unchanged support, not a new admission
forall n m. n * m = m * n
  1. intro n
  2. induction m
  3. simp [mul_zero_left]
  4. simp [IH, mul_succ_left]
mul_add · unchanged support, not a new admission
forall n m k. n * (m + k) = n * m + n * k
  1. intro n
  2. intro m
  3. induction k
  4. simp
  5. simp [IH, add_assoc]
mul_assoc · unchanged support, not a new admission
forall n m k. (n * m) * k = n * (m * k)
  1. intro n
  2. intro m
  3. induction k
  4. simp
  5. simp [IH, mul_add]
one_mul · unchanged support, not a new admission
forall n. 1 * n = n
  1. induction n
  2. simp
  3. simp [IH]
mul_one · unchanged support, not a new admission
forall n. n * 1 = n
  1. intro n
  2. simp [zero_add]
add_mul · unchanged support, not a new admission
forall n m k. (n + m) * k = n * k + m * k
  1. intro n
  2. intro m
  3. intro k
  4. simp [mul_comm, mul_add]
succ_ne_zero · unchanged support, not a new admission
forall n. ~(S n = 0)
  1. apply PA1
succ_injective · unchanged support, not a new admission
forall n m. S n = S m -> n = m
  1. apply PA2
le_refl · unchanged support, not a new admission
forall n. n <= n
  1. intro n
  2. exists 0
  3. simp [zero_add]
le_trans · unchanged support, not a new admission
forall n m k. n <= m -> m <= k -> n <= k
  1. intro n
  2. intro m
  3. intro k
  4. intro h_nm
  5. intro h_mk
  6. cases h_nm
  7. cases h_mk
  8. exists x1 + x
  9. simp [add_assoc, h_nm_witness, h_mk_witness]
no_succ_add_fixed · unchanged support, not a new admission
forall p n. S p + n = n -> false
  1. intro p
  2. induction n
  3. intro h
  4. apply PA1
  5. rewrite PA3 at h
  6. exact h
  7. intro h
  8. apply IH
  9. apply PA2
  10. rewrite PA4 at h
  11. exact h
le_total · unchanged support, not a new admission
forall n m. n <= m \/ m <= n
  1. induction n
  2. intro m
  3. left
  4. exists m
  5. simp
  6. induction m
  7. right
  8. exists (S n)
  9. simp
  10. specialize IH m
  11. cases IH
  12. cases IH_left
  13. left
  14. exists x
  15. rewrite PA4
  16. congr
  17. exact IH_left_witness
  18. cases IH_right
  19. right
  20. exists x
  21. rewrite PA4
  22. congr
  23. exact IH_right_witness
add_eq_zero_right · unchanged support, not a new admission
forall a b. a + b = 0 -> b = 0
  1. intro a
  2. induction b
  3. intro h
  4. refl
  5. intro h
  6. exfalso
  7. apply PA1
  8. rewrite PA4 at h
  9. exact h
mul_eq_zero · unchanged support, not a new admission
forall n m. n * m = 0 -> n = 0 \/ m = 0
  1. intro n
  2. induction m
  3. intro h
  4. right
  5. refl
  6. intro h
  7. left
  8. specialize add_eq_zero_right (n * m)
  9. specialize add_eq_zero_right n
  10. apply add_eq_zero_right
  11. rewrite PA6 at h
  12. exact h
zero_or_succ · unchanged support, not a new admission
forall n. n = 0 \/ exists k. n = S k
  1. induction n
  2. left
  3. refl
  4. right
  5. exists n
  6. refl
nonzero_is_succ · unchanged support, not a new admission
forall n. ~(n = 0) -> exists k. n = S k
  1. induction n
  2. intro h
  3. exfalso
  4. apply h
  5. refl
  6. intro h
  7. exists n
  8. refl
mul_congr · unchanged support, not a new admission
forall a b c d. a = b -> c = d -> a * c = b * d
  1. intro a
  2. intro b
  3. intro c
  4. intro d
  5. intro hab
  6. intro hcd
  7. congr
  8. exact hab
  9. exact hcd
add_right_cancel · unchanged support, not a new admission
forall a b c. a + c = b + c -> a = b
  1. intro a
  2. intro b
  3. induction c
  4. intro h
  5. rewrite PA3 at h
  6. rewrite PA3 at h
  7. exact h
  8. intro h
  9. apply IH
  10. apply PA2
  11. rewrite PA4 at h
  12. rewrite PA4 at h
  13. exact h
add_left_cancel · unchanged support, not a new admission
forall a b c. a + b = a + c -> b = c
  1. intro a
  2. intro b
  3. intro c
  4. intro h
  5. specialize add_right_cancel b
  6. specialize add_right_cancel c
  7. specialize add_right_cancel a
  8. apply add_right_cancel
  9. trans a + b
  10. apply add_comm
  11. trans a + c
  12. exact h
  13. apply add_comm
zero_le · unchanged support, not a new admission
forall n. 0 <= n
  1. intro n
  2. exists n
  3. rewrite PA3
  4. refl
le_succ_self · unchanged support, not a new admission
forall n. n <= S n
  1. intro n
  2. exists 1
  3. simp [add_succ_left, zero_add]
le_zero · unchanged support, not a new admission
forall n. n <= 0 -> n = 0
  1. intro n
  2. intro h
  3. cases h
  4. apply add_eq_zero_right
  5. exact h_witness
one_le_of_ne_zero · unchanged support, not a new admission
forall n. ~(n = 0) -> 1 <= n
  1. induction n
  2. intro h
  3. exfalso
  4. apply h
  5. refl
  6. intro h
  7. exists n
  8. simp
le_add_left · unchanged support, not a new admission
forall a b. exists k. k + a = b + a
  1. intro a
  2. intro b
  3. exists b
  4. refl
le_add_right · unchanged support, not a new admission
forall a b. exists k. k + a = a + b
  1. intro a
  2. intro b
  3. exists b
  4. apply add_comm
add_le_add_right · unchanged support, not a new admission
forall a b c. (exists k. k + a = b) -> exists r. r + (a + c) = b + c
  1. intro a
  2. intro b
  3. intro c
  4. intro h
  5. cases h
  6. exists x
  7. trans (x + a) + c
  8. symm
  9. apply add_assoc
  10. congr
  11. exact h_witness
  12. refl
add_le_add_left · unchanged support, not a new admission
forall a b c. (exists k. k + a = b) -> exists r. r + (c + a) = c + b
  1. intro a
  2. intro b
  3. intro c
  4. intro h
  5. cases h
  6. exists x
  7. trans (x + c) + a
  8. symm
  9. apply add_assoc
  10. trans (c + x) + a
  11. congr
  12. apply add_comm
  13. refl
  14. trans c + (x + a)
  15. apply add_assoc
  16. congr
  17. refl
  18. exact h_witness
succ_le_succ · unchanged support, not a new admission
forall a b. (exists k. k + a = b) -> exists r. r + S a = S b
  1. intro a
  2. intro b
  3. intro h
  4. cases h
  5. exists x
  6. rewrite PA4
  7. congr
  8. exact h_witness
le_of_succ_le_succ · unchanged support, not a new admission
forall a b. (exists k. k + S a = S b) -> exists r. r + a = b
  1. intro a
  2. intro b
  3. intro h
  4. cases h
  5. exists x
  6. apply PA2
  7. trans x + S a
  8. symm
  9. apply PA4
  10. exact h_witness
le_succ · unchanged support, not a new admission
forall a b. (exists k. k + a = b) -> exists r. r + a = S b
  1. intro a
  2. intro b
  3. intro h
  4. cases h
  5. exists S x
  6. trans S (x + a)
  7. apply add_succ_left
  8. congr
  9. exact h_witness
lt_to_le · unchanged support, not a new admission
forall a b. (exists k. k + S a = b) -> exists r. r + a = b
  1. intro a
  2. intro b
  3. intro h
  4. cases h
  5. exists S x
  6. trans x + S a
  7. trans S (x + a)
  8. apply add_succ_left
  9. symm
  10. apply PA4
  11. exact h_witness
lt_irrefl_expanded · unchanged support, not a new admission
forall n. ~(exists k. k + S n = n)
  1. intro n
  2. intro h
  3. cases h
  4. specialize no_succ_add_fixed x
  5. specialize no_succ_add_fixed n
  6. apply no_succ_add_fixed
  7. trans x + S n
  8. trans S (x + n)
  9. apply add_succ_left
  10. symm
  11. apply PA4
  12. exact h_witness
le_eq_or_lt · unchanged support, not a new admission
forall a b. (exists k. k + a = b) -> a = b \/ exists k. k + S a = b
  1. intro a
  2. intro b
  3. intro h
  4. cases h
  5. specialize zero_or_succ x
  6. cases zero_or_succ
  7. left
  8. rewrite zero_or_succ_left at h_witness
  9. specialize zero_add a
  10. rewrite zero_add at h_witness
  11. exact h_witness
  12. cases zero_or_succ_right
  13. right
  14. exists x1
  15. trans S x1 + a
  16. trans S (x1 + a)
  17. apply PA4
  18. symm
  19. apply add_succ_left
  20. rewrite <- zero_or_succ_right_witness
  21. exact h_witness
lt_of_lt_of_le · unchanged support, not a new admission
forall a b c. (exists k. k + S a = b) -> (exists k. k + b = c) -> exists k. k + S a = c
  1. intro a
  2. intro b
  3. intro c
  4. intro hab
  5. intro hbc
  6. specialize le_trans (S a)
  7. specialize le_trans b
  8. specialize le_trans c
  9. apply le_trans
  10. exact hab
  11. exact hbc
le_or_lt · unchanged support, not a new admission
forall a b. (exists k. k + a = b) \/ exists k. k + S b = a
  1. induction a
  2. intro b
  3. left
  4. exists b
  5. apply PA3
  6. induction b
  7. right
  8. exists a
  9. trans S (a + 0)
  10. apply PA4
  11. congr
  12. apply PA3
  13. specialize IH b
  14. cases IH
  15. left
  16. cases IH_left
  17. exists x
  18. rewrite PA4
  19. congr
  20. exact IH_left_witness
  21. right
  22. cases IH_right
  23. exists x
  24. rewrite PA4
  25. congr
  26. exact IH_right_witness
lt_trichotomy · unchanged support, not a new admission
forall a b. a = b \/ ((exists k. k + S a = b) \/ exists k. k + S b = a)
  1. induction a
  2. induction b
  3. left
  4. refl
  5. right
  6. left
  7. exists b
  8. trans S (b + 0)
  9. apply PA4
  10. congr
  11. apply PA3
  12. induction b
  13. right
  14. right
  15. exists a
  16. trans S (a + 0)
  17. apply PA4
  18. congr
  19. apply PA3
  20. specialize IH b
  21. cases IH
  22. left
  23. congr
  24. exact IH_left
  25. cases IH_right
  26. right
  27. left
  28. cases IH_right_left
  29. exists x
  30. rewrite PA4
  31. congr
  32. exact IH_right_left_witness
  33. right
  34. right
  35. cases IH_right_right
  36. exists x
  37. rewrite PA4
  38. congr
  39. exact IH_right_right_witness
lt_not_le · unchanged support, not a new admission
forall a b. (exists k. k + S a = b) -> ~ (exists k. k + b = a)
  1. have hbad : forall z u v. ~(z = u + (v + S z))
  2. intro z
  3. induction z
  4. intro u
  5. intro v
  6. intro hz
  7. apply PA1
  8. symm
  9. rewrite PA4 at hz
  10. rewrite PA4 at hz
  11. exact hz
  12. intro u
  13. intro v
  14. intro hz
  15. specialize IH u
  16. specialize IH v
  17. apply IH
  18. apply PA2
  19. rewrite PA4 at hz
  20. rewrite PA4 at hz
  21. exact hz
  22. intro a
  23. intro b
  24. intro hab
  25. intro hba
  26. cases hab
  27. cases hba
  28. specialize hbad a
  29. specialize hbad x1
  30. specialize hbad x
  31. apply hbad
  32. symm
  33. rewrite <- hab_witness at hba_witness
  34. exact hba_witness
lt_not_eq_add_middle · unchanged support, not a new admission
forall r m a b. (exists k. k + S r = m) -> ~(r = (a + m) + b)
  1. have hbad : forall z a w b. ~(z = (a + (w + S z)) + b)
  2. intro z
  3. induction z
  4. intro a
  5. intro w
  6. intro b
  7. intro hz
  8. apply PA1
  9. symm
  10. rewrite PA4 at hz
  11. rewrite PA4 at hz
  12. specialize add_succ_left (a + (w + 0))
  13. specialize add_succ_left b
  14. rewrite add_succ_left at hz
  15. exact hz
  16. intro a
  17. intro w
  18. intro b
  19. intro hz
  20. specialize IH a
  21. specialize IH w
  22. specialize IH b
  23. apply IH
  24. apply PA2
  25. rewrite PA4 at hz
  26. rewrite PA4 at hz
  27. specialize add_succ_left (a + (w + S z))
  28. specialize add_succ_left b
  29. rewrite add_succ_left at hz
  30. exact hz
  31. intro r
  32. intro m
  33. intro a
  34. intro b
  35. intro hr
  36. intro heq
  37. cases hr
  38. specialize hbad r
  39. specialize hbad a
  40. specialize hbad x
  41. specialize hbad b
  42. apply hbad
  43. rewrite <- hr_witness at heq
  44. exact heq
mul_le_mul_right · unchanged support, not a new admission
forall a b c. (exists k. k + a = b) -> exists r. r + a * c = b * c
  1. intro a
  2. intro b
  3. intro c
  4. intro h
  5. cases h
  6. exists x * c
  7. trans (x + a) * c
  8. symm
  9. apply add_mul
  10. congr
  11. exact h_witness
  12. refl
division_remainder_succ · unchanged support, not a new admission
forall d n. exists q r. n = S d * q + r /\ S r <= S d
  1. intro d
  2. induction n
  3. exists 0
  4. exists 0
  5. split
  6. simp
  7. exists d
  8. simp
  9. cases IH
  10. cases IH_witness
  11. cases IH_witness_witness
  12. cases IH_witness_witness_right
  13. specialize zero_or_succ x2
  14. cases zero_or_succ
  15. rewrite zero_or_succ_left at IH_witness_witness_right_witness
  16. specialize zero_add S x1
  17. rewrite zero_add at IH_witness_witness_right_witness
  18. have hrd : x1 = d
  19. apply PA2
  20. exact IH_witness_witness_right_witness
  21. exists S x
  22. exists 0
  23. split
  24. rewrite IH_witness_witness_left
  25. rewrite hrd
  26. simp
  27. exists d
  28. simp
  29. cases zero_or_succ_right
  30. exists x
  31. exists S x1
  32. split
  33. rewrite IH_witness_witness_left
  34. simp
  35. exists x3
  36. rewrite <- IH_witness_witness_right_witness
  37. rewrite zero_or_succ_right_witness
  38. simp [add_succ_left]
division_remainder_exists · unchanged support, not a new admission
forall m n. ~(m = 0) -> exists q r. n = m * q + r /\ S r <= m
  1. intro m
  2. intro n
  3. intro hm
  4. specialize zero_or_succ m
  5. cases zero_or_succ
  6. exfalso
  7. apply hm
  8. exact zero_or_succ_left
  9. cases zero_or_succ_right
  10. specialize division_remainder_succ x
  11. specialize division_remainder_succ n
  12. rewrite zero_or_succ_right_witness
  13. rewrite zero_or_succ_right_witness
  14. exact division_remainder_succ
positive_quotient_gap_impossible · unchanged support, not a new admission
forall m q q2 r s k. (exists z. z + S r = m) -> S k + q = q2 -> ~(m * q + r = m * q2 + s)
  1. intro m
  2. intro q
  3. intro q2
  4. intro r
  5. intro s
  6. intro k
  7. intro hr
  8. intro hgap
  9. intro heq
  10. specialize lt_not_eq_add_middle r
  11. specialize lt_not_eq_add_middle m
  12. specialize lt_not_eq_add_middle (m * k)
  13. specialize lt_not_eq_add_middle s
  14. apply lt_not_eq_add_middle
  15. exact hr
  16. specialize add_left_cancel (m * q)
  17. specialize add_left_cancel r
  18. specialize add_left_cancel ((m * k + m) + s)
  19. apply add_left_cancel
  20. trans m * q2 + s
  21. exact heq
  22. rewrite <- hgap
  23. specialize add_comm S k
  24. specialize add_comm q
  25. rewrite add_comm
  26. specialize mul_add m
  27. specialize mul_add q
  28. specialize mul_add S k
  29. rewrite mul_add
  30. rewrite PA6
  31. specialize add_assoc (m * q)
  32. specialize add_assoc (m * k + m)
  33. specialize add_assoc s
  34. apply add_assoc
division_remainder_unique · unchanged support, not a new admission
forall m n q r q2 r2. n = m * q + r -> (exists k. k + S r = m) -> n = m * q2 + r2 -> (exists k. k + S r2 = m) -> q = q2 /\ r = r2
  1. intro m
  2. intro n
  3. intro q
  4. intro r
  5. intro q2
  6. intro r2
  7. intro h1
  8. intro hr
  9. intro h2
  10. intro hr2
  11. have hsum : m * q + r = m * q2 + r2
  12. trans n
  13. symm
  14. exact h1
  15. exact h2
  16. specialize le_total q
  17. specialize le_total q2
  18. cases le_total
  19. cases le_total_left
  20. specialize zero_or_succ x
  21. cases zero_or_succ
  22. rewrite zero_or_succ_left at le_total_left_witness
  23. specialize zero_add q
  24. rewrite zero_add at le_total_left_witness
  25. split
  26. exact le_total_left_witness
  27. specialize add_left_cancel (m * q)
  28. specialize add_left_cancel r
  29. specialize add_left_cancel r2
  30. apply add_left_cancel
  31. rewrite <- le_total_left_witness at hsum
  32. exact hsum
  33. cases zero_or_succ_right
  34. exfalso
  35. specialize positive_quotient_gap_impossible m
  36. specialize positive_quotient_gap_impossible q
  37. specialize positive_quotient_gap_impossible q2
  38. specialize positive_quotient_gap_impossible r
  39. specialize positive_quotient_gap_impossible r2
  40. specialize positive_quotient_gap_impossible x1
  41. apply positive_quotient_gap_impossible
  42. exact hr
  43. rewrite zero_or_succ_right_witness at le_total_left_witness
  44. exact le_total_left_witness
  45. exact hsum
  46. cases le_total_right
  47. specialize zero_or_succ x
  48. cases zero_or_succ
  49. rewrite zero_or_succ_left at le_total_right_witness
  50. specialize zero_add q2
  51. rewrite zero_add at le_total_right_witness
  52. split
  53. symm
  54. exact le_total_right_witness
  55. specialize add_left_cancel (m * q)
  56. specialize add_left_cancel r
  57. specialize add_left_cancel r2
  58. apply add_left_cancel
  59. rewrite le_total_right_witness at hsum
  60. exact hsum
  61. cases zero_or_succ_right
  62. exfalso
  63. specialize positive_quotient_gap_impossible m
  64. specialize positive_quotient_gap_impossible q2
  65. specialize positive_quotient_gap_impossible q
  66. specialize positive_quotient_gap_impossible r2
  67. specialize positive_quotient_gap_impossible r
  68. specialize positive_quotient_gap_impossible x1
  69. apply positive_quotient_gap_impossible
  70. exact hr2
  71. rewrite zero_or_succ_right_witness at le_total_right_witness
  72. exact le_total_right_witness
  73. symm
  74. exact hsum
add_eq_zero_left · unchanged support, not a new admission
forall a b. a + b = 0 -> a = 0
  1. intro a
  2. intro b
  3. intro h
  4. specialize add_eq_zero_right b
  5. specialize add_eq_zero_right a
  6. apply add_eq_zero_right
  7. trans a + b
  8. apply add_comm
  9. exact h
mul_eq_one_components · unchanged support, not a new admission
forall a b. a * b = 1 -> a = 1 /\ b = 1
  1. intro a
  2. induction a
  3. intro b
  4. intro h
  5. specialize mul_zero_left b
  6. rewrite mul_zero_left at h
  7. exfalso
  8. apply PA1
  9. symm
  10. exact h
  11. intro b
  12. induction b
  13. intro h
  14. rewrite PA5 at h
  15. exfalso
  16. apply PA1
  17. symm
  18. exact h
  19. intro h
  20. rewrite PA6 at h
  21. rewrite PA4 at h
  22. have hz : S a * b + a = 0
  23. apply PA2
  24. exact h
  25. specialize add_eq_zero_right (S a * b)
  26. specialize add_eq_zero_right a
  27. have ha0 : a = 0
  28. apply add_eq_zero_right
  29. exact hz
  30. split
  31. congr
  32. exact ha0
  33. rewrite ha0 at hz
  34. rewrite ha0 at hz
  35. rewrite PA3 at hz
  36. specialize one_mul b
  37. rewrite one_mul at hz
  38. congr
  39. exact hz
mul_ne_zero · unchanged support, not a new admission
forall a b. ~(a = 0) -> ~(b = 0) -> ~(a * b = 0)
  1. intro a
  2. intro b
  3. intro ha
  4. intro hb
  5. intro hab
  6. specialize mul_eq_zero a
  7. specialize mul_eq_zero b
  8. have hz : a = 0 \/ b = 0
  9. apply mul_eq_zero
  10. exact hab
  11. cases hz
  12. apply ha
  13. exact hz_left
  14. apply hb
  15. exact hz_right
mul_left_cancel_nonzero · unchanged support, not a new admission
forall a b c. ~(a = 0) -> a * b = a * c -> b = c
  1. intro a
  2. induction b
  3. intro c
  4. intro ha
  5. intro h
  6. have hz : a * c = 0
  7. symm
  8. rewrite PA5 at h
  9. exact h
  10. have factors : a = 0 \/ c = 0
  11. specialize mul_eq_zero a
  12. specialize mul_eq_zero c
  13. apply mul_eq_zero
  14. exact hz
  15. cases factors
  16. exfalso
  17. apply ha
  18. exact factors_left
  19. symm
  20. exact factors_right
  21. intro c
  22. induction c
  23. intro ha
  24. intro h
  25. exfalso
  26. specialize mul_ne_zero a
  27. specialize mul_ne_zero (S b)
  28. apply mul_ne_zero
  29. exact ha
  30. specialize succ_ne_zero b
  31. exact succ_ne_zero
  32. rewrite PA5 at h
  33. exact h
  34. intro ha
  35. intro h
  36. congr
  37. apply IH
  38. exact ha
  39. apply add_right_cancel
  40. rewrite PA6 at h
  41. rewrite PA6 at h
  42. exact h
multiple_zero · unchanged support, not a new admission
forall a. exists q. 0 = a * q
  1. intro a
  2. exists 0
  3. rewrite PA5
  4. refl
multiple_refl · unchanged support, not a new admission
forall a. exists q. a = a * q
  1. intro a
  2. exists 1
  3. symm
  4. apply mul_one
multiple_mul_right · unchanged support, not a new admission
forall a n m. (exists q. n = a * q) -> exists s. n * m = a * s
  1. intro a
  2. intro n
  3. intro m
  4. intro hn
  5. cases hn
  6. exists x * m
  7. rewrite hn_witness
  8. apply mul_assoc
multiple_mul_left · unchanged support, not a new admission
forall a n m. (exists q. n = a * q) -> exists s. m * n = a * s
  1. intro a
  2. intro n
  3. intro m
  4. intro hn
  5. suffices hswap : m * n = n * m
  6. rewrite hswap
  7. apply multiple_mul_right
  8. exact hn
  9. apply mul_comm
multiple_trans · unchanged support, not a new admission
forall a b n. (exists q. n = a * q) -> (exists r. a = b * r) -> exists s. n = b * s
  1. intro a
  2. intro b
  3. intro n
  4. intro hn
  5. intro hab
  6. cases hn
  7. cases hab
  8. exists x1 * x
  9. rewrite hn_witness
  10. rewrite hab_witness
  11. apply mul_assoc
divisor_le_nonzero · unchanged support, not a new admission
forall d n. ~(n = 0) -> (exists q. n = d * q) -> exists k. k + d = n
  1. intro d
  2. intro n
  3. intro hn
  4. intro hd
  5. cases hd
  6. have hq : ~(x = 0)
  7. intro hx
  8. apply hn
  9. trans d * x
  10. exact hd_witness
  11. rewrite hx
  12. apply PA5
  13. specialize one_le_of_ne_zero x
  14. have h1q : exists k. k + 1 = x
  15. apply one_le_of_ne_zero
  16. exact hq
  17. cases h1q
  18. have hs : S x1 = x
  19. trans x1 + 1
  20. simp
  21. exact h1q_witness
  22. exists d * x1
  23. trans d * S x1
  24. symm
  25. apply PA6
  26. trans d * x
  27. congr
  28. refl
  29. exact hs
  30. symm
  31. exact hd_witness
divisor_one · unchanged support, not a new admission
forall d. (exists y. 1 = d * y) -> d = 1
  1. intro d
  2. intro h
  3. cases h
  4. specialize mul_eq_one_components d
  5. specialize mul_eq_one_components x
  6. have parts : d = 1 /\ x = 1
  7. apply mul_eq_one_components
  8. symm
  9. exact h_witness
  10. cases parts
  11. exact parts_left
multiple_antisymm · unchanged support, not a new admission
forall a b. (exists x. b = a * x) -> (exists y. a = b * y) -> a = b
  1. intro a
  2. intro b
  3. intro hab
  4. intro hba
  5. cases hab
  6. cases hba
  7. specialize zero_or_succ a
  8. cases zero_or_succ
  9. rewrite zero_or_succ_left
  10. rewrite zero_or_succ_left at hab_witness
  11. specialize mul_zero_left x
  12. rewrite mul_zero_left at hab_witness
  13. symm
  14. exact hab_witness
  15. cases zero_or_succ_right
  16. have ha : ~(a = 0)
  17. intro ha0
  18. rewrite zero_or_succ_right_witness at ha0
  19. apply PA1
  20. exact ha0
  21. have hcycle : a = a * (x * x1)
  22. trans b * x1
  23. exact hba_witness
  24. trans (a * x) * x1
  25. congr
  26. exact hab_witness
  27. refl
  28. apply mul_assoc
  29. specialize mul_left_cancel_nonzero a
  30. specialize mul_left_cancel_nonzero 1
  31. specialize mul_left_cancel_nonzero (x * x1)
  32. have hunit : 1 = x * x1
  33. apply mul_left_cancel_nonzero
  34. exact ha
  35. specialize mul_one a
  36. trans a
  37. apply mul_one
  38. exact hcycle
  39. specialize mul_eq_one_components x
  40. specialize mul_eq_one_components x1
  41. have hparts : x = 1 /\ x1 = 1
  42. apply mul_eq_one_components
  43. symm
  44. exact hunit
  45. cases hparts
  46. symm
  47. trans a * x
  48. exact hab_witness
  49. rewrite hparts_left
  50. apply mul_one
factor_difference · unchanged support, not a new admission
forall c u v r. c * u = c * v + r -> exists w. r = c * w
  1. intro c
  2. induction u
  3. intro v
  4. intro r
  5. intro h
  6. rewrite PA5 at h
  7. have hr : r = 0
  8. apply add_eq_zero_right
  9. symm
  10. exact h
  11. exists 0
  12. rewrite hr
  13. rewrite PA5
  14. refl
  15. intro v
  16. induction v
  17. intro r
  18. intro h
  19. exists S u
  20. rewrite PA5 at h
  21. specialize zero_add r
  22. rewrite zero_add at h
  23. symm
  24. exact h
  25. intro r
  26. intro h
  27. have hred : c * u = c * v + r
  28. specialize add_right_cancel (c * u)
  29. specialize add_right_cancel (c * v + r)
  30. specialize add_right_cancel c
  31. apply add_right_cancel
  32. rewrite PA6 at h
  33. rewrite PA6 at h
  34. trans (c * v + c) + r
  35. exact h
  36. trans c * v + (c + r)
  37. apply add_assoc
  38. trans c * v + (r + c)
  39. congr
  40. refl
  41. apply add_comm
  42. symm
  43. apply add_assoc
  44. specialize IH v
  45. specialize IH r
  46. apply IH
  47. exact hred
divides_remainder · unchanged support, not a new admission
forall c a b q r. (exists u. a = c * u) -> (exists v. b = c * v) -> a = b * q + r -> exists w. r = c * w
  1. intro c
  2. intro a
  3. intro b
  4. intro q
  5. intro r
  6. intro ha
  7. intro hb
  8. intro h
  9. cases ha
  10. cases hb
  11. specialize factor_difference c
  12. specialize factor_difference x
  13. specialize factor_difference (x1 * q)
  14. specialize factor_difference r
  15. apply factor_difference
  16. trans a
  17. symm
  18. exact ha_witness
  19. trans b * q + r
  20. exact h
  21. congr
  22. rewrite hb_witness
  23. apply mul_assoc
  24. refl
divides_linear_step · unchanged support, not a new admission
forall c b q r. (exists u. b = c * u) -> (exists v. r = c * v) -> exists w. b * q + r = c * w
  1. intro c
  2. intro b
  3. intro q
  4. intro r
  5. intro hb
  6. intro hr
  7. cases hb
  8. cases hr
  9. exists x * q + x1
  10. rewrite hb_witness
  11. rewrite hr_witness
  12. trans c * (x * q) + c * x1
  13. congr
  14. apply mul_assoc
  15. refl
  16. symm
  17. apply mul_add
is_gcd_zero_right · unchanged support, not a new admission
forall a. (((exists x. a = a * x) /\ (exists y. 0 = a * y)) /\ forall c. (exists u. a = c * u) -> (exists v. 0 = c * v) -> exists w. a = c * w)
  1. intro a
  2. split
  3. split
  4. specialize multiple_refl a
  5. exact multiple_refl
  6. specialize multiple_zero a
  7. exact multiple_zero
  8. intro c
  9. intro ha
  10. intro hz
  11. exact ha
is_gcd_symm · unchanged support, not a new admission
forall g a b. (((exists x. a = g * x) /\ (exists y. b = g * y)) /\ forall c. (exists u. a = c * u) -> (exists v. b = c * v) -> exists w. g = c * w) -> ((exists x. b = g * x) /\ (exists y. a = g * y)) /\ forall c. (exists u. b = c * u) -> (exists v. a = c * v) -> exists w. g = c * w
  1. intro g
  2. intro a
  3. intro b
  4. intro h
  5. cases h
  6. cases h_left
  7. split
  8. split
  9. exact h_left_right
  10. exact h_left_left
  11. intro c
  12. intro hb
  13. intro ha
  14. specialize h_right c
  15. apply h_right
  16. exact ha
  17. exact hb
is_gcd_dvd_left · unchanged support, not a new admission
forall g a b. (((exists x. a = g * x) /\ (exists y. b = g * y)) /\ forall c. (exists u. a = c * u) -> (exists v. b = c * v) -> exists w. g = c * w) -> exists x. a = g * x
  1. intro g
  2. intro a
  3. intro b
  4. intro h
  5. cases h
  6. cases h_left
  7. exact h_left_left
is_gcd_dvd_right · unchanged support, not a new admission
forall g a b. (((exists x. a = g * x) /\ (exists y. b = g * y)) /\ forall c. (exists u. a = c * u) -> (exists v. b = c * v) -> exists w. g = c * w) -> exists y. b = g * y
  1. intro g
  2. intro a
  3. intro b
  4. intro h
  5. cases h
  6. cases h_left
  7. exact h_left_right
is_gcd_greatest · unchanged support, not a new admission
forall g a b c. (((exists x. a = g * x) /\ (exists y. b = g * y)) /\ forall d. (exists u. a = d * u) -> (exists v. b = d * v) -> exists w. g = d * w) -> (exists u. a = c * u) -> (exists v. b = c * v) -> exists w. g = c * w
  1. intro g
  2. intro a
  3. intro b
  4. intro c
  5. intro h
  6. intro ha
  7. intro hb
  8. cases h
  9. specialize h_right c
  10. apply h_right
  11. exact ha
  12. exact hb
is_gcd_unique · unchanged support, not a new admission
forall g h a b. (((exists x. a = g * x) /\ (exists y. b = g * y)) /\ forall c. (exists u. a = c * u) -> (exists v. b = c * v) -> exists w. g = c * w) -> (((exists x. a = h * x) /\ (exists y. b = h * y)) /\ forall c. (exists u. a = c * u) -> (exists v. b = c * v) -> exists w. h = c * w) -> g = h
  1. intro g
  2. intro h
  3. intro a
  4. intro b
  5. intro hg
  6. intro hh
  7. cases hg
  8. cases hg_left
  9. cases hh
  10. cases hh_left
  11. specialize hg_right h
  12. have hdg : exists w. g = h * w
  13. apply hg_right
  14. exact hh_left_left
  15. exact hh_left_right
  16. specialize hh_right g
  17. have gdh : exists w. h = g * w
  18. apply hh_right
  19. exact hg_left_left
  20. exact hg_left_right
  21. specialize multiple_antisymm g
  22. specialize multiple_antisymm h
  23. apply multiple_antisymm
  24. exact gdh
  25. exact hdg
is_gcd_euclid_forward · unchanged support, not a new admission
forall d a b q r. a = b * q + r -> (((exists x. b = d * x) /\ (exists y. r = d * y)) /\ forall c. (exists u. b = c * u) -> (exists v. r = c * v) -> exists w. d = c * w) -> (((exists x. a = d * x) /\ (exists y. b = d * y)) /\ forall c. (exists u. a = c * u) -> (exists v. b = c * v) -> exists w. d = c * w)
  1. intro d
  2. intro a
  3. intro b
  4. intro q
  5. intro r
  6. intro hstep
  7. intro hg
  8. cases hg
  9. cases hg_left
  10. split
  11. split
  12. rewrite hstep
  13. specialize divides_linear_step d
  14. specialize divides_linear_step b
  15. specialize divides_linear_step q
  16. specialize divides_linear_step r
  17. apply divides_linear_step
  18. exact hg_left_left
  19. exact hg_left_right
  20. exact hg_left_left
  21. intro c
  22. intro hca
  23. intro hcb
  24. specialize hg_right c
  25. apply hg_right
  26. exact hcb
  27. specialize divides_remainder c
  28. specialize divides_remainder a
  29. specialize divides_remainder b
  30. specialize divides_remainder q
  31. specialize divides_remainder r
  32. apply divides_remainder
  33. exact hca
  34. exact hcb
  35. exact hstep
gcd_exists_up_to · unchanged support, not a new admission
forall B b. (exists t. t + b = B) -> forall a. exists d. (((exists x. a = d * x) /\ (exists y. b = d * y)) /\ forall c. (exists u. a = c * u) -> (exists v. b = c * v) -> exists w. d = c * w)
  1. intro B
  2. induction B
  3. intro b
  4. intro hb
  5. intro a
  6. have hb0 : b = 0
  7. apply le_zero
  8. exact hb
  9. exists a
  10. split
  11. split
  12. specialize multiple_refl a
  13. exact multiple_refl
  14. exists 0
  15. trans 0
  16. exact hb0
  17. symm
  18. apply PA5
  19. intro c
  20. intro hca
  21. intro hcb
  22. exact hca
  23. intro b
  24. intro hb
  25. intro a
  26. specialize le_eq_or_lt b
  27. specialize le_eq_or_lt (S B)
  28. have hsplit : b = S B \/ exists k. k + S b = S B
  29. apply le_eq_or_lt
  30. exact hb
  31. cases hsplit
  32. have hb0 : ~(b = 0)
  33. intro hzero
  34. apply PA1
  35. trans b
  36. symm
  37. exact hsplit_left
  38. exact hzero
  39. have hdiv : exists q r. a = b * q + r /\ exists k. k + S r = b
  40. apply division_remainder_exists
  41. exact hb0
  42. cases hdiv
  43. cases hdiv_witness
  44. cases hdiv_witness_witness
  45. have hrB : exists k. k + x1 = B
  46. apply le_of_succ_le_succ
  47. rewrite hsplit_left at hdiv_witness_witness_right
  48. exact hdiv_witness_witness_right
  49. have hsmall : exists d. (((exists u. b = d * u) /\ (exists v. x1 = d * v)) /\ forall c. (exists s. b = c * s) -> (exists t. x1 = c * t) -> exists w. d = c * w)
  50. specialize IH x1
  51. have hall : forall z. exists d. (((exists u. z = d * u) /\ (exists v. x1 = d * v)) /\ forall c. (exists s. z = c * s) -> (exists t. x1 = c * t) -> exists w. d = c * w)
  52. apply IH
  53. exact hrB
  54. specialize hall b
  55. exact hall
  56. cases hsmall
  57. exists x2
  58. specialize is_gcd_euclid_forward x2
  59. specialize is_gcd_euclid_forward a
  60. specialize is_gcd_euclid_forward b
  61. specialize is_gcd_euclid_forward x
  62. specialize is_gcd_euclid_forward x1
  63. apply is_gcd_euclid_forward
  64. exact hdiv_witness_witness_left
  65. exact hsmall_witness
  66. have hbB : exists k. k + b = B
  67. apply le_of_succ_le_succ
  68. exact hsplit_right
  69. specialize IH b
  70. have hall : forall z. exists d. (((exists u. z = d * u) /\ (exists v. b = d * v)) /\ forall c. (exists s. z = c * s) -> (exists t. b = c * t) -> exists w. d = c * w)
  71. apply IH
  72. exact hbB
  73. specialize hall a
  74. exact hall
gcd_exists_relational · unchanged support, not a new admission
forall a b. exists d. (((exists x. a = d * x) /\ (exists y. b = d * y)) /\ forall c. (exists u. a = c * u) -> (exists v. b = c * v) -> exists w. d = c * w)
  1. intro a
  2. intro b
  3. specialize gcd_exists_up_to b
  4. specialize gcd_exists_up_to b
  5. have hbb : exists t. t + b = b
  6. apply le_refl
  7. have hall : forall z. exists d. (((exists x. z = d * x) /\ (exists y. b = d * y)) /\ forall c. (exists u. z = c * u) -> (exists v. b = c * v) -> exists w. d = c * w)
  8. apply gcd_exists_up_to
  9. exact hbb
  10. specialize hall a
  11. exact hall
coprime_symm · unchanged support, not a new admission
forall a b. (forall d. (exists x. a = d * x) -> (exists y. b = d * y) -> d = 1) -> forall c. (exists u. b = c * u) -> (exists v. a = c * v) -> c = 1
  1. intro a
  2. intro b
  3. intro h
  4. intro c
  5. intro hb
  6. intro ha
  7. specialize h c
  8. apply h
  9. exact ha
  10. exact hb
coprime_one_left · unchanged support, not a new admission
forall a d. (exists x. 1 = d * x) -> (exists y. a = d * y) -> d = 1
  1. intro a
  2. intro d
  3. intro h1
  4. intro ha
  5. specialize divisor_one d
  6. apply divisor_one
  7. exact h1
is_gcd_one_to_coprime · unchanged support, not a new admission
forall a b. (((exists x. a = 1 * x) /\ (exists y. b = 1 * y)) /\ forall d. (exists u. a = d * u) -> (exists v. b = d * v) -> exists w. 1 = d * w) -> forall c. (exists u. a = c * u) -> (exists v. b = c * v) -> c = 1
  1. intro a
  2. intro b
  3. intro hg
  4. intro c
  5. intro ha
  6. intro hb
  7. cases hg
  8. specialize hg_right c
  9. have hd : exists w. 1 = c * w
  10. apply hg_right
  11. exact ha
  12. exact hb
  13. specialize divisor_one c
  14. apply divisor_one
  15. exact hd
add_permute_outer · unchanged support, not a new admission
forall a b c d. (a + b) + (c + d) = (c + b) + (a + d)
  1. intro a
  2. intro b
  3. intro c
  4. intro d
  5. trans a + (b + (c + d))
  6. apply add_assoc
  7. trans a + ((b + c) + d)
  8. congr
  9. refl
  10. symm
  11. apply add_assoc
  12. trans a + ((c + b) + d)
  13. congr
  14. refl
  15. congr
  16. apply add_comm
  17. refl
  18. trans (a + (c + b)) + d
  19. symm
  20. apply add_assoc
  21. trans ((c + b) + a) + d
  22. congr
  23. apply add_comm
  24. refl
  25. apply add_assoc
balanced_bezout_euclid_step · unchanged support, not a new admission
forall a b q r d xp yp xn yn. a = b * q + r -> b * xp + r * yp = d + (b * xn + r * yn) -> a * yp + b * (xp + q * yn) = d + (a * yn + b * (xn + q * yp))
  1. intro a
  2. intro b
  3. intro q
  4. intro r
  5. intro d
  6. intro xp
  7. intro yp
  8. intro xn
  9. intro yn
  10. intro hab
  11. intro hbez
  12. rewrite hab
  13. trans ((b * q) * yp + r * yp) + b * (xp + q * yn)
  14. congr
  15. apply add_mul
  16. refl
  17. trans ((b * q) * yp + r * yp) + (b * xp + b * (q * yn))
  18. congr
  19. refl
  20. apply mul_add
  21. trans ((b * q) * yp + r * yp) + (b * xp + (b * q) * yn)
  22. congr
  23. refl
  24. congr
  25. refl
  26. symm
  27. apply mul_assoc
  28. trans (b * xp + r * yp) + ((b * q) * yp + (b * q) * yn)
  29. apply add_permute_outer
  30. trans (b * xp + r * yp) + ((b * q) * yn + (b * q) * yp)
  31. congr
  32. refl
  33. apply add_comm
  34. trans (d + (b * xn + r * yn)) + ((b * q) * yn + (b * q) * yp)
  35. congr
  36. exact hbez
  37. refl
  38. trans d + ((b * xn + r * yn) + ((b * q) * yn + (b * q) * yp))
  39. apply add_assoc
  40. trans d + (((b * q) * yn + r * yn) + (b * xn + (b * q) * yp))
  41. congr
  42. refl
  43. apply add_permute_outer
  44. trans d + ((b * q + r) * yn + (b * xn + (b * q) * yp))
  45. congr
  46. refl
  47. congr
  48. symm
  49. apply add_mul
  50. refl
  51. trans d + ((b * q + r) * yn + (b * xn + b * (q * yp)))
  52. congr
  53. refl
  54. congr
  55. refl
  56. congr
  57. refl
  58. apply mul_assoc
  59. congr
  60. refl
  61. congr
  62. congr
  63. symm
  64. exact hab
  65. refl
  66. symm
  67. apply mul_add
gcd_balanced_bezout_exists_up_to · unchanged support, not a new admission
forall B b. (exists t. t + b = B) -> forall a. exists d. ((((exists x. a = d * x) /\ (exists y. b = d * y)) /\ forall c. (exists u. a = c * u) -> (exists v. b = c * v) -> exists w. d = c * w) /\ exists xp yp xn yn. a * xp + b * yp = d + (a * xn + b * yn))
  1. intro B
  2. induction B
  3. intro b
  4. intro hb
  5. intro a
  6. have hb0 : b = 0
  7. apply le_zero
  8. exact hb
  9. exists a
  10. split
  11. rewrite hb0
  12. rewrite hb0
  13. specialize is_gcd_zero_right a
  14. exact is_gcd_zero_right
  15. exists 1
  16. exists 0
  17. exists 0
  18. exists 0
  19. rewrite hb0
  20. simp [zero_add]
  21. intro b
  22. intro hb
  23. intro a
  24. specialize le_eq_or_lt b
  25. specialize le_eq_or_lt (S B)
  26. have hsplit : b = S B \/ exists k. k + S b = S B
  27. apply le_eq_or_lt
  28. exact hb
  29. cases hsplit
  30. have hb0 : ~(b = 0)
  31. intro hzero
  32. apply PA1
  33. trans b
  34. symm
  35. exact hsplit_left
  36. exact hzero
  37. have hdiv : exists q r. a = b * q + r /\ exists k. k + S r = b
  38. apply division_remainder_exists
  39. exact hb0
  40. cases hdiv
  41. cases hdiv_witness
  42. cases hdiv_witness_witness
  43. have hrB : exists k. k + x1 = B
  44. apply le_of_succ_le_succ
  45. rewrite hsplit_left at hdiv_witness_witness_right
  46. exact hdiv_witness_witness_right
  47. have hsmall : exists d. ((((exists u. b = d * u) /\ (exists v. x1 = d * v)) /\ forall c. (exists s. b = c * s) -> (exists t. x1 = c * t) -> exists w. d = c * w) /\ exists xp yp xn yn. b * xp + x1 * yp = d + (b * xn + x1 * yn))
  48. specialize IH x1
  49. have hall : forall z. exists d. ((((exists u. z = d * u) /\ (exists v. x1 = d * v)) /\ forall c. (exists s. z = c * s) -> (exists t. x1 = c * t) -> exists w. d = c * w) /\ exists xp yp xn yn. z * xp + x1 * yp = d + (z * xn + x1 * yn))
  50. apply IH
  51. exact hrB
  52. specialize hall b
  53. exact hall
  54. cases hsmall
  55. cases hsmall_witness
  56. cases hsmall_witness_right
  57. cases hsmall_witness_right_witness
  58. cases hsmall_witness_right_witness_witness
  59. cases hsmall_witness_right_witness_witness_witness
  60. exists x2
  61. split
  62. apply is_gcd_euclid_forward
  63. exact hdiv_witness_witness_left
  64. exact hsmall_witness_left
  65. exists x4
  66. exists x3 + x * x6
  67. exists x6
  68. exists x5 + x * x4
  69. apply balanced_bezout_euclid_step
  70. exact hdiv_witness_witness_left
  71. exact hsmall_witness_right_witness_witness_witness_witness
  72. have hbB : exists k. k + b = B
  73. apply le_of_succ_le_succ
  74. exact hsplit_right
  75. specialize IH b
  76. have hall : forall z. exists d. ((((exists u. z = d * u) /\ (exists v. b = d * v)) /\ forall c. (exists s. z = c * s) -> (exists t. b = c * t) -> exists w. d = c * w) /\ exists xp yp xn yn. z * xp + b * yp = d + (z * xn + b * yn))
  77. apply IH
  78. exact hbB
  79. specialize hall a
  80. exact hall
gcd_balanced_bezout_exists · unchanged support, not a new admission
forall a b. exists d. ((((exists x. a = d * x) /\ (exists y. b = d * y)) /\ forall c. (exists u. a = c * u) -> (exists v. b = c * v) -> exists w. d = c * w) /\ exists xp yp xn yn. a * xp + b * yp = d + (a * xn + b * yn))
  1. intro a
  2. intro b
  3. specialize gcd_balanced_bezout_exists_up_to b
  4. specialize gcd_balanced_bezout_exists_up_to b
  5. have hbb : exists t. t + b = b
  6. apply le_refl
  7. have hall : forall z. exists d. ((((exists x. z = d * x) /\ (exists y. b = d * y)) /\ forall c. (exists u. z = c * u) -> (exists v. b = c * v) -> exists w. d = c * w) /\ exists xp yp xn yn. z * xp + b * yp = d + (z * xn + b * yn))
  8. apply gcd_balanced_bezout_exists_up_to
  9. exact hbb
  10. specialize hall a
  11. exact hall
balanced_combination_scale_right · unchanged support, not a new admission
forall a b d xp yp xn yn z. a * xp + b * yp = d + (a * xn + b * yn) -> a * (xp * z) + (b * z) * yp = d * z + (a * (xn * z) + (b * z) * yn)
  1. intro a
  2. intro b
  3. intro d
  4. intro xp
  5. intro yp
  6. intro xn
  7. intro yn
  8. intro z
  9. intro h
  10. trans (a * xp) * z + (b * z) * yp
  11. congr
  12. symm
  13. apply mul_assoc
  14. refl
  15. trans (a * xp) * z + (b * yp) * z
  16. congr
  17. refl
  18. trans b * (z * yp)
  19. apply mul_assoc
  20. trans b * (yp * z)
  21. congr
  22. refl
  23. apply mul_comm
  24. symm
  25. apply mul_assoc
  26. trans (a * xp + b * yp) * z
  27. symm
  28. apply add_mul
  29. trans (d + (a * xn + b * yn)) * z
  30. congr
  31. exact h
  32. refl
  33. trans d * z + (a * xn + b * yn) * z
  34. apply add_mul
  35. trans d * z + ((a * xn) * z + (b * yn) * z)
  36. congr
  37. refl
  38. apply add_mul
  39. trans d * z + (a * (xn * z) + (b * yn) * z)
  40. congr
  41. refl
  42. congr
  43. apply mul_assoc
  44. refl
  45. congr
  46. refl
  47. congr
  48. refl
  49. trans b * (yn * z)
  50. apply mul_assoc
  51. trans b * (z * yn)
  52. congr
  53. refl
  54. apply mul_comm
  55. symm
  56. apply mul_assoc
common_divisor_divides_balanced_result · unchanged support, not a new admission
forall c a b d xp yp xn yn. (exists u. a = c * u) -> (exists v. b = c * v) -> a * xp + b * yp = d + (a * xn + b * yn) -> exists w. d = c * w
  1. intro c
  2. intro a
  3. intro b
  4. intro d
  5. intro xp
  6. intro yp
  7. intro xn
  8. intro yn
  9. intro ha
  10. intro hb
  11. intro h
  12. cases ha
  13. cases hb
  14. specialize factor_difference c
  15. specialize factor_difference (x * xp + x1 * yp)
  16. specialize factor_difference (x * xn + x1 * yn)
  17. specialize factor_difference d
  18. apply factor_difference
  19. trans c * (x * xp) + c * (x1 * yp)
  20. apply mul_add
  21. trans (c * x) * xp + (c * x1) * yp
  22. congr
  23. symm
  24. apply mul_assoc
  25. symm
  26. apply mul_assoc
  27. trans a * xp + b * yp
  28. rewrite ha_witness
  29. rewrite hb_witness
  30. refl
  31. trans d + (a * xn + b * yn)
  32. exact h
  33. trans (a * xn + b * yn) + d
  34. apply add_comm
  35. trans ((c * x) * xn + (c * x1) * yn) + d
  36. rewrite ha_witness
  37. rewrite hb_witness
  38. refl
  39. trans (c * (x * xn) + c * (x1 * yn)) + d
  40. congr
  41. congr
  42. apply mul_assoc
  43. apply mul_assoc
  44. refl
  45. congr
  46. symm
  47. apply mul_add
  48. refl
coprime_balanced_bezout · unchanged support, not a new admission
forall a b. (forall d. (exists x. a = d * x) -> (exists y. b = d * y) -> d = 1) -> exists xp yp xn yn. a * xp + b * yp = 1 + (a * xn + b * yn)
  1. intro a
  2. intro b
  3. intro hcop
  4. have hgb : exists d. ((((exists x. a = d * x) /\ (exists y. b = d * y)) /\ forall c. (exists u. a = c * u) -> (exists v. b = c * v) -> exists w. d = c * w) /\ exists xp yp xn yn. a * xp + b * yp = d + (a * xn + b * yn))
  5. apply gcd_balanced_bezout_exists
  6. cases hgb
  7. cases hgb_witness
  8. cases hgb_witness_left
  9. cases hgb_witness_left_left
  10. have hd : x = 1
  11. specialize hcop x
  12. apply hcop
  13. exact hgb_witness_left_left_left
  14. exact hgb_witness_left_left_right
  15. cases hgb_witness_right
  16. cases hgb_witness_right_witness
  17. cases hgb_witness_right_witness_witness
  18. cases hgb_witness_right_witness_witness_witness
  19. exists x1
  20. exists x2
  21. exists x3
  22. exists x4
  23. rewrite hd at hgb_witness_right_witness_witness_witness_witness
  24. exact hgb_witness_right_witness_witness_witness_witness
gauss_coprime_cancel · unchanged support, not a new admission
forall a b z. (forall d. (exists x. a = d * x) -> (exists y. b = d * y) -> d = 1) -> (exists q. b * z = a * q) -> exists w. z = a * w
  1. intro a
  2. intro b
  3. intro z
  4. intro hcop
  5. intro hdiv
  6. have hbez : exists xp yp xn yn. a * xp + b * yp = 1 + (a * xn + b * yn)
  7. apply coprime_balanced_bezout
  8. exact hcop
  9. cases hbez
  10. cases hbez_witness
  11. cases hbez_witness_witness
  12. cases hbez_witness_witness_witness
  13. have hscaled : a * (x * z) + (b * z) * x1 = 1 * z + (a * (x2 * z) + (b * z) * x3)
  14. apply balanced_combination_scale_right
  15. exact hbez_witness_witness_witness_witness
  16. specialize one_mul z
  17. rewrite one_mul at hscaled
  18. specialize common_divisor_divides_balanced_result a
  19. specialize common_divisor_divides_balanced_result a
  20. specialize common_divisor_divides_balanced_result (b * z)
  21. specialize common_divisor_divides_balanced_result z
  22. specialize common_divisor_divides_balanced_result (x * z)
  23. specialize common_divisor_divides_balanced_result x1
  24. specialize common_divisor_divides_balanced_result (x2 * z)
  25. specialize common_divisor_divides_balanced_result x3
  26. apply common_divisor_divides_balanced_result
  27. specialize multiple_refl a
  28. exact multiple_refl
  29. exact hdiv
  30. exact hscaled
eq_decidable · unchanged support, not a new admission
forall a b. a = b \/ ~(a = b)
  1. intro a
  2. induction a
  3. intro b
  4. induction b
  5. left
  6. refl
  7. right
  8. intro h
  9. apply PA1
  10. symm
  11. exact h
  12. intro b
  13. induction b
  14. right
  15. intro h
  16. apply PA1
  17. exact h
  18. specialize IH b
  19. cases IH
  20. left
  21. congr
  22. exact IH_left
  23. right
  24. intro h
  25. apply IH_right
  26. apply PA2
  27. exact h
prime_nonzero · unchanged support, not a new admission
forall p. (~(p = 1) /\ forall a b. p = a * b -> a = 1 \/ b = 1) -> ~(p = 0)
  1. intro p
  2. intro hp
  3. intro hp0
  4. cases hp
  5. specialize hp_right 0
  6. specialize hp_right 0
  7. have hunit : 0 = 1 \/ 0 = 1
  8. apply hp_right
  9. rewrite hp0
  10. symm
  11. apply mul_zero_left
  12. cases hunit
  13. specialize succ_ne_zero 0
  14. apply succ_ne_zero
  15. symm
  16. exact hunit_left
  17. specialize succ_ne_zero 0
  18. apply succ_ne_zero
  19. symm
  20. exact hunit_right
prime_divisor_eq_one_or_self · unchanged support, not a new admission
forall p g. (~(p = 1) /\ forall c d. p = c * d -> c = 1 \/ d = 1) -> (exists x. p = g * x) -> g = 1 \/ p = g
  1. intro p
  2. intro g
  3. intro hp
  4. intro hdiv
  5. cases hp
  6. cases hdiv
  7. specialize hp_right g
  8. specialize hp_right x
  9. have hfactor : g = 1 \/ x = 1
  10. apply hp_right
  11. exact hdiv_witness
  12. cases hfactor
  13. left
  14. exact hfactor_left
  15. right
  16. trans g * x
  17. exact hdiv_witness
  18. rewrite hfactor_right
  19. apply mul_one
euclid_prime_dvd_product · unchanged support, not a new admission
forall p a b. (~(p = 1) /\ forall c d. p = c * d -> c = 1 \/ d = 1) -> (exists k. a * b = p * k) -> (exists u. a = p * u) \/ exists v. b = p * v
  1. intro p
  2. intro a
  3. intro b
  4. intro hp
  5. intro hab
  6. have hg : exists g. (((exists x. p = g * x) /\ (exists y. a = g * y)) /\ forall c. (exists u. p = c * u) -> (exists v. a = c * v) -> exists w. g = c * w)
  7. apply gcd_exists_relational
  8. cases hg
  9. have hgfull : (((exists u. p = x * u) /\ (exists v. a = x * v)) /\ forall c. (exists s. p = c * s) -> (exists t. a = c * t) -> exists w. x = c * w)
  10. exact hg_witness
  11. cases hg_witness
  12. cases hg_witness_left
  13. have hfactor : x = 1 \/ p = x
  14. specialize prime_divisor_eq_one_or_self p
  15. specialize prime_divisor_eq_one_or_self x
  16. apply prime_divisor_eq_one_or_self
  17. exact hp
  18. exact hg_witness_left_left
  19. cases hfactor
  20. right
  21. apply gauss_coprime_cancel
  22. have hcop : forall d. (exists u. p = d * u) -> (exists v. a = d * v) -> d = 1
  23. apply is_gcd_one_to_coprime
  24. have hg1 : (((exists u. p = 1 * u) /\ (exists v. a = 1 * v)) /\ forall c. (exists s. p = c * s) -> (exists t. a = c * t) -> exists w. 1 = c * w)
  25. rewrite <- hfactor_left
  26. rewrite <- hfactor_left
  27. rewrite <- hfactor_left
  28. exact hgfull
  29. exact hg1
  30. exact hcop
  31. exact hab
  32. left
  33. cases hg_witness_left_right
  34. exists x1
  35. rewrite hfactor_right
  36. exact hg_witness_left_right_witness
mod_eq_refl · unchanged support, not a new admission
forall m a. exists u v. a + m * u = a + m * v
  1. intro m
  2. intro a
  3. exists 0
  4. exists 0
  5. refl
mod_eq_symm · unchanged support, not a new admission
forall m a b. (exists u v. a + m * u = b + m * v) -> exists r s. b + m * r = a + m * s
  1. intro m
  2. intro a
  3. intro b
  4. intro h
  5. cases h
  6. cases h_witness
  7. exists x1
  8. exists x
  9. symm
  10. exact h_witness_witness
mod_eq_trans · unchanged support, not a new admission
forall m a b c. (exists u v. a + m * u = b + m * v) -> (exists r s. b + m * r = c + m * s) -> exists x y. a + m * x = c + m * y
  1. intro m
  2. intro a
  3. intro b
  4. intro c
  5. intro hab
  6. intro hbc
  7. cases hab
  8. cases hab_witness
  9. cases hbc
  10. cases hbc_witness
  11. exists x + x2
  12. exists x3 + x1
  13. trans a + (m * x + m * x2)
  14. congr
  15. refl
  16. apply mul_add
  17. trans (a + m * x) + m * x2
  18. symm
  19. apply add_assoc
  20. trans (b + m * x1) + m * x2
  21. congr
  22. exact hab_witness_witness
  23. refl
  24. trans b + (m * x1 + m * x2)
  25. apply add_assoc
  26. trans b + (m * x2 + m * x1)
  27. congr
  28. refl
  29. apply add_comm
  30. trans (b + m * x2) + m * x1
  31. symm
  32. apply add_assoc
  33. trans (c + m * x3) + m * x1
  34. congr
  35. exact hbc_witness_witness
  36. refl
  37. trans c + (m * x3 + m * x1)
  38. apply add_assoc
  39. congr
  40. refl
  41. symm
  42. apply mul_add
mod_eq_add · unchanged support, not a new admission
forall m a b c d. (exists u v. a + m * u = b + m * v) -> (exists r s. c + m * r = d + m * s) -> exists x y. (a + c) + m * x = (b + d) + m * y
  1. intro m
  2. intro a
  3. intro b
  4. intro c
  5. intro d
  6. intro hab
  7. intro hcd
  8. cases hab
  9. cases hab_witness
  10. cases hcd
  11. cases hcd_witness
  12. exists x2 + x
  13. exists x3 + x1
  14. trans (a + c) + (m * x2 + m * x)
  15. congr
  16. refl
  17. apply mul_add
  18. trans (m * x2 + c) + (a + m * x)
  19. apply add_permute_outer
  20. trans (c + m * x2) + (a + m * x)
  21. congr
  22. apply add_comm
  23. refl
  24. trans (a + m * x) + (c + m * x2)
  25. apply add_comm
  26. trans (b + m * x1) + (d + m * x3)
  27. congr
  28. exact hab_witness_witness
  29. exact hcd_witness_witness
  30. trans (d + m * x3) + (b + m * x1)
  31. apply add_comm
  32. trans (m * x3 + d) + (b + m * x1)
  33. congr
  34. apply add_comm
  35. refl
  36. trans (b + d) + (m * x3 + m * x1)
  37. symm
  38. apply add_permute_outer
  39. congr
  40. refl
  41. symm
  42. apply mul_add
mod_eq_mul_right · unchanged support, not a new admission
forall m a b c. (exists u v. a + m * u = b + m * v) -> exists r s. (a * c) + m * r = (b * c) + m * s
  1. intro m
  2. intro a
  3. intro b
  4. intro c
  5. intro h
  6. cases h
  7. cases h_witness
  8. exists x * c
  9. exists x1 * c
  10. trans a * c + (m * x) * c
  11. congr
  12. refl
  13. symm
  14. apply mul_assoc
  15. trans (a + m * x) * c
  16. symm
  17. apply add_mul
  18. trans (b + m * x1) * c
  19. congr
  20. exact h_witness_witness
  21. refl
  22. trans b * c + (m * x1) * c
  23. apply add_mul
  24. congr
  25. refl
  26. apply mul_assoc
mod_eq_mul_left · unchanged support, not a new admission
forall m a b c. (exists u v. a + m * u = b + m * v) -> exists r s. (c * a) + m * r = (c * b) + m * s
  1. intro m
  2. intro a
  3. intro b
  4. intro c
  5. intro h
  6. specialize mod_eq_mul_right m
  7. specialize mod_eq_mul_right a
  8. specialize mod_eq_mul_right b
  9. specialize mod_eq_mul_right c
  10. have hr : exists r s. (a * c) + m * r = (b * c) + m * s
  11. apply mod_eq_mul_right
  12. exact h
  13. cases hr
  14. cases hr_witness
  15. exists x
  16. exists x1
  17. trans a * c + m * x
  18. congr
  19. apply mul_comm
  20. refl
  21. trans b * c + m * x1
  22. exact hr_witness_witness
  23. congr
  24. apply mul_comm
  25. refl
mod_eq_mul · unchanged support, not a new admission
forall m a b c d. (exists u v. a + m * u = b + m * v) -> (exists r s. c + m * r = d + m * s) -> exists x y. (a * c) + m * x = (b * d) + m * y
  1. intro m
  2. intro a
  3. intro b
  4. intro c
  5. intro d
  6. intro hab
  7. intro hcd
  8. have hacbc : exists r s. (a * c) + m * r = (b * c) + m * s
  9. specialize mod_eq_mul_right m
  10. specialize mod_eq_mul_right a
  11. specialize mod_eq_mul_right b
  12. specialize mod_eq_mul_right c
  13. apply mod_eq_mul_right
  14. exact hab
  15. have hbcbd : exists r s. (b * c) + m * r = (b * d) + m * s
  16. specialize mod_eq_mul_left m
  17. specialize mod_eq_mul_left c
  18. specialize mod_eq_mul_left d
  19. specialize mod_eq_mul_left b
  20. apply mod_eq_mul_left
  21. exact hcd
  22. specialize mod_eq_trans m
  23. specialize mod_eq_trans (a * c)
  24. specialize mod_eq_trans (b * c)
  25. specialize mod_eq_trans (b * d)
  26. apply mod_eq_trans
  27. exact hacbc
  28. exact hbcbd
remainder_decomposition_to_mod_eq · unchanged support, not a new admission
forall m b q x. b = q * m + x -> exists u v. b + m * u = x + m * v
  1. intro m
  2. intro b
  3. intro q
  4. intro x
  5. intro h
  6. exists 0
  7. exists q
  8. rewrite PA5
  9. rewrite PA3
  10. trans q * m + x
  11. exact h
  12. trans x + q * m
  13. apply add_comm
  14. congr
  15. refl
  16. apply mul_comm
mod_eq_bounded_unique · unchanged support, not a new admission
forall m a b. (exists ha. ha + S a = m) -> (exists hb. hb + S b = m) -> (exists u v. a + m * u = b + m * v) -> a = b
  1. intro m
  2. intro a
  3. intro b
  4. intro ha
  5. intro hb
  6. intro hab
  7. cases hab
  8. cases hab_witness
  9. have hda : a + m * x = m * x + a
  10. apply add_comm
  11. have hdb : a + m * x = m * x1 + b
  12. trans b + m * x1
  13. exact hab_witness_witness
  14. apply add_comm
  15. specialize division_remainder_unique m
  16. specialize division_remainder_unique (a + m * x)
  17. specialize division_remainder_unique x
  18. specialize division_remainder_unique a
  19. specialize division_remainder_unique x1
  20. specialize division_remainder_unique b
  21. have huniq : x = x1 /\ a = b
  22. apply division_remainder_unique
  23. exact hda
  24. exact ha
  25. exact hdb
  26. exact hb
  27. cases huniq
  28. exact huniq_right
mod_eq_to_remainder_decomposition · unchanged support, not a new admission
forall m b x. ~(m = 0) -> (exists h. h + S x = m) -> (exists u v. b + m * u = x + m * v) -> exists q. b = q * m + x
  1. intro m
  2. intro b
  3. intro x
  4. intro hm
  5. intro hx
  6. intro hbx
  7. have hdiv : exists q r. b = m * q + r /\ exists h. h + S r = m
  8. specialize division_remainder_exists m
  9. specialize division_remainder_exists b
  10. apply division_remainder_exists
  11. exact hm
  12. cases hdiv
  13. cases hdiv_witness
  14. cases hdiv_witness_witness
  15. have hremb : exists u v. x2 + m * u = b + m * v
  16. exists x1
  17. exists 0
  18. trans m * x1 + x2
  19. apply add_comm
  20. trans b
  21. symm
  22. exact hdiv_witness_witness_left
  23. symm
  24. rewrite PA5
  25. apply PA3
  26. have hremx : exists u v. x2 + m * u = x + m * v
  27. specialize mod_eq_trans m
  28. specialize mod_eq_trans x2
  29. specialize mod_eq_trans b
  30. specialize mod_eq_trans x
  31. apply mod_eq_trans
  32. exact hremb
  33. exact hbx
  34. have hrx : x2 = x
  35. specialize mod_eq_bounded_unique m
  36. specialize mod_eq_bounded_unique x2
  37. specialize mod_eq_bounded_unique x
  38. apply mod_eq_bounded_unique
  39. exact hdiv_witness_witness_right
  40. exact hx
  41. exact hremx
  42. exists x1
  43. trans m * x1 + x2
  44. exact hdiv_witness_witness_left
  45. trans x1 * m + x2
  46. congr
  47. apply mul_comm
  48. refl
  49. congr
  50. refl
  51. exact hrx
beta_modulus_nonzero · unchanged support, not a new admission
forall c i. ~(S ((S i) * c) = 0)
  1. intro c
  2. intro i
  3. specialize succ_ne_zero ((S i) * c)
  4. exact succ_ne_zero
beta_at_self_of_bound · unchanged support, not a new admission
forall c i x. (exists h. h + S x = S ((S i) * c)) -> ((exists h. h + S x = S ((S i) * c)) /\ exists q. x = q * S ((S i) * c) + x)
  1. intro c
  2. intro i
  3. intro x
  4. intro hx
  5. split
  6. exact hx
  7. exists 0
  8. specialize mul_zero_left (S ((S i) * c))
  9. rewrite mul_zero_left
  10. specialize zero_add x
  11. rewrite zero_add
  12. refl
beta_at_exists · unchanged support, not a new admission
forall b c i. exists x. ((exists h. h + S x = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + x)
  1. intro b
  2. intro c
  3. intro i
  4. have hm0 : ~(S ((S i) * c) = 0)
  5. specialize beta_modulus_nonzero c
  6. specialize beta_modulus_nonzero i
  7. exact beta_modulus_nonzero
  8. specialize division_remainder_exists (S ((S i) * c))
  9. specialize division_remainder_exists b
  10. have hdiv : exists q r. b = S ((S i) * c) * q + r /\ exists h. h + S r = S ((S i) * c)
  11. apply division_remainder_exists
  12. exact hm0
  13. cases hdiv
  14. cases hdiv_witness
  15. cases hdiv_witness_witness
  16. exists x1
  17. split
  18. exact hdiv_witness_witness_right
  19. exists x
  20. trans S ((S i) * c) * x + x1
  21. exact hdiv_witness_witness_left
  22. congr
  23. apply mul_comm
  24. refl
beta_at_unique · unchanged support, not a new admission
forall b c i x y. ((exists h. h + S x = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + x) -> ((exists h. h + S y = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + y) -> x = y
  1. intro b
  2. intro c
  3. intro i
  4. intro x
  5. intro y
  6. intro hx
  7. intro hy
  8. cases hx
  9. cases hy
  10. cases hx_right
  11. cases hy_right
  12. have hdx : b = S ((S i) * c) * x1 + x
  13. trans x1 * S ((S i) * c) + x
  14. exact hx_right_witness
  15. congr
  16. apply mul_comm
  17. refl
  18. have hdy : b = S ((S i) * c) * x2 + y
  19. trans x2 * S ((S i) * c) + y
  20. exact hy_right_witness
  21. congr
  22. apply mul_comm
  23. refl
  24. specialize division_remainder_unique (S ((S i) * c))
  25. specialize division_remainder_unique b
  26. specialize division_remainder_unique x1
  27. specialize division_remainder_unique x
  28. specialize division_remainder_unique x2
  29. specialize division_remainder_unique y
  30. have huniq : x1 = x2 /\ x = y
  31. apply division_remainder_unique
  32. exact hdx
  33. exact hx_left
  34. exact hdy
  35. exact hy_left
  36. cases huniq
  37. exact huniq_right
beta_at_of_mod_eq_bound · unchanged support, not a new admission
forall b c i x. (exists h. h + S x = S ((S i) * c)) -> (exists u v. b + S ((S i) * c) * u = x + S ((S i) * c) * v) -> ((exists h. h + S x = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + x)
  1. intro b
  2. intro c
  3. intro i
  4. intro x
  5. intro hx
  6. intro hmod
  7. split
  8. exact hx
  9. specialize mod_eq_to_remainder_decomposition (S ((S i) * c))
  10. specialize mod_eq_to_remainder_decomposition b
  11. specialize mod_eq_to_remainder_decomposition x
  12. apply mod_eq_to_remainder_decomposition
  13. specialize beta_modulus_nonzero c
  14. specialize beta_modulus_nonzero i
  15. exact beta_modulus_nonzero
  16. exact hx
  17. exact hmod
dvd_to_mod_zero · unchanged support, not a new admission
forall m a. (exists k. a = m * k) -> exists u v. a + m * u = 0 + m * v
  1. intro m
  2. intro a
  3. intro h
  4. cases h
  5. exists 0
  6. exists x
  7. rewrite h_witness
  8. simp [zero_add]
bezout_mod_left · unchanged support, not a new admission
forall m n xp yp xn yn. m * xp + n * yp = 1 + (m * xn + n * yn) -> exists u v. n * yp + m * u = (1 + n * yn) + m * v
  1. intro m
  2. intro n
  3. intro xp
  4. intro yp
  5. intro xn
  6. intro yn
  7. intro h
  8. exists xp
  9. exists xn
  10. trans m * xp + n * yp
  11. apply add_comm
  12. trans 1 + (m * xn + n * yn)
  13. exact h
  14. trans 1 + (n * yn + m * xn)
  15. congr
  16. refl
  17. apply add_comm
  18. symm
  19. apply add_assoc
bezout_mod_right · unchanged support, not a new admission
forall m n xp yp xn yn. m * xp + n * yp = 1 + (m * xn + n * yn) -> exists u v. m * xp + n * u = (1 + m * xn) + n * v
  1. intro m
  2. intro n
  3. intro xp
  4. intro yp
  5. intro xn
  6. intro yn
  7. intro h
  8. exists yp
  9. exists yn
  10. trans 1 + (m * xn + n * yn)
  11. exact h
  12. symm
  13. apply add_assoc
mod_eq_predecessor_cancel · unchanged support, not a new admission
forall k a z. exists u v. ((a + z) + k * z) + S k * u = a + S k * v
  1. intro k
  2. intro a
  3. intro z
  4. exists 0
  5. exists z
  6. rewrite PA5
  7. rewrite PA3
  8. specialize mul_succ_left k
  9. specialize mul_succ_left z
  10. rewrite mul_succ_left
  11. trans a + (z + k * z)
  12. apply add_assoc
  13. congr
  14. refl
  15. apply add_comm
binary_crt · unchanged support, not a new admission
forall m n a b. ~(m = 0) -> ~(n = 0) -> (forall d. (exists u. m = d * u) -> (exists v. n = d * v) -> d = 1) -> exists x. (exists u v. x + m * u = a + m * v) /\ (exists r s. x + n * r = b + n * s)
  1. intro m
  2. intro n
  3. intro a
  4. intro b
  5. intro hm
  6. intro hn
  7. intro hcop
  8. have hms : exists k. m = S k
  9. specialize nonzero_is_succ m
  10. apply nonzero_is_succ
  11. exact hm
  12. have hns : exists k. n = S k
  13. specialize nonzero_is_succ n
  14. apply nonzero_is_succ
  15. exact hn
  16. have hbez : exists xp yp xn yn. m * xp + n * yp = 1 + (m * xn + n * yn)
  17. specialize coprime_balanced_bezout m
  18. specialize coprime_balanced_bezout n
  19. apply coprime_balanced_bezout
  20. exact hcop
  21. cases hms
  22. cases hns
  23. cases hbez
  24. cases hbez_witness
  25. cases hbez_witness_witness
  26. cases hbez_witness_witness_witness
  27. have hbl : exists u v. n * x3 + m * u = (1 + n * x5) + m * v
  28. specialize bezout_mod_left m
  29. specialize bezout_mod_left n
  30. specialize bezout_mod_left x2
  31. specialize bezout_mod_left x3
  32. specialize bezout_mod_left x4
  33. specialize bezout_mod_left x5
  34. apply bezout_mod_left
  35. exact hbez_witness_witness_witness_witness
  36. have hbr : exists u v. m * x2 + n * u = (1 + m * x4) + n * v
  37. specialize bezout_mod_right m
  38. specialize bezout_mod_right n
  39. specialize bezout_mod_right x2
  40. specialize bezout_mod_right x3
  41. specialize bezout_mod_right x4
  42. specialize bezout_mod_right x5
  43. apply bezout_mod_right
  44. exact hbez_witness_witness_witness_witness
  45. have hal0 : exists u v. (a * (n * x3)) + m * u = (a * (1 + n * x5)) + m * v
  46. specialize mod_eq_mul_left m
  47. specialize mod_eq_mul_left (n * x3)
  48. specialize mod_eq_mul_left (1 + n * x5)
  49. specialize mod_eq_mul_left a
  50. apply mod_eq_mul_left
  51. exact hbl
  52. have hal : exists u v. (a * (n * x3)) + m * u = (a + a * (n * x5)) + m * v
  53. have haexpand : a * (1 + n * x5) = a + a * (n * x5)
  54. trans a * 1 + a * (n * x5)
  55. apply mul_add
  56. congr
  57. apply mul_one
  58. refl
  59. rewrite <- haexpand
  60. exact hal0
  61. have hbm : exists u v. (b * (m * x2)) + m * u = 0 + m * v
  62. apply dvd_to_mod_zero
  63. exists b * x2
  64. trans (b * m) * x2
  65. symm
  66. apply mul_assoc
  67. trans (m * b) * x2
  68. congr
  69. apply mul_comm
  70. refl
  71. apply mul_assoc
  72. have hym : exists u v. ((a * (n * x3)) + (b * (m * x2))) + m * u = ((a + a * (n * x5)) + 0) + m * v
  73. specialize mod_eq_add m
  74. specialize mod_eq_add (a * (n * x3))
  75. specialize mod_eq_add (a + a * (n * x5))
  76. specialize mod_eq_add (b * (m * x2))
  77. specialize mod_eq_add 0
  78. apply mod_eq_add
  79. exact hal
  80. exact hbm
  81. have hym_norm : exists u v. ((a * (n * x3)) + (b * (m * x2))) + m * u = (a + a * (n * x5)) + m * v
  82. have hym_zero : (a + a * (n * x5)) + 0 = a + a * (n * x5)
  83. rewrite PA3
  84. refl
  85. rewrite <- hym_zero
  86. exact hym
  87. have hkm : exists u v. (x * (a * (n * x5))) + m * u = (x * (a * (n * x5))) + m * v
  88. specialize mod_eq_refl m
  89. specialize mod_eq_refl (x * (a * (n * x5)))
  90. apply mod_eq_refl
  91. have hymk : exists u v. (((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5)))) + m * u = ((a + a * (n * x5)) + (x * (a * (n * x5)))) + m * v
  92. specialize mod_eq_add m
  93. specialize mod_eq_add ((a * (n * x3)) + (b * (m * x2)))
  94. specialize mod_eq_add (a + a * (n * x5))
  95. specialize mod_eq_add (x * (a * (n * x5)))
  96. specialize mod_eq_add (x * (a * (n * x5)))
  97. apply mod_eq_add
  98. exact hym_norm
  99. exact hkm
  100. have hcancelm : exists u v. ((a + a * (n * x5)) + x * (a * (n * x5))) + S x * u = a + S x * v
  101. specialize mod_eq_predecessor_cancel x
  102. specialize mod_eq_predecessor_cancel a
  103. specialize mod_eq_predecessor_cancel (a * (n * x5))
  104. apply mod_eq_predecessor_cancel
  105. rewrite <- hms_witness at hcancelm
  106. rewrite <- hms_witness at hcancelm
  107. have hbasem : exists u v. (((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5)))) + m * u = a + m * v
  108. specialize mod_eq_trans m
  109. specialize mod_eq_trans (((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5))))
  110. specialize mod_eq_trans ((a + a * (n * x5)) + (x * (a * (n * x5))))
  111. specialize mod_eq_trans a
  112. apply mod_eq_trans
  113. exact hymk
  114. exact hcancelm
  115. have hknznm : exists u v. (x1 * (b * (m * x4))) + m * u = 0 + m * v
  116. apply dvd_to_mod_zero
  117. exists x1 * (b * x4)
  118. trans x1 * ((b * m) * x4)
  119. congr
  120. refl
  121. symm
  122. apply mul_assoc
  123. trans x1 * ((m * b) * x4)
  124. congr
  125. refl
  126. congr
  127. apply mul_comm
  128. refl
  129. trans x1 * (m * (b * x4))
  130. congr
  131. refl
  132. apply mul_assoc
  133. trans (x1 * m) * (b * x4)
  134. symm
  135. apply mul_assoc
  136. trans (m * x1) * (b * x4)
  137. congr
  138. apply mul_comm
  139. refl
  140. apply mul_assoc
  141. have hfinalm0 : exists u v. ((((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5)))) + (x1 * (b * (m * x4)))) + m * u = (a + 0) + m * v
  142. specialize mod_eq_add m
  143. specialize mod_eq_add (((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5))))
  144. specialize mod_eq_add a
  145. specialize mod_eq_add (x1 * (b * (m * x4)))
  146. specialize mod_eq_add 0
  147. apply mod_eq_add
  148. exact hbasem
  149. exact hknznm
  150. have hazerom : exists u v. (a + 0) + m * u = a + m * v
  151. exists 0
  152. exists 0
  153. simp
  154. have hfinalm : exists u v. ((((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5)))) + (x1 * (b * (m * x4)))) + m * u = a + m * v
  155. specialize mod_eq_trans m
  156. specialize mod_eq_trans ((((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5)))) + (x1 * (b * (m * x4))))
  157. specialize mod_eq_trans (a + 0)
  158. specialize mod_eq_trans a
  159. apply mod_eq_trans
  160. exact hfinalm0
  161. exact hazerom
  162. have hbn0 : exists u v. (b * (m * x2)) + n * u = (b * (1 + m * x4)) + n * v
  163. specialize mod_eq_mul_left n
  164. specialize mod_eq_mul_left (m * x2)
  165. specialize mod_eq_mul_left (1 + m * x4)
  166. specialize mod_eq_mul_left b
  167. apply mod_eq_mul_left
  168. exact hbr
  169. have hbn : exists u v. (b * (m * x2)) + n * u = (b + b * (m * x4)) + n * v
  170. have hbexpand : b * (1 + m * x4) = b + b * (m * x4)
  171. trans b * 1 + b * (m * x4)
  172. apply mul_add
  173. congr
  174. apply mul_one
  175. refl
  176. rewrite <- hbexpand
  177. exact hbn0
  178. have han : exists u v. (a * (n * x3)) + n * u = 0 + n * v
  179. apply dvd_to_mod_zero
  180. exists a * x3
  181. trans (a * n) * x3
  182. symm
  183. apply mul_assoc
  184. trans (n * a) * x3
  185. congr
  186. apply mul_comm
  187. refl
  188. apply mul_assoc
  189. have hyn0 : exists u v. ((a * (n * x3)) + (b * (m * x2))) + n * u = (0 + (b + b * (m * x4))) + n * v
  190. specialize mod_eq_add n
  191. specialize mod_eq_add (a * (n * x3))
  192. specialize mod_eq_add 0
  193. specialize mod_eq_add (b * (m * x2))
  194. specialize mod_eq_add (b + b * (m * x4))
  195. apply mod_eq_add
  196. exact han
  197. exact hbn
  198. have hyn_norm : exists u v. ((a * (n * x3)) + (b * (m * x2))) + n * u = (b + b * (m * x4)) + n * v
  199. have hyn_zero : 0 + (b + b * (m * x4)) = b + b * (m * x4)
  200. specialize zero_add (b + b * (m * x4))
  201. exact zero_add
  202. rewrite <- hyn_zero
  203. exact hyn0
  204. have hkmz : exists u v. (x * (a * (n * x5))) + n * u = 0 + n * v
  205. apply dvd_to_mod_zero
  206. exists x * (a * x5)
  207. trans x * ((a * n) * x5)
  208. congr
  209. refl
  210. symm
  211. apply mul_assoc
  212. trans x * ((n * a) * x5)
  213. congr
  214. refl
  215. congr
  216. apply mul_comm
  217. refl
  218. trans x * (n * (a * x5))
  219. congr
  220. refl
  221. apply mul_assoc
  222. trans (x * n) * (a * x5)
  223. symm
  224. apply mul_assoc
  225. trans (n * x) * (a * x5)
  226. congr
  227. apply mul_comm
  228. refl
  229. apply mul_assoc
  230. have hyn1 : exists u v. (((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5)))) + n * u = ((b + b * (m * x4)) + 0) + n * v
  231. specialize mod_eq_add n
  232. specialize mod_eq_add ((a * (n * x3)) + (b * (m * x2)))
  233. specialize mod_eq_add (b + b * (m * x4))
  234. specialize mod_eq_add (x * (a * (n * x5)))
  235. specialize mod_eq_add 0
  236. apply mod_eq_add
  237. exact hyn_norm
  238. exact hkmz
  239. have hyn1_norm : exists u v. (((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5)))) + n * u = (b + b * (m * x4)) + n * v
  240. have hyn1_zero : (b + b * (m * x4)) + 0 = b + b * (m * x4)
  241. rewrite PA3
  242. refl
  243. rewrite <- hyn1_zero
  244. exact hyn1
  245. have hkn : exists u v. (x1 * (b * (m * x4))) + n * u = (x1 * (b * (m * x4))) + n * v
  246. specialize mod_eq_refl n
  247. specialize mod_eq_refl (x1 * (b * (m * x4)))
  248. apply mod_eq_refl
  249. have hynk : exists u v. ((((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5)))) + (x1 * (b * (m * x4)))) + n * u = ((b + b * (m * x4)) + (x1 * (b * (m * x4)))) + n * v
  250. specialize mod_eq_add n
  251. specialize mod_eq_add (((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5))))
  252. specialize mod_eq_add (b + b * (m * x4))
  253. specialize mod_eq_add (x1 * (b * (m * x4)))
  254. specialize mod_eq_add (x1 * (b * (m * x4)))
  255. apply mod_eq_add
  256. exact hyn1_norm
  257. exact hkn
  258. have hcanceln : exists u v. ((b + b * (m * x4)) + x1 * (b * (m * x4))) + S x1 * u = b + S x1 * v
  259. specialize mod_eq_predecessor_cancel x1
  260. specialize mod_eq_predecessor_cancel b
  261. specialize mod_eq_predecessor_cancel (b * (m * x4))
  262. apply mod_eq_predecessor_cancel
  263. rewrite <- hns_witness at hcanceln
  264. rewrite <- hns_witness at hcanceln
  265. have hfinaln : exists u v. ((((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5)))) + (x1 * (b * (m * x4)))) + n * u = b + n * v
  266. specialize mod_eq_trans n
  267. specialize mod_eq_trans ((((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5)))) + (x1 * (b * (m * x4))))
  268. specialize mod_eq_trans ((b + b * (m * x4)) + (x1 * (b * (m * x4))))
  269. specialize mod_eq_trans b
  270. apply mod_eq_trans
  271. exact hynk
  272. exact hcanceln
  273. exists (((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5)))) + (x1 * (b * (m * x4)))
  274. split
  275. exact hfinalm
  276. exact hfinaln
beta_modulus_coprime_base · unchanged support, not a new admission
forall c k d. (exists u. S (k * c) = d * u) -> (exists v. c = d * v) -> d = 1
  1. intro c
  2. intro k
  3. intro d
  4. intro hm
  5. intro hc
  6. have hstep : S (k * c) = c * k + 1
  7. simp [mul_comm]
  8. have h1 : exists w. 1 = d * w
  9. specialize divides_remainder d
  10. specialize divides_remainder (S (k * c))
  11. specialize divides_remainder c
  12. specialize divides_remainder k
  13. specialize divides_remainder 1
  14. apply divides_remainder
  15. exact hm
  16. exact hc
  17. exact hstep
  18. specialize divisor_one d
  19. apply divisor_one
  20. exact h1
common_divisor_beta_moduli_divides_gap_times_c · unchanged support, not a new admission
forall c i j gap d. j = i + gap -> (exists u. S ((S i) * c) = d * u) -> (exists v. S ((S j) * c) = d * v) -> exists w. gap * c = d * w
  1. intro c
  2. intro i
  3. intro j
  4. intro gap
  5. intro d
  6. intro hij
  7. intro hmi
  8. intro hmj
  9. have hstep : S ((S j) * c) = S ((S i) * c) * 1 + gap * c
  10. rewrite hij
  11. specialize add_succ_left i
  12. specialize add_succ_left gap
  13. rewrite <- add_succ_left
  14. simp [add_mul, zero_add]
  15. symm
  16. specialize add_succ_left_before (S i * c)
  17. specialize add_succ_left_before (gap * c)
  18. exact add_succ_left_before
  19. specialize divides_remainder d
  20. specialize divides_remainder (S ((S j) * c))
  21. specialize divides_remainder (S ((S i) * c))
  22. specialize divides_remainder 1
  23. specialize divides_remainder (gap * c)
  24. apply divides_remainder
  25. exact hmj
  26. exact hmi
  27. exact hstep
beta_moduli_coprime_of_gap_dvd · unchanged support, not a new admission
forall c i j gap. j = i + gap -> (exists k. c = gap * k) -> forall d. (exists u. S ((S i) * c) = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1
  1. intro c
  2. intro i
  3. intro j
  4. intro gap
  5. intro hij
  6. intro hgapc
  7. intro d
  8. intro hmi
  9. intro hmj
  10. have hcopdc : forall e. (exists u. d = e * u) -> (exists v. c = e * v) -> e = 1
  11. intro e
  12. intro hed
  13. intro hec
  14. have hmei : exists u. S ((S i) * c) = e * u
  15. specialize multiple_trans d
  16. specialize multiple_trans e
  17. specialize multiple_trans (S ((S i) * c))
  18. apply multiple_trans
  19. exact hmi
  20. exact hed
  21. specialize beta_modulus_coprime_base c
  22. specialize beta_modulus_coprime_base (S i)
  23. specialize beta_modulus_coprime_base e
  24. apply beta_modulus_coprime_base
  25. exact hmei
  26. exact hec
  27. have hgapprod : exists w. gap * c = d * w
  28. specialize common_divisor_beta_moduli_divides_gap_times_c c
  29. specialize common_divisor_beta_moduli_divides_gap_times_c i
  30. specialize common_divisor_beta_moduli_divides_gap_times_c j
  31. specialize common_divisor_beta_moduli_divides_gap_times_c gap
  32. specialize common_divisor_beta_moduli_divides_gap_times_c d
  33. apply common_divisor_beta_moduli_divides_gap_times_c
  34. exact hij
  35. exact hmi
  36. exact hmj
  37. cases hgapprod
  38. have hdivgap : exists w. gap = d * w
  39. specialize gauss_coprime_cancel d
  40. specialize gauss_coprime_cancel c
  41. specialize gauss_coprime_cancel gap
  42. apply gauss_coprime_cancel
  43. exact hcopdc
  44. exists x
  45. trans gap * c
  46. apply mul_comm
  47. exact hgapprod_witness
  48. have hdc : exists w. c = d * w
  49. specialize multiple_trans gap
  50. specialize multiple_trans d
  51. specialize multiple_trans c
  52. apply multiple_trans
  53. exact hgapc
  54. exact hdivgap
  55. specialize hcopdc d
  56. apply hcopdc
  57. specialize multiple_refl d
  58. exact multiple_refl
  59. exact hdc
bounded_common_multiple_step · unchanged support, not a new admission
forall B c. ~(c = 0) -> (forall t. (exists h. S t + S h = S B) -> exists k. c = S t * k) -> exists c2. (~(c2 = 0) /\ forall t. (exists h. S t + S h = S (S B)) -> exists k. c2 = S t * k)
  1. intro B
  2. intro c
  3. intro hc
  4. intro hall
  5. exists c * S B
  6. split
  7. have hSB : ~(S B = 0)
  8. specialize succ_ne_zero B
  9. exact succ_ne_zero
  10. have hprod : ~(c * S B = 0)
  11. intro hzero
  12. have hz : c = 0 \/ S B = 0
  13. specialize mul_eq_zero c
  14. specialize mul_eq_zero (S B)
  15. apply mul_eq_zero
  16. exact hzero
  17. cases hz
  18. apply hc
  19. exact hz_left
  20. apply hSB
  21. exact hz_right
  22. exact hprod
  23. intro t
  24. intro ht
  25. cases ht
  26. specialize zero_or_succ x
  27. cases zero_or_succ
  28. rewrite zero_or_succ_left at ht_witness
  29. have hteq : S t = S B
  30. rewrite PA4 at ht_witness
  31. rewrite PA3 at ht_witness
  32. apply PA2
  33. exact ht_witness
  34. exists c
  35. rewrite hteq
  36. apply mul_comm
  37. cases zero_or_succ_right
  38. have hprev : exists h. S t + S h = S B
  39. exists x1
  40. rewrite zero_or_succ_right_witness at ht_witness
  41. rewrite PA4 at ht_witness
  42. apply PA2
  43. exact ht_witness
  44. have hdivc : exists k. c = S t * k
  45. specialize hall t
  46. apply hall
  47. exact hprev
  48. specialize multiple_mul_right (S t)
  49. specialize multiple_mul_right c
  50. specialize multiple_mul_right (S B)
  51. apply multiple_mul_right
  52. exact hdivc
bounded_common_multiple_exists · unchanged support, not a new admission
forall B. exists c. (~(c = 0) /\ forall t. (exists h. S t + S h = S B) -> exists k. c = S t * k)
  1. intro B
  2. induction B
  3. exists 1
  4. split
  5. specialize succ_ne_zero 0
  6. exact succ_ne_zero
  7. intro t
  8. intro ht
  9. cases ht
  10. exfalso
  11. have hz : S t + x = 0
  12. rewrite PA4 at ht_witness
  13. apply PA2
  14. exact ht_witness
  15. have hst0 : S t = 0
  16. specialize add_eq_zero_left (S t)
  17. specialize add_eq_zero_left x
  18. apply add_eq_zero_left
  19. exact hz
  20. specialize succ_ne_zero t
  21. apply succ_ne_zero
  22. exact hst0
  23. cases IH
  24. cases IH_witness
  25. specialize bounded_common_multiple_step B
  26. specialize bounded_common_multiple_step x
  27. apply bounded_common_multiple_step
  28. exact IH_witness_left
  29. exact IH_witness_right
beta_moduli_coprime_of_lt_bounded_common_multiple · unchanged support, not a new admission
forall B c i j. (forall t. (exists h. S t + S h = S B) -> exists k. c = S t * k) -> (exists g. g + S i = j) -> (exists h. h + j = B) -> forall d. (exists u. S ((S i) * c) = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1
  1. intro B
  2. intro c
  3. intro i
  4. intro j
  5. intro hcm
  6. intro hlt
  7. intro hjB
  8. intro d
  9. intro hdi
  10. intro hdj
  11. cases hlt
  12. have hij : j = i + S x
  13. symm
  14. trans x + S i
  15. simp [add_comm]
  16. exact hlt_witness
  17. have hgaple : exists r. r + S x = B
  18. specialize le_trans (S x)
  19. specialize le_trans j
  20. specialize le_trans B
  21. apply le_trans
  22. exists i
  23. symm
  24. exact hij
  25. exact hjB
  26. cases hgaple
  27. have hgapbound : exists h. S x + S h = S B
  28. exists x1
  29. rewrite PA4
  30. congr
  31. trans x1 + S x
  32. apply add_comm
  33. exact hgaple_witness
  34. have hgapdvd : exists k. c = S x * k
  35. specialize hcm x
  36. apply hcm
  37. exact hgapbound
  38. have hcop : forall e. (exists u. S ((S i) * c) = e * u) -> (exists v. S ((S j) * c) = e * v) -> e = 1
  39. specialize beta_moduli_coprime_of_gap_dvd c
  40. specialize beta_moduli_coprime_of_gap_dvd i
  41. specialize beta_moduli_coprime_of_gap_dvd j
  42. specialize beta_moduli_coprime_of_gap_dvd (S x)
  43. apply beta_moduli_coprime_of_gap_dvd
  44. exact hij
  45. exact hgapdvd
  46. specialize hcop d
  47. apply hcop
  48. exact hdi
  49. exact hdj
beta_moduli_pairwise_coprime_bounded · unchanged support, not a new admission
forall B c. (forall t. (exists h. S t + S h = S B) -> exists k. c = S t * k) -> forall i j. ~(i = j) -> (exists hi. hi + i = B) -> (exists hj. hj + j = B) -> forall d. (exists u. S ((S i) * c) = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1
  1. intro B
  2. intro c
  3. intro hcm
  4. intro i
  5. intro j
  6. intro hne
  7. intro hiB
  8. intro hjB
  9. intro d
  10. intro hdi
  11. intro hdj
  12. specialize lt_trichotomy i
  13. specialize lt_trichotomy j
  14. cases lt_trichotomy
  15. exfalso
  16. apply hne
  17. exact lt_trichotomy_left
  18. cases lt_trichotomy_right
  19. have hcopij : forall e. (exists u. S ((S i) * c) = e * u) -> (exists v. S ((S j) * c) = e * v) -> e = 1
  20. specialize beta_moduli_coprime_of_lt_bounded_common_multiple B
  21. specialize beta_moduli_coprime_of_lt_bounded_common_multiple c
  22. specialize beta_moduli_coprime_of_lt_bounded_common_multiple i
  23. specialize beta_moduli_coprime_of_lt_bounded_common_multiple j
  24. apply beta_moduli_coprime_of_lt_bounded_common_multiple
  25. exact hcm
  26. exact lt_trichotomy_right_left
  27. exact hjB
  28. specialize hcopij d
  29. apply hcopij
  30. exact hdi
  31. exact hdj
  32. have hcopji : forall e. (exists u. S ((S j) * c) = e * u) -> (exists v. S ((S i) * c) = e * v) -> e = 1
  33. specialize beta_moduli_coprime_of_lt_bounded_common_multiple B
  34. specialize beta_moduli_coprime_of_lt_bounded_common_multiple c
  35. specialize beta_moduli_coprime_of_lt_bounded_common_multiple j
  36. specialize beta_moduli_coprime_of_lt_bounded_common_multiple i
  37. apply beta_moduli_coprime_of_lt_bounded_common_multiple
  38. exact hcm
  39. exact lt_trichotomy_right_right
  40. exact hiB
  41. specialize hcopji d
  42. apply hcopji
  43. exact hdj
  44. exact hdi
coprime_mul_left · unchanged support, not a new admission
forall a b n. (forall d. (exists x. a = d * x) -> (exists y. n = d * y) -> d = 1) -> (forall d. (exists x. b = d * x) -> (exists y. n = d * y) -> d = 1) -> forall d. (exists x. a * b = d * x) -> (exists y. n = d * y) -> d = 1
  1. intro a
  2. intro b
  3. intro n
  4. intro han
  5. intro hbn
  6. intro d
  7. intro hab
  8. intro hdn
  9. have hda : forall e. (exists u. d = e * u) -> (exists v. a = e * v) -> e = 1
  10. intro e
  11. intro hed
  12. intro hea
  13. have hen : exists q. n = e * q
  14. specialize multiple_trans d
  15. specialize multiple_trans e
  16. specialize multiple_trans n
  17. apply multiple_trans
  18. exact hdn
  19. exact hed
  20. specialize han e
  21. apply han
  22. exact hea
  23. exact hen
  24. have hdb : exists w. b = d * w
  25. specialize gauss_coprime_cancel d
  26. specialize gauss_coprime_cancel a
  27. specialize gauss_coprime_cancel b
  28. apply gauss_coprime_cancel
  29. exact hda
  30. exact hab
  31. specialize hbn d
  32. apply hbn
  33. exact hdb
  34. exact hdn
mod_eq_of_mod_eq_multiple · unchanged support, not a new admission
forall m P x a. (exists k. P = m * k) -> (exists u v. x + P * u = a + P * v) -> exists r s. x + m * r = a + m * s
  1. intro m
  2. intro P
  3. intro x
  4. intro a
  5. intro hdiv
  6. intro hmod
  7. cases hdiv
  8. cases hmod
  9. cases hmod_witness
  10. rewrite hdiv_witness at hmod_witness_witness
  11. rewrite hdiv_witness at hmod_witness_witness
  12. exists x1 * x2
  13. exists x1 * x3
  14. trans x + (m * x1) * x2
  15. congr
  16. refl
  17. symm
  18. apply mul_assoc
  19. trans a + (m * x1) * x3
  20. exact hmod_witness_witness
  21. congr
  22. refl
  23. apply mul_assoc
binary_crt_fold_step · unchanged support, not a new admission
forall P n x b. ~(P = 0) -> ~(n = 0) -> (forall d. (exists u. P = d * u) -> (exists v. n = d * v) -> d = 1) -> exists z. ((forall m a. (exists k. P = m * k) -> (exists u v. x + m * u = a + m * v) -> exists r s. z + m * r = a + m * s) /\ exists q r. z + n * q = b + n * r)
  1. intro P
  2. intro n
  3. intro x
  4. intro b
  5. intro hP
  6. intro hn
  7. intro hcop
  8. have hcrt : exists z. (exists u v. z + P * u = x + P * v) /\ (exists q r. z + n * q = b + n * r)
  9. specialize binary_crt P
  10. specialize binary_crt n
  11. specialize binary_crt x
  12. specialize binary_crt b
  13. apply binary_crt
  14. exact hP
  15. exact hn
  16. exact hcop
  17. cases hcrt
  18. cases hcrt_witness
  19. exists x1
  20. split
  21. intro m
  22. intro a
  23. intro hmP
  24. intro hxa
  25. have hzx : exists u v. x1 + m * u = x + m * v
  26. specialize mod_eq_of_mod_eq_multiple m
  27. specialize mod_eq_of_mod_eq_multiple P
  28. specialize mod_eq_of_mod_eq_multiple x1
  29. specialize mod_eq_of_mod_eq_multiple x
  30. apply mod_eq_of_mod_eq_multiple
  31. exact hmP
  32. exact hcrt_witness_left
  33. specialize mod_eq_trans m
  34. specialize mod_eq_trans x1
  35. specialize mod_eq_trans x
  36. specialize mod_eq_trans a
  37. apply mod_eq_trans
  38. exact hzx
  39. exact hxa
  40. exact hcrt_witness_right
right_factor_divides_product · unchanged support, not a new admission
forall a b. exists k. a * b = b * k
  1. intro a
  2. intro b
  3. exists a
  4. apply mul_comm
beta_value_le_code · unchanged support, not a new admission
forall b c i x. ((exists h. h + S x = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + x) -> exists h. h + x = b
  1. intro b
  2. intro c
  3. intro i
  4. intro x
  5. intro hat
  6. cases hat
  7. cases hat_right
  8. exists x1 * S ((S i) * c)
  9. symm
  10. exact hat_right_witness
base_le_beta_modulus · unchanged support, not a new admission
forall c i. exists h. h + c = S ((S i) * c)
  1. intro c
  2. intro i
  3. have hproduct : exists h. h + c = S i * c
  4. specialize mul_succ_left i
  5. specialize mul_succ_left c
  6. rewrite mul_succ_left
  7. specialize le_add_left c
  8. specialize le_add_left (i * c)
  9. exact le_add_left
  10. specialize le_succ c
  11. specialize le_succ (S i * c)
  12. apply le_succ
  13. exact hproduct
le_scaled_nonzero · unchanged support, not a new admission
forall C B. ~(C = 0) -> exists h. h + B = C * B
  1. intro C
  2. intro B
  3. intro hC
  4. have h1C : exists h. h + 1 = C
  5. specialize one_le_of_ne_zero C
  6. apply one_le_of_ne_zero
  7. exact hC
  8. have hscaled : exists h. h + 1 * B = C * B
  9. specialize mul_le_mul_right 1
  10. specialize mul_le_mul_right C
  11. specialize mul_le_mul_right B
  12. apply mul_le_mul_right
  13. exact h1C
  14. specialize one_mul B
  15. rewrite one_mul at hscaled
  16. exact hscaled
scaled_bounded_common_multiple · unchanged support, not a new admission
forall N C B. (forall t. (exists h. S t + S h = S N) -> exists q. C = S t * q) -> forall t. (exists h. S t + S h = S N) -> exists q. C * B = S t * q
  1. intro N
  2. intro C
  3. intro B
  4. intro hcm
  5. intro t
  6. intro ht
  7. have htC : exists q. C = S t * q
  8. specialize hcm t
  9. apply hcm
  10. exact ht
  11. specialize multiple_mul_right (S t)
  12. specialize multiple_mul_right C
  13. specialize multiple_mul_right B
  14. apply multiple_mul_right
  15. exact htC
beta_value_lt_scaled_base · unchanged support, not a new admission
forall b c i x C s j. ((exists h. h + S x = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + x) -> ~(C = 0) -> exists h. h + S x = S ((S j) * (C * S (b + s)))
  1. intro b
  2. intro c
  3. intro i
  4. intro x
  5. intro C
  6. intro s
  7. intro j
  8. intro hat
  9. intro hC
  10. have hxb : exists h. h + x = b
  11. specialize beta_value_le_code b
  12. specialize beta_value_le_code c
  13. specialize beta_value_le_code i
  14. specialize beta_value_le_code x
  15. apply beta_value_le_code
  16. exact hat
  17. have hbs : exists h. h + b = b + s
  18. specialize le_add_right b
  19. specialize le_add_right s
  20. exact le_add_right
  21. have hxs : exists h. h + x = b + s
  22. specialize le_trans x
  23. specialize le_trans b
  24. specialize le_trans (b + s)
  25. apply le_trans
  26. exact hxb
  27. exact hbs
  28. have hsx : exists h. h + S x = S (b + s)
  29. specialize succ_le_succ x
  30. specialize succ_le_succ (b + s)
  31. apply succ_le_succ
  32. exact hxs
  33. have hscale : exists h. h + S (b + s) = C * S (b + s)
  34. specialize le_scaled_nonzero C
  35. specialize le_scaled_nonzero (S (b + s))
  36. apply le_scaled_nonzero
  37. exact hC
  38. have hxbase : exists h. h + S x = C * S (b + s)
  39. specialize le_trans (S x)
  40. specialize le_trans (S (b + s))
  41. specialize le_trans (C * S (b + s))
  42. apply le_trans
  43. exact hsx
  44. exact hscale
  45. have hmod : exists h. h + C * S (b + s) = S ((S j) * (C * S (b + s)))
  46. specialize base_le_beta_modulus (C * S (b + s))
  47. specialize base_le_beta_modulus j
  48. exact base_le_beta_modulus
  49. specialize le_trans (S x)
  50. specialize le_trans (C * S (b + s))
  51. specialize le_trans (S ((S j) * (C * S (b + s))))
  52. apply le_trans
  53. exact hxbase
  54. exact hmod
new_value_lt_scaled_base · unchanged support, not a new admission
forall b s C j. ~(C = 0) -> exists h. h + S s = S ((S j) * (C * S (b + s)))
  1. intro b
  2. intro s
  3. intro C
  4. intro j
  5. intro hC
  6. have hsb : exists h. h + s = b + s
  7. specialize le_add_left s
  8. specialize le_add_left b
  9. exact le_add_left
  10. have hss : exists h. h + S s = S (b + s)
  11. specialize succ_le_succ s
  12. specialize succ_le_succ (b + s)
  13. apply succ_le_succ
  14. exact hsb
  15. have hscale : exists h. h + S (b + s) = C * S (b + s)
  16. specialize le_scaled_nonzero C
  17. specialize le_scaled_nonzero (S (b + s))
  18. apply le_scaled_nonzero
  19. exact hC
  20. have hsbase : exists h. h + S s = C * S (b + s)
  21. specialize le_trans (S s)
  22. specialize le_trans (S (b + s))
  23. specialize le_trans (C * S (b + s))
  24. apply le_trans
  25. exact hss
  26. exact hscale
  27. have hmod : exists h. h + C * S (b + s) = S ((S j) * (C * S (b + s)))
  28. specialize base_le_beta_modulus (C * S (b + s))
  29. specialize base_le_beta_modulus j
  30. exact base_le_beta_modulus
  31. specialize le_trans (S s)
  32. specialize le_trans (C * S (b + s))
  33. specialize le_trans (S ((S j) * (C * S (b + s))))
  34. apply le_trans
  35. exact hsbase
  36. exact hmod
beta_exclusive_accumulated_product_step · unchanged support, not a new admission
forall N c k P. (forall t. (exists h. S t + S h = S N) -> exists q. c = S t * q) -> (exists h. h + S k = N) -> ~(P = 0) -> (forall i. (exists h. h + S i = k) -> exists q. P = S ((S i) * c) * q) -> (forall j. (exists g. g + k = j) -> (exists h. h + j = N) -> forall d. (exists u. P = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1) -> (~(P * S ((S k) * c) = 0) /\ ((forall i. (exists h. h + S i = S k) -> exists q. P * S ((S k) * c) = S ((S i) * c) * q) /\ forall j. (exists g. g + S k = j) -> (exists h. h + j = N) -> forall d. (exists u. P * S ((S k) * c) = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1))
  1. intro N
  2. intro c
  3. intro k
  4. intro P
  5. intro hcm
  6. intro hkN
  7. intro hP
  8. intro hdiv
  9. intro hfuture
  10. have hnew : ~(S ((S k) * c) = 0)
  11. specialize beta_modulus_nonzero c
  12. specialize beta_modulus_nonzero k
  13. exact beta_modulus_nonzero
  14. split
  15. specialize mul_ne_zero P
  16. specialize mul_ne_zero (S ((S k) * c))
  17. intro hzero
  18. apply mul_ne_zero
  19. exact hP
  20. exact hnew
  21. exact hzero
  22. split
  23. intro i
  24. intro hi
  25. have hik : exists r. r + i = k
  26. specialize le_of_succ_le_succ i
  27. specialize le_of_succ_le_succ k
  28. apply le_of_succ_le_succ
  29. exact hi
  30. have hsplit : i = k \/ exists r. r + S i = k
  31. specialize le_eq_or_lt i
  32. specialize le_eq_or_lt k
  33. apply le_eq_or_lt
  34. exact hik
  35. cases hsplit
  36. rewrite hsplit_left
  37. specialize right_factor_divides_product P
  38. specialize right_factor_divides_product (S ((S k) * c))
  39. exact right_factor_divides_product
  40. have hiP : exists q. P = S ((S i) * c) * q
  41. specialize hdiv i
  42. apply hdiv
  43. exact hsplit_right
  44. specialize multiple_mul_right (S ((S i) * c))
  45. specialize multiple_mul_right P
  46. specialize multiple_mul_right (S ((S k) * c))
  47. apply multiple_mul_right
  48. exact hiP
  49. intro j
  50. intro hSkj
  51. intro hjN
  52. have hkj : exists r. r + k = j
  53. have hkSk : exists r. r + k = S k
  54. specialize le_succ_self k
  55. exact le_succ_self
  56. specialize le_trans k
  57. specialize le_trans (S k)
  58. specialize le_trans j
  59. apply le_trans
  60. exact hkSk
  61. exact hSkj
  62. have hPj : forall d. (exists u. P = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1
  63. specialize hfuture j
  64. apply hfuture
  65. exact hkj
  66. exact hjN
  67. have hneq : ~(k = j)
  68. intro heq
  69. rewrite <- heq at hSkj
  70. specialize lt_irrefl_expanded k
  71. apply lt_irrefl_expanded
  72. exact hSkj
  73. have hkbound : exists r. r + k = N
  74. specialize lt_to_le k
  75. specialize lt_to_le N
  76. apply lt_to_le
  77. exact hkN
  78. have hpairs : forall i j. ~(i = j) -> (exists hi. hi + i = N) -> (exists hj. hj + j = N) -> forall d. (exists u. S ((S i) * c) = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1
  79. specialize beta_moduli_pairwise_coprime_bounded N
  80. specialize beta_moduli_pairwise_coprime_bounded c
  81. apply beta_moduli_pairwise_coprime_bounded
  82. exact hcm
  83. have hnewj : forall d. (exists u. S ((S k) * c) = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1
  84. specialize hpairs k
  85. specialize hpairs j
  86. apply hpairs
  87. exact hneq
  88. exact hkbound
  89. exact hjN
  90. specialize coprime_mul_left P
  91. specialize coprime_mul_left (S ((S k) * c))
  92. specialize coprime_mul_left (S ((S j) * c))
  93. apply coprime_mul_left
  94. exact hPj
  95. exact hnewj
beta_exclusive_recode_congruence_step · unchanged support, not a new admission
forall N c b e k P z. (exists h. h + S k = N) -> ~(P = 0) -> (forall i. (exists h. h + S i = k) -> exists q. P = S ((S i) * c) * q) -> (forall i a. (exists h. h + S i = k) -> ((exists h. h + S a = S ((S i) * e)) /\ exists q. b = q * S ((S i) * e) + a) -> exists u v. z + S ((S i) * c) * u = a + S ((S i) * c) * v) -> (forall j. (exists g. g + k = j) -> (exists h. h + j = N) -> forall d. (exists u. P = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1) -> exists z2. forall i a. (exists h. h + S i = S k) -> ((exists h. h + S a = S ((S i) * e)) /\ exists q. b = q * S ((S i) * e) + a) -> exists u v. z2 + S ((S i) * c) * u = a + S ((S i) * c) * v
  1. intro N
  2. intro c
  3. intro b
  4. intro e
  5. intro k
  6. intro P
  7. intro z
  8. intro hkN
  9. intro hP
  10. intro hdiv
  11. intro hcong
  12. intro hfuture
  13. have hnew : ~(S ((S k) * c) = 0)
  14. specialize beta_modulus_nonzero c
  15. specialize beta_modulus_nonzero k
  16. exact beta_modulus_nonzero
  17. have hkbound : exists h. h + k = N
  18. specialize lt_to_le k
  19. specialize lt_to_le N
  20. apply lt_to_le
  21. exact hkN
  22. have hcop : forall d. (exists u. P = d * u) -> (exists v. S ((S k) * c) = d * v) -> d = 1
  23. specialize hfuture k
  24. apply hfuture
  25. specialize le_refl k
  26. exact le_refl
  27. exact hkbound
  28. have hvalue : exists a. ((exists h. h + S a = S ((S k) * e)) /\ exists q. b = q * S ((S k) * e) + a)
  29. specialize beta_at_exists b
  30. specialize beta_at_exists e
  31. specialize beta_at_exists k
  32. exact beta_at_exists
  33. cases hvalue
  34. have hfold : exists z2. ((forall m a. (exists q. P = m * q) -> (exists u v. z + m * u = a + m * v) -> exists r s. z2 + m * r = a + m * s) /\ exists q r. z2 + S ((S k) * c) * q = x + S ((S k) * c) * r)
  35. specialize binary_crt_fold_step P
  36. specialize binary_crt_fold_step (S ((S k) * c))
  37. specialize binary_crt_fold_step z
  38. specialize binary_crt_fold_step x
  39. apply binary_crt_fold_step
  40. exact hP
  41. exact hnew
  42. exact hcop
  43. cases hfold
  44. cases hfold_witness
  45. exists x1
  46. intro i
  47. intro a
  48. intro hi
  49. intro hati
  50. have hik : exists r. r + i = k
  51. specialize le_of_succ_le_succ i
  52. specialize le_of_succ_le_succ k
  53. apply le_of_succ_le_succ
  54. exact hi
  55. have hsplit : i = k \/ exists r. r + S i = k
  56. specialize le_eq_or_lt i
  57. specialize le_eq_or_lt k
  58. apply le_eq_or_lt
  59. exact hik
  60. cases hsplit
  61. have hati_new : ((exists h. h + S a = S ((S k) * e)) /\ exists q. b = q * S ((S k) * e) + a)
  62. rewrite <- hsplit_left
  63. rewrite <- hsplit_left
  64. exact hati
  65. have haeq : a = x
  66. specialize beta_at_unique b
  67. specialize beta_at_unique e
  68. specialize beta_at_unique k
  69. specialize beta_at_unique a
  70. specialize beta_at_unique x
  71. apply beta_at_unique
  72. exact hati_new
  73. exact hvalue_witness
  74. rewrite hsplit_left
  75. rewrite hsplit_left
  76. rewrite haeq
  77. exact hfold_witness_right
  78. have hmiP : exists q. P = S ((S i) * c) * q
  79. specialize hdiv i
  80. apply hdiv
  81. exact hsplit_right
  82. have hzold : exists u v. z + S ((S i) * c) * u = a + S ((S i) * c) * v
  83. specialize hcong i
  84. specialize hcong a
  85. apply hcong
  86. exact hsplit_right
  87. exact hati
  88. specialize hfold_witness_left (S ((S i) * c))
  89. specialize hfold_witness_left a
  90. apply hfold_witness_left
  91. exact hmiP
  92. exact hzold
beta_exclusive_recode_invariant_step · unchanged support, not a new admission
forall N c b e k P z. (forall t. (exists h. S t + S h = S N) -> exists q. c = S t * q) -> (exists h. h + S k = N) -> ~(P = 0) -> (forall i. (exists h. h + S i = k) -> exists q. P = S ((S i) * c) * q) -> (forall i a. (exists h. h + S i = k) -> ((exists h. h + S a = S ((S i) * e)) /\ exists q. b = q * S ((S i) * e) + a) -> exists u v. z + S ((S i) * c) * u = a + S ((S i) * c) * v) -> (forall j. (exists g. g + k = j) -> (exists h. h + j = N) -> forall d. (exists u. P = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1) -> exists z2. (~(P * S ((S k) * c) = 0) /\ ((forall i. (exists h. h + S i = S k) -> exists q. P * S ((S k) * c) = S ((S i) * c) * q) /\ ((forall i a. (exists h. h + S i = S k) -> ((exists h. h + S a = S ((S i) * e)) /\ exists q. b = q * S ((S i) * e) + a) -> exists u v. z2 + S ((S i) * c) * u = a + S ((S i) * c) * v) /\ forall j. (exists g. g + S k = j) -> (exists h. h + j = N) -> forall d. (exists u. P * S ((S k) * c) = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1)))
  1. intro N
  2. intro c
  3. intro b
  4. intro e
  5. intro k
  6. intro P
  7. intro z
  8. intro hcm
  9. intro hkN
  10. intro hP
  11. intro hdiv
  12. intro hcong
  13. intro hfuture
  14. have hproduct : (~(P * S ((S k) * c) = 0) /\ ((forall i. (exists h. h + S i = S k) -> exists q. P * S ((S k) * c) = S ((S i) * c) * q) /\ forall j. (exists g. g + S k = j) -> (exists h. h + j = N) -> forall d. (exists u. P * S ((S k) * c) = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1))
  15. specialize beta_exclusive_accumulated_product_step N
  16. specialize beta_exclusive_accumulated_product_step c
  17. specialize beta_exclusive_accumulated_product_step k
  18. specialize beta_exclusive_accumulated_product_step P
  19. apply beta_exclusive_accumulated_product_step
  20. exact hcm
  21. exact hkN
  22. exact hP
  23. exact hdiv
  24. exact hfuture
  25. have hcodes : exists z2. forall i a. (exists h. h + S i = S k) -> ((exists h. h + S a = S ((S i) * e)) /\ exists q. b = q * S ((S i) * e) + a) -> exists u v. z2 + S ((S i) * c) * u = a + S ((S i) * c) * v
  26. specialize beta_exclusive_recode_congruence_step N
  27. specialize beta_exclusive_recode_congruence_step c
  28. specialize beta_exclusive_recode_congruence_step b
  29. specialize beta_exclusive_recode_congruence_step e
  30. specialize beta_exclusive_recode_congruence_step k
  31. specialize beta_exclusive_recode_congruence_step P
  32. specialize beta_exclusive_recode_congruence_step z
  33. apply beta_exclusive_recode_congruence_step
  34. exact hkN
  35. exact hP
  36. exact hdiv
  37. exact hcong
  38. exact hfuture
  39. cases hcodes
  40. cases hproduct
  41. cases hproduct_right
  42. exists x
  43. split
  44. exact hproduct_left
  45. split
  46. exact hproduct_right_left
  47. split
  48. exact hcodes_witness
  49. exact hproduct_right_right
bounded_beta_exclusive_recode_invariant · unchanged support, not a new admission
forall N c b e. (forall t. (exists h. S t + S h = S N) -> exists q. c = S t * q) -> forall k. (exists h. h + k = N) -> exists P z. (~(P = 0) /\ ((forall i. (exists h. h + S i = k) -> exists q. P = S ((S i) * c) * q) /\ ((forall i a. (exists h. h + S i = k) -> ((exists h. h + S a = S ((S i) * e)) /\ exists q. b = q * S ((S i) * e) + a) -> exists u v. z + S ((S i) * c) * u = a + S ((S i) * c) * v) /\ forall j. (exists g. g + k = j) -> (exists h. h + j = N) -> forall d. (exists u. P = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1)))
  1. intro N
  2. intro c
  3. intro b
  4. intro e
  5. intro hcm
  6. induction k
  7. intro hkN
  8. exists 1
  9. exists 0
  10. split
  11. specialize succ_ne_zero 0
  12. exact succ_ne_zero
  13. split
  14. intro i
  15. intro hi
  16. exfalso
  17. cases hi
  18. have hsi0 : S i = 0
  19. specialize add_eq_zero_right x
  20. specialize add_eq_zero_right (S i)
  21. apply add_eq_zero_right
  22. exact hi_witness
  23. specialize succ_ne_zero i
  24. apply succ_ne_zero
  25. exact hsi0
  26. split
  27. intro i
  28. intro a
  29. intro hi
  30. intro hati
  31. exfalso
  32. cases hi
  33. have hsi0 : S i = 0
  34. specialize add_eq_zero_right x
  35. specialize add_eq_zero_right (S i)
  36. apply add_eq_zero_right
  37. exact hi_witness
  38. specialize succ_ne_zero i
  39. apply succ_ne_zero
  40. exact hsi0
  41. intro j
  42. intro h0j
  43. intro hjN
  44. intro d
  45. intro h1
  46. intro hm
  47. specialize coprime_one_left (S ((S j) * c))
  48. specialize coprime_one_left d
  49. apply coprime_one_left
  50. exact h1
  51. exact hm
  52. intro hkN
  53. have hkprev : exists h. h + k = N
  54. have hkstep : exists h. h + k = S k
  55. specialize le_succ_self k
  56. exact le_succ_self
  57. specialize le_trans k
  58. specialize le_trans (S k)
  59. specialize le_trans N
  60. apply le_trans
  61. exact hkstep
  62. exact hkN
  63. have hprev : exists P z. (~(P = 0) /\ ((forall i. (exists h. h + S i = k) -> exists q. P = S ((S i) * c) * q) /\ ((forall i a. (exists h. h + S i = k) -> ((exists h. h + S a = S ((S i) * e)) /\ exists q. b = q * S ((S i) * e) + a) -> exists u v. z + S ((S i) * c) * u = a + S ((S i) * c) * v) /\ forall j. (exists g. g + k = j) -> (exists h. h + j = N) -> forall d. (exists u. P = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1)))
  64. apply IH
  65. exact hkprev
  66. cases hprev
  67. cases hprev_witness
  68. cases hprev_witness_witness
  69. cases hprev_witness_witness_right
  70. cases hprev_witness_witness_right_right
  71. have hnext : exists z2. (~(x * S ((S k) * c) = 0) /\ ((forall i. (exists h. h + S i = S k) -> exists q. x * S ((S k) * c) = S ((S i) * c) * q) /\ ((forall i a. (exists h. h + S i = S k) -> ((exists h. h + S a = S ((S i) * e)) /\ exists q. b = q * S ((S i) * e) + a) -> exists u v. z2 + S ((S i) * c) * u = a + S ((S i) * c) * v) /\ forall j. (exists g. g + S k = j) -> (exists h. h + j = N) -> forall d. (exists u. x * S ((S k) * c) = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1)))
  72. specialize beta_exclusive_recode_invariant_step N
  73. specialize beta_exclusive_recode_invariant_step c
  74. specialize beta_exclusive_recode_invariant_step b
  75. specialize beta_exclusive_recode_invariant_step e
  76. specialize beta_exclusive_recode_invariant_step k
  77. specialize beta_exclusive_recode_invariant_step x
  78. specialize beta_exclusive_recode_invariant_step x1
  79. apply beta_exclusive_recode_invariant_step
  80. exact hcm
  81. exact hkN
  82. exact hprev_witness_witness_left
  83. exact hprev_witness_witness_right_left
  84. exact hprev_witness_witness_right_right_left
  85. exact hprev_witness_witness_right_right_right
  86. cases hnext
  87. exists x * S ((S k) * c)
  88. exists x2
  89. exact hnext_witness
beta_prefix_extend · unchanged support, not a new admission
forall k b e s. exists z c. (((exists h. h + S s = S ((S k) * c)) /\ exists q. z = q * S ((S k) * c) + s) /\ forall i a. (exists h. h + S i = k) -> ((exists h. h + S a = S ((S i) * e)) /\ exists q. b = q * S ((S i) * e) + a) -> ((exists h. h + S a = S ((S i) * c)) /\ exists q. z = q * S ((S i) * c) + a))
  1. intro k
  2. intro b
  3. intro e
  4. intro s
  5. have hC : exists C. (~(C = 0) /\ forall t. (exists h. S t + S h = S k) -> exists q. C = S t * q)
  6. specialize bounded_common_multiple_exists k
  7. exact bounded_common_multiple_exists
  8. cases hC
  9. cases hC_witness
  10. have hcm2 : forall t. (exists h. S t + S h = S k) -> exists q. x * S (b + s) = S t * q
  11. specialize scaled_bounded_common_multiple k
  12. specialize scaled_bounded_common_multiple x
  13. specialize scaled_bounded_common_multiple (S (b + s))
  14. apply scaled_bounded_common_multiple
  15. exact hC_witness_right
  16. have hall : forall n. (exists h. h + n = k) -> exists P z. (~(P = 0) /\ ((forall i. (exists h. h + S i = n) -> exists q. P = S ((S i) * (x * S (b + s))) * q) /\ ((forall i a. (exists h. h + S i = n) -> ((exists h. h + S a = S ((S i) * e)) /\ exists q. b = q * S ((S i) * e) + a) -> exists u v. z + S ((S i) * (x * S (b + s))) * u = a + S ((S i) * (x * S (b + s))) * v) /\ forall j. (exists g. g + n = j) -> (exists h. h + j = k) -> forall d. (exists u. P = d * u) -> (exists v. S ((S j) * (x * S (b + s))) = d * v) -> d = 1)))
  17. specialize bounded_beta_exclusive_recode_invariant k
  18. specialize bounded_beta_exclusive_recode_invariant (x * S (b + s))
  19. specialize bounded_beta_exclusive_recode_invariant b
  20. specialize bounded_beta_exclusive_recode_invariant e
  21. apply bounded_beta_exclusive_recode_invariant
  22. exact hcm2
  23. have hinv : exists P z. (~(P = 0) /\ ((forall i. (exists h. h + S i = k) -> exists q. P = S ((S i) * (x * S (b + s))) * q) /\ ((forall i a. (exists h. h + S i = k) -> ((exists h. h + S a = S ((S i) * e)) /\ exists q. b = q * S ((S i) * e) + a) -> exists u v. z + S ((S i) * (x * S (b + s))) * u = a + S ((S i) * (x * S (b + s))) * v) /\ forall j. (exists g. g + k = j) -> (exists h. h + j = k) -> forall d. (exists u. P = d * u) -> (exists v. S ((S j) * (x * S (b + s))) = d * v) -> d = 1)))
  24. specialize hall k
  25. apply hall
  26. specialize le_refl k
  27. exact le_refl
  28. cases hinv
  29. cases hinv_witness
  30. cases hinv_witness_witness
  31. cases hinv_witness_witness_right
  32. cases hinv_witness_witness_right_right
  33. have hcop : forall d. (exists u. x1 = d * u) -> (exists v. S ((S k) * (x * S (b + s))) = d * v) -> d = 1
  34. specialize hinv_witness_witness_right_right_right k
  35. apply hinv_witness_witness_right_right_right
  36. specialize le_refl k
  37. exact le_refl
  38. specialize le_refl k
  39. exact le_refl
  40. have hnew0 : ~(S ((S k) * (x * S (b + s))) = 0)
  41. specialize beta_modulus_nonzero (x * S (b + s))
  42. specialize beta_modulus_nonzero k
  43. exact beta_modulus_nonzero
  44. have hfold : exists z2. ((forall m a. (exists q. x1 = m * q) -> (exists u v. x2 + m * u = a + m * v) -> exists r t. z2 + m * r = a + m * t) /\ exists q r. z2 + S ((S k) * (x * S (b + s))) * q = s + S ((S k) * (x * S (b + s))) * r)
  45. specialize binary_crt_fold_step x1
  46. specialize binary_crt_fold_step (S ((S k) * (x * S (b + s))))
  47. specialize binary_crt_fold_step x2
  48. specialize binary_crt_fold_step s
  49. apply binary_crt_fold_step
  50. exact hinv_witness_witness_left
  51. exact hnew0
  52. exact hcop
  53. cases hfold
  54. cases hfold_witness
  55. exists x3
  56. exists x * S (b + s)
  57. split
  58. specialize beta_at_of_mod_eq_bound x3
  59. specialize beta_at_of_mod_eq_bound (x * S (b + s))
  60. specialize beta_at_of_mod_eq_bound k
  61. specialize beta_at_of_mod_eq_bound s
  62. apply beta_at_of_mod_eq_bound
  63. specialize new_value_lt_scaled_base b
  64. specialize new_value_lt_scaled_base s
  65. specialize new_value_lt_scaled_base x
  66. specialize new_value_lt_scaled_base k
  67. apply new_value_lt_scaled_base
  68. exact hC_witness_left
  69. exact hfold_witness_right
  70. intro i
  71. intro a
  72. intro hi
  73. intro hati
  74. have hmi : exists q. x1 = S ((S i) * (x * S (b + s))) * q
  75. specialize hinv_witness_witness_right_left i
  76. apply hinv_witness_witness_right_left
  77. exact hi
  78. have hzold : exists u v. x2 + S ((S i) * (x * S (b + s))) * u = a + S ((S i) * (x * S (b + s))) * v
  79. specialize hinv_witness_witness_right_right_left i
  80. specialize hinv_witness_witness_right_right_left a
  81. apply hinv_witness_witness_right_right_left
  82. exact hi
  83. exact hati
  84. have hznew : exists u v. x3 + S ((S i) * (x * S (b + s))) * u = a + S ((S i) * (x * S (b + s))) * v
  85. specialize hfold_witness_left (S ((S i) * (x * S (b + s))))
  86. specialize hfold_witness_left a
  87. apply hfold_witness_left
  88. exact hmi
  89. exact hzold
  90. specialize beta_at_of_mod_eq_bound x3
  91. specialize beta_at_of_mod_eq_bound (x * S (b + s))
  92. specialize beta_at_of_mod_eq_bound i
  93. specialize beta_at_of_mod_eq_bound a
  94. apply beta_at_of_mod_eq_bound
  95. specialize beta_value_lt_scaled_base b
  96. specialize beta_value_lt_scaled_base e
  97. specialize beta_value_lt_scaled_base i
  98. specialize beta_value_lt_scaled_base a
  99. specialize beta_value_lt_scaled_base x
  100. specialize beta_value_lt_scaled_base s
  101. specialize beta_value_lt_scaled_base i
  102. apply beta_value_lt_scaled_base
  103. exact hati
  104. exact hC_witness_left
  105. exact hznew
beta_prefix_product_trace_exists · unchanged support, not a new admission
forall b c l. exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ forall i. (exists h. h + S i = l) -> exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S (S i)) * v)) /\ exists q. u = q * S ((S (S i)) * v) + s) /\ s = r * p))))
  1. intro b
  2. intro c
  3. induction l
  4. exists 1
  5. exists 1
  6. split
  7. specialize beta_at_self_of_bound 1
  8. specialize beta_at_self_of_bound 0
  9. specialize beta_at_self_of_bound 1
  10. apply beta_at_self_of_bound
  11. specialize one_mul 1
  12. rewrite one_mul
  13. specialize le_refl 2
  14. exact le_refl
  15. intro i
  16. intro hi
  17. exfalso
  18. cases hi
  19. have hsi0 : S i = 0
  20. specialize add_eq_zero_right x
  21. specialize add_eq_zero_right (S i)
  22. apply add_eq_zero_right
  23. exact hi_witness
  24. specialize succ_ne_zero i
  25. apply succ_ne_zero
  26. exact hsi0
  27. have htrace : exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ forall i. (exists h. h + S i = l) -> exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S (S i)) * v)) /\ exists q. u = q * S ((S (S i)) * v) + s) /\ s = r * p))))
  28. apply IH
  29. cases htrace
  30. cases htrace_witness
  31. cases htrace_witness_witness
  32. have hfactor : exists p. ((exists h. h + S p = S ((S l) * c)) /\ exists q. b = q * S ((S l) * c) + p)
  33. specialize beta_at_exists b
  34. specialize beta_at_exists c
  35. specialize beta_at_exists l
  36. exact beta_at_exists
  37. cases hfactor
  38. have hlast : exists r. ((exists h. h + S r = S ((S l) * x1)) /\ exists q. x = q * S ((S l) * x1) + r)
  39. specialize beta_at_exists x
  40. specialize beta_at_exists x1
  41. specialize beta_at_exists l
  42. exact beta_at_exists
  43. cases hlast
  44. have hext : exists z v. (((exists h. h + S (x3 * x2) = S ((S (S l)) * v)) /\ exists q. z = q * S ((S (S l)) * v) + (x3 * x2)) /\ forall i a. (exists h. h + S i = S l) -> ((exists h. h + S a = S ((S i) * x1)) /\ exists q. x = q * S ((S i) * x1) + a) -> ((exists h. h + S a = S ((S i) * v)) /\ exists q. z = q * S ((S i) * v) + a))
  45. specialize beta_prefix_extend (S l)
  46. specialize beta_prefix_extend x
  47. specialize beta_prefix_extend x1
  48. specialize beta_prefix_extend (x3 * x2)
  49. exact beta_prefix_extend
  50. cases hext
  51. cases hext_witness
  52. cases hext_witness_witness
  53. exists x4
  54. exists x5
  55. split
  56. specialize hext_witness_witness_right 0
  57. specialize hext_witness_witness_right 1
  58. apply hext_witness_witness_right
  59. have h0 : exists h. h + S 0 = S l
  60. have hzero : exists h. h + 0 = l
  61. specialize zero_le l
  62. exact zero_le
  63. specialize succ_le_succ 0
  64. specialize succ_le_succ l
  65. apply succ_le_succ
  66. exact hzero
  67. exact h0
  68. exact htrace_witness_witness_left
  69. intro i
  70. intro hi
  71. have hil : exists h. h + i = l
  72. specialize le_of_succ_le_succ i
  73. specialize le_of_succ_le_succ l
  74. apply le_of_succ_le_succ
  75. exact hi
  76. have hsplit : i = l \/ exists h. h + S i = l
  77. specialize le_eq_or_lt i
  78. specialize le_eq_or_lt l
  79. apply le_eq_or_lt
  80. exact hil
  81. cases hsplit
  82. exists x2
  83. exists x3
  84. exists x3 * x2
  85. split
  86. rewrite hsplit_left
  87. rewrite hsplit_left
  88. exact hfactor_witness
  89. split
  90. rewrite hsplit_left
  91. rewrite hsplit_left
  92. specialize hext_witness_witness_right l
  93. specialize hext_witness_witness_right x3
  94. apply hext_witness_witness_right
  95. specialize le_refl (S l)
  96. exact le_refl
  97. exact hlast_witness
  98. split
  99. rewrite hsplit_left
  100. rewrite hsplit_left
  101. exact hext_witness_witness_left
  102. refl
  103. have hold : exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * x1)) /\ exists q. x = q * S ((S i) * x1) + r) /\ (((exists h. h + S s = S ((S (S i)) * x1)) /\ exists q. x = q * S ((S (S i)) * x1) + s) /\ s = r * p)))
  104. specialize htrace_witness_witness_right i
  105. apply htrace_witness_witness_right
  106. exact hsplit_right
  107. cases hold
  108. cases hold_witness
  109. cases hold_witness_witness
  110. cases hold_witness_witness_witness
  111. cases hold_witness_witness_witness_right
  112. cases hold_witness_witness_witness_right_right
  113. exists x6
  114. exists x7
  115. exists x8
  116. split
  117. exact hold_witness_witness_witness_left
  118. split
  119. specialize hext_witness_witness_right i
  120. specialize hext_witness_witness_right x7
  121. apply hext_witness_witness_right
  122. exact hi
  123. exact hold_witness_witness_witness_right_left
  124. split
  125. specialize hext_witness_witness_right (S i)
  126. specialize hext_witness_witness_right x8
  127. apply hext_witness_witness_right
  128. specialize succ_le_succ (S i)
  129. specialize succ_le_succ l
  130. apply succ_le_succ
  131. exact hsplit_right
  132. exact hold_witness_witness_witness_right_right_left
  133. exact hold_witness_witness_witness_right_right_right
beta_product_exists · unchanged support, not a new admission
forall b c l. exists n u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -> exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S (S i)) * v)) /\ exists q. u = q * S ((S (S i)) * v) + s) /\ s = r * p)))))
  1. intro b
  2. intro c
  3. intro l
  4. have htrace : exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ forall i. (exists h. h + S i = l) -> exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S (S i)) * v)) /\ exists q. u = q * S ((S (S i)) * v) + s) /\ s = r * p))))
  5. specialize beta_prefix_product_trace_exists b
  6. specialize beta_prefix_product_trace_exists c
  7. specialize beta_prefix_product_trace_exists l
  8. exact beta_prefix_product_trace_exists
  9. cases htrace
  10. cases htrace_witness
  11. cases htrace_witness_witness
  12. have hterminal : exists n. ((exists h. h + S n = S ((S l) * x1)) /\ exists q. x = q * S ((S l) * x1) + n)
  13. specialize beta_at_exists x
  14. specialize beta_at_exists x1
  15. specialize beta_at_exists l
  16. exact beta_at_exists
  17. cases hterminal
  18. exists x2
  19. exists x
  20. exists x1
  21. split
  22. exact htrace_witness_witness_left
  23. split
  24. exact hterminal_witness
  25. exact htrace_witness_witness_right
beta_product_functional · unchanged support, not a new admission
forall b c l n u v m w d. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -> exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p))))) -> (((exists h. h + S 1 = S ((S 0) * d)) /\ exists q. w = q * S ((S 0) * d) + 1) /\ (((exists h. h + S m = S ((S l) * d)) /\ exists q. w = q * S ((S l) * d) + m) /\ forall i. (exists h. h + S i = l) -> exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * d)) /\ exists q. w = q * S ((S i) * d) + r) /\ (((exists h. h + S s = S ((S S i) * d)) /\ exists q. w = q * S ((S S i) * d) + s) /\ s = r * p))))) -> n = m
  1. intro b
  2. intro c
  3. induction l
  4. intro n
  5. intro u
  6. intro v
  7. intro m
  8. intro w
  9. intro d
  10. intro h1
  11. intro h2
  12. cases h1
  13. cases h1_right
  14. cases h2
  15. cases h2_right
  16. have hn : n = 1
  17. specialize beta_at_unique u
  18. specialize beta_at_unique v
  19. specialize beta_at_unique 0
  20. specialize beta_at_unique n
  21. specialize beta_at_unique 1
  22. apply beta_at_unique
  23. exact h1_right_left
  24. exact h1_left
  25. have hm : m = 1
  26. specialize beta_at_unique w
  27. specialize beta_at_unique d
  28. specialize beta_at_unique 0
  29. specialize beta_at_unique m
  30. specialize beta_at_unique 1
  31. apply beta_at_unique
  32. exact h2_right_left
  33. exact h2_left
  34. trans 1
  35. exact hn
  36. symm
  37. exact hm
  38. intro n
  39. intro u
  40. intro v
  41. intro m
  42. intro w
  43. intro d
  44. intro h1
  45. intro h2
  46. cases h1
  47. cases h1_right
  48. cases h2
  49. cases h2_right
  50. have hstep1 : exists p r s. (((exists h. h + S p = S ((S l) * c)) /\ exists q. b = q * S ((S l) * c) + p) /\ (((exists h. h + S r = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + r) /\ (((exists h. h + S s = S ((S S l) * v)) /\ exists q. u = q * S ((S S l) * v) + s) /\ s = r * p)))
  51. specialize h1_right_right l
  52. apply h1_right_right
  53. specialize le_refl (S l)
  54. exact le_refl
  55. cases hstep1
  56. cases hstep1_witness
  57. cases hstep1_witness_witness
  58. cases hstep1_witness_witness_witness
  59. cases hstep1_witness_witness_witness_right
  60. cases hstep1_witness_witness_witness_right_right
  61. have hstep2 : exists p r s. (((exists h. h + S p = S ((S l) * c)) /\ exists q. b = q * S ((S l) * c) + p) /\ (((exists h. h + S r = S ((S l) * d)) /\ exists q. w = q * S ((S l) * d) + r) /\ (((exists h. h + S s = S ((S S l) * d)) /\ exists q. w = q * S ((S S l) * d) + s) /\ s = r * p)))
  62. specialize h2_right_right l
  63. apply h2_right_right
  64. specialize le_refl (S l)
  65. exact le_refl
  66. cases hstep2
  67. cases hstep2_witness
  68. cases hstep2_witness_witness
  69. cases hstep2_witness_witness_witness
  70. cases hstep2_witness_witness_witness_right
  71. cases hstep2_witness_witness_witness_right_right
  72. have hn : n = x2
  73. specialize beta_at_unique u
  74. specialize beta_at_unique v
  75. specialize beta_at_unique (S l)
  76. specialize beta_at_unique n
  77. specialize beta_at_unique x2
  78. apply beta_at_unique
  79. exact h1_right_left
  80. exact hstep1_witness_witness_witness_right_right_left
  81. have hm : m = x5
  82. specialize beta_at_unique w
  83. specialize beta_at_unique d
  84. specialize beta_at_unique (S l)
  85. specialize beta_at_unique m
  86. specialize beta_at_unique x5
  87. apply beta_at_unique
  88. exact h2_right_left
  89. exact hstep2_witness_witness_witness_right_right_left
  90. have hp : x = x3
  91. specialize beta_at_unique b
  92. specialize beta_at_unique c
  93. specialize beta_at_unique l
  94. specialize beta_at_unique x
  95. specialize beta_at_unique x3
  96. apply beta_at_unique
  97. exact hstep1_witness_witness_witness_left
  98. exact hstep2_witness_witness_witness_left
  99. have hprod1 : (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S x1 = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + x1) /\ forall i. (exists h. h + S i = l) -> exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p)))))
  100. split
  101. exact h1_left
  102. split
  103. exact hstep1_witness_witness_witness_right_left
  104. intro i
  105. intro hi
  106. specialize h1_right_right i
  107. apply h1_right_right
  108. specialize le_succ (S i)
  109. specialize le_succ l
  110. apply le_succ
  111. exact hi
  112. have hprod2 : (((exists h. h + S 1 = S ((S 0) * d)) /\ exists q. w = q * S ((S 0) * d) + 1) /\ (((exists h. h + S x4 = S ((S l) * d)) /\ exists q. w = q * S ((S l) * d) + x4) /\ forall i. (exists h. h + S i = l) -> exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * d)) /\ exists q. w = q * S ((S i) * d) + r) /\ (((exists h. h + S s = S ((S S i) * d)) /\ exists q. w = q * S ((S S i) * d) + s) /\ s = r * p)))))
  113. split
  114. exact h2_left
  115. split
  116. exact hstep2_witness_witness_witness_right_left
  117. intro i
  118. intro hi
  119. specialize h2_right_right i
  120. apply h2_right_right
  121. specialize le_succ (S i)
  122. specialize le_succ l
  123. apply le_succ
  124. exact hi
  125. have hprev : x1 = x4
  126. specialize IH x1
  127. specialize IH u
  128. specialize IH v
  129. specialize IH x4
  130. specialize IH w
  131. specialize IH d
  132. apply IH
  133. exact hprod1
  134. exact hprod2
  135. have hmul : x1 * x = x4 * x3
  136. specialize mul_congr x1
  137. specialize mul_congr x4
  138. specialize mul_congr x
  139. specialize mul_congr x3
  140. apply mul_congr
  141. exact hprev
  142. exact hp
  143. trans x2
  144. exact hn
  145. trans x1 * x
  146. exact hstep1_witness_witness_witness_right_right_right
  147. trans x4 * x3
  148. exact hmul
  149. trans x5
  150. symm
  151. exact hstep2_witness_witness_witness_right_right_right
  152. symm
  153. exact hm
beta_product_zero · unchanged support, not a new admission
forall b c n. (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + n) /\ forall i. (exists h. h + S i = 0) -> exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p)))))) -> n = 1
  1. intro b
  2. intro c
  3. intro n
  4. intro hproduct
  5. cases hproduct
  6. cases hproduct_witness
  7. cases hproduct_witness_witness
  8. cases hproduct_witness_witness_right
  9. specialize beta_at_unique x
  10. specialize beta_at_unique x1
  11. specialize beta_at_unique 0
  12. specialize beta_at_unique n
  13. specialize beta_at_unique 1
  14. apply beta_at_unique
  15. exact hproduct_witness_witness_right_left
  16. exact hproduct_witness_witness_left
beta_product_succ_decompose · unchanged support, not a new admission
forall b c l n. (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S S l) * v)) /\ exists q. u = q * S ((S S l) * v) + n) /\ forall i. (exists h. h + S i = S l) -> exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p)))))) -> exists p r. (((exists h. h + S p = S ((S l) * c)) /\ exists q. b = q * S ((S l) * c) + p) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S r = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + r) /\ forall i. (exists h. h + S i = l) -> exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p)))))) /\ n = r * p))
  1. intro b
  2. intro c
  3. intro l
  4. intro n
  5. intro hproduct
  6. cases hproduct
  7. cases hproduct_witness
  8. cases hproduct_witness_witness
  9. cases hproduct_witness_witness_right
  10. have hstep : exists p r s. (((exists h. h + S p = S ((S l) * c)) /\ exists q. b = q * S ((S l) * c) + p) /\ (((exists h. h + S r = S ((S l) * x1)) /\ exists q. x = q * S ((S l) * x1) + r) /\ (((exists h. h + S s = S ((S S l) * x1)) /\ exists q. x = q * S ((S S l) * x1) + s) /\ s = r * p)))
  11. specialize hproduct_witness_witness_right_right l
  12. apply hproduct_witness_witness_right_right
  13. specialize le_refl (S l)
  14. exact le_refl
  15. cases hstep
  16. cases hstep_witness
  17. cases hstep_witness_witness
  18. cases hstep_witness_witness_witness
  19. cases hstep_witness_witness_witness_right
  20. cases hstep_witness_witness_witness_right_right
  21. have hn : n = x4
  22. specialize beta_at_unique x
  23. specialize beta_at_unique x1
  24. specialize beta_at_unique (S l)
  25. specialize beta_at_unique n
  26. specialize beta_at_unique x4
  27. apply beta_at_unique
  28. exact hproduct_witness_witness_right_left
  29. exact hstep_witness_witness_witness_right_right_left
  30. exists x2
  31. exists x3
  32. split
  33. exact hstep_witness_witness_witness_left
  34. split
  35. exists x
  36. exists x1
  37. split
  38. exact hproduct_witness_witness_left
  39. split
  40. exact hstep_witness_witness_witness_right_left
  41. intro i
  42. intro hi
  43. specialize hproduct_witness_witness_right_right i
  44. apply hproduct_witness_witness_right_right
  45. specialize le_succ (S i)
  46. specialize le_succ l
  47. apply le_succ
  48. exact hi
  49. trans x4
  50. exact hn
  51. exact hstep_witness_witness_witness_right_right_right
beta_product_transport_prefix · unchanged support, not a new admission
forall b c z e l n. (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -> exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p)))))) -> (forall i a. (exists h. h + S i = l) -> ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -> ((exists h. h + S a = S ((S i) * e)) /\ exists q. z = q * S ((S i) * e) + a)) -> (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -> exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists q. z = q * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p))))))
  1. intro b
  2. intro c
  3. intro z
  4. intro e
  5. intro l
  6. intro n
  7. intro hproduct
  8. intro hpres
  9. cases hproduct
  10. cases hproduct_witness
  11. cases hproduct_witness_witness
  12. cases hproduct_witness_witness_right
  13. exists x
  14. exists x1
  15. split
  16. exact hproduct_witness_witness_left
  17. split
  18. exact hproduct_witness_witness_right_left
  19. intro i
  20. intro hi
  21. have hstep : exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * x1)) /\ exists q. x = q * S ((S i) * x1) + r) /\ (((exists h. h + S s = S ((S S i) * x1)) /\ exists q. x = q * S ((S S i) * x1) + s) /\ s = r * p)))
  22. specialize hproduct_witness_witness_right_right i
  23. apply hproduct_witness_witness_right_right
  24. exact hi
  25. cases hstep
  26. cases hstep_witness
  27. cases hstep_witness_witness
  28. cases hstep_witness_witness_witness
  29. cases hstep_witness_witness_witness_right
  30. cases hstep_witness_witness_witness_right_right
  31. exists x2
  32. exists x3
  33. exists x4
  34. split
  35. specialize hpres i
  36. specialize hpres x2
  37. apply hpres
  38. exact hi
  39. exact hstep_witness_witness_witness_left
  40. split
  41. exact hstep_witness_witness_witness_right_left
  42. split
  43. exact hstep_witness_witness_witness_right_right_left
  44. exact hstep_witness_witness_witness_right_right_right
beta_repeat_entry_eq · unchanged support, not a new admission
forall b c a l i x. (forall ff_i_entry. (exists ff_lt_entry_bound. ff_lt_entry_bound + S ff_i_entry = l) -> (((exists ff_h_entry_decoded. ff_h_entry_decoded + S (a) = S ((S (ff_i_entry)) * c)) /\ exists ff_q_entry_decoded. b = ff_q_entry_decoded * S ((S (ff_i_entry)) * c) + (a)))) -> (exists h. h + S i = l) -> (((exists ff_h_entry_x. ff_h_entry_x + S (x) = S ((S (i)) * c)) /\ exists ff_q_entry_x. b = ff_q_entry_x * S ((S (i)) * c) + (x))) -> x = a
  1. intro b
  2. intro c
  3. intro a
  4. intro l
  5. intro i
  6. intro x
  7. intro hrepeat
  8. intro hi
  9. intro hx
  10. have ha : ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a)
  11. specialize hrepeat i
  12. apply hrepeat
  13. exact hi
  14. specialize beta_at_unique b
  15. specialize beta_at_unique c
  16. specialize beta_at_unique i
  17. specialize beta_at_unique x
  18. specialize beta_at_unique a
  19. apply beta_at_unique
  20. exact hx
  21. exact ha
pow_zero · unchanged support, not a new admission
forall a e n. e = 0 -> (exists ff_b_z ff_c_z. ((forall ff_i_z_repeat. (exists ff_lt_z_repeat_bound. ff_lt_z_repeat_bound + S ff_i_z_repeat = e) -> (((exists ff_h_z_repeat_decoded. ff_h_z_repeat_decoded + S (a) = S ((S (ff_i_z_repeat)) * ff_c_z)) /\ exists ff_q_z_repeat_decoded. ff_b_z = ff_q_z_repeat_decoded * S ((S (ff_i_z_repeat)) * ff_c_z) + (a)))) /\ (exists ff_u_z_product ff_v_z_product. ((((exists ff_h_z_product_start. ff_h_z_product_start + S (1) = S ((S (0)) * ff_v_z_product)) /\ exists ff_q_z_product_start. ff_u_z_product = ff_q_z_product_start * S ((S (0)) * ff_v_z_product) + (1))) /\ ((((exists ff_h_z_product_terminal. ff_h_z_product_terminal + S (n) = S ((S (e)) * ff_v_z_product)) /\ exists ff_q_z_product_terminal. ff_u_z_product = ff_q_z_product_terminal * S ((S (e)) * ff_v_z_product) + (n))) /\ forall ff_i_z_product. (exists ff_lt_z_product_bound. ff_lt_z_product_bound + S ff_i_z_product = e) -> exists ff_p_z_product ff_r_z_product ff_s_z_product. ((((exists ff_h_z_product_factor. ff_h_z_product_factor + S (ff_p_z_product) = S ((S (ff_i_z_product)) * ff_c_z)) /\ exists ff_q_z_product_factor. ff_b_z = ff_q_z_product_factor * S ((S (ff_i_z_product)) * ff_c_z) + (ff_p_z_product))) /\ ((((exists ff_h_z_product_partial. ff_h_z_product_partial + S (ff_r_z_product) = S ((S (ff_i_z_product)) * ff_v_z_product)) /\ exists ff_q_z_product_partial. ff_u_z_product = ff_q_z_product_partial * S ((S (ff_i_z_product)) * ff_v_z_product) + (ff_r_z_product))) /\ ((((exists ff_h_z_product_successor. ff_h_z_product_successor + S (ff_s_z_product) = S ((S (S ff_i_z_product)) * ff_v_z_product)) /\ exists ff_q_z_product_successor. ff_u_z_product = ff_q_z_product_successor * S ((S (S ff_i_z_product)) * ff_v_z_product) + (ff_s_z_product))) /\ ff_s_z_product = ff_r_z_product * ff_p_z_product)))))))) -> n = 1
  1. intro a
  2. intro e
  3. intro n
  4. intro he
  5. intro hpow
  6. rewrite he at hpow
  7. rewrite he at hpow
  8. rewrite he at hpow
  9. rewrite he at hpow
  10. cases hpow
  11. cases hpow_witness
  12. cases hpow_witness_witness
  13. specialize beta_product_zero x
  14. specialize beta_product_zero x1
  15. specialize beta_product_zero n
  16. apply beta_product_zero
  17. exact hpow_witness_witness_right
pow_successor_decompose · unchanged support, not a new admission
forall a e se n. se = S e -> (exists ff_b_s ff_c_s. ((forall ff_i_s_repeat. (exists ff_lt_s_repeat_bound. ff_lt_s_repeat_bound + S ff_i_s_repeat = se) -> (((exists ff_h_s_repeat_decoded. ff_h_s_repeat_decoded + S (a) = S ((S (ff_i_s_repeat)) * ff_c_s)) /\ exists ff_q_s_repeat_decoded. ff_b_s = ff_q_s_repeat_decoded * S ((S (ff_i_s_repeat)) * ff_c_s) + (a)))) /\ (exists ff_u_s_product ff_v_s_product. ((((exists ff_h_s_product_start. ff_h_s_product_start + S (1) = S ((S (0)) * ff_v_s_product)) /\ exists ff_q_s_product_start. ff_u_s_product = ff_q_s_product_start * S ((S (0)) * ff_v_s_product) + (1))) /\ ((((exists ff_h_s_product_terminal. ff_h_s_product_terminal + S (n) = S ((S (se)) * ff_v_s_product)) /\ exists ff_q_s_product_terminal. ff_u_s_product = ff_q_s_product_terminal * S ((S (se)) * ff_v_s_product) + (n))) /\ forall ff_i_s_product. (exists ff_lt_s_product_bound. ff_lt_s_product_bound + S ff_i_s_product = se) -> exists ff_p_s_product ff_r_s_product ff_s_s_product. ((((exists ff_h_s_product_factor. ff_h_s_product_factor + S (ff_p_s_product) = S ((S (ff_i_s_product)) * ff_c_s)) /\ exists ff_q_s_product_factor. ff_b_s = ff_q_s_product_factor * S ((S (ff_i_s_product)) * ff_c_s) + (ff_p_s_product))) /\ ((((exists ff_h_s_product_partial. ff_h_s_product_partial + S (ff_r_s_product) = S ((S (ff_i_s_product)) * ff_v_s_product)) /\ exists ff_q_s_product_partial. ff_u_s_product = ff_q_s_product_partial * S ((S (ff_i_s_product)) * ff_v_s_product) + (ff_r_s_product))) /\ ((((exists ff_h_s_product_successor. ff_h_s_product_successor + S (ff_s_s_product) = S ((S (S ff_i_s_product)) * ff_v_s_product)) /\ exists ff_q_s_product_successor. ff_u_s_product = ff_q_s_product_successor * S ((S (S ff_i_s_product)) * ff_v_s_product) + (ff_s_s_product))) /\ ff_s_s_product = ff_r_s_product * ff_p_s_product)))))))) -> exists r. (exists ff_b_p ff_c_p. ((forall ff_i_p_repeat. (exists ff_lt_p_repeat_bound. ff_lt_p_repeat_bound + S ff_i_p_repeat = e) -> (((exists ff_h_p_repeat_decoded. ff_h_p_repeat_decoded + S (a) = S ((S (ff_i_p_repeat)) * ff_c_p)) /\ exists ff_q_p_repeat_decoded. ff_b_p = ff_q_p_repeat_decoded * S ((S (ff_i_p_repeat)) * ff_c_p) + (a)))) /\ (exists ff_u_p_product ff_v_p_product. ((((exists ff_h_p_product_start. ff_h_p_product_start + S (1) = S ((S (0)) * ff_v_p_product)) /\ exists ff_q_p_product_start. ff_u_p_product = ff_q_p_product_start * S ((S (0)) * ff_v_p_product) + (1))) /\ ((((exists ff_h_p_product_terminal. ff_h_p_product_terminal + S (r) = S ((S (e)) * ff_v_p_product)) /\ exists ff_q_p_product_terminal. ff_u_p_product = ff_q_p_product_terminal * S ((S (e)) * ff_v_p_product) + (r))) /\ forall ff_i_p_product. (exists ff_lt_p_product_bound. ff_lt_p_product_bound + S ff_i_p_product = e) -> exists ff_p_p_product ff_r_p_product ff_s_p_product. ((((exists ff_h_p_product_factor. ff_h_p_product_factor + S (ff_p_p_product) = S ((S (ff_i_p_product)) * ff_c_p)) /\ exists ff_q_p_product_factor. ff_b_p = ff_q_p_product_factor * S ((S (ff_i_p_product)) * ff_c_p) + (ff_p_p_product))) /\ ((((exists ff_h_p_product_partial. ff_h_p_product_partial + S (ff_r_p_product) = S ((S (ff_i_p_product)) * ff_v_p_product)) /\ exists ff_q_p_product_partial. ff_u_p_product = ff_q_p_product_partial * S ((S (ff_i_p_product)) * ff_v_p_product) + (ff_r_p_product))) /\ ((((exists ff_h_p_product_successor. ff_h_p_product_successor + S (ff_s_p_product) = S ((S (S ff_i_p_product)) * ff_v_p_product)) /\ exists ff_q_p_product_successor. ff_u_p_product = ff_q_p_product_successor * S ((S (S ff_i_p_product)) * ff_v_p_product) + (ff_s_p_product))) /\ ff_s_p_product = ff_r_p_product * ff_p_p_product)))))))) /\ n = r * a
  1. intro a
  2. intro e
  3. intro se
  4. intro n
  5. intro hse
  6. intro hpow
  7. rewrite hse at hpow
  8. rewrite hse at hpow
  9. rewrite hse at hpow
  10. rewrite hse at hpow
  11. cases hpow
  12. cases hpow_witness
  13. cases hpow_witness_witness
  14. have hdecomp : exists p r. (((exists ff_h_pow_succ_factor. ff_h_pow_succ_factor + S (p) = S ((S (e)) * x1)) /\ exists ff_q_pow_succ_factor. x = ff_q_pow_succ_factor * S ((S (e)) * x1) + (p))) /\ ((exists ff_u_pow_succ_prefix ff_v_pow_succ_prefix. ((((exists ff_h_pow_succ_prefix_start. ff_h_pow_succ_prefix_start + S (1) = S ((S (0)) * ff_v_pow_succ_prefix)) /\ exists ff_q_pow_succ_prefix_start. ff_u_pow_succ_prefix = ff_q_pow_succ_prefix_start * S ((S (0)) * ff_v_pow_succ_prefix) + (1))) /\ ((((exists ff_h_pow_succ_prefix_terminal. ff_h_pow_succ_prefix_terminal + S (r) = S ((S (e)) * ff_v_pow_succ_prefix)) /\ exists ff_q_pow_succ_prefix_terminal. ff_u_pow_succ_prefix = ff_q_pow_succ_prefix_terminal * S ((S (e)) * ff_v_pow_succ_prefix) + (r))) /\ forall ff_i_pow_succ_prefix. (exists ff_lt_pow_succ_prefix_bound. ff_lt_pow_succ_prefix_bound + S ff_i_pow_succ_prefix = e) -> exists ff_p_pow_succ_prefix ff_r_pow_succ_prefix ff_s_pow_succ_prefix. ((((exists ff_h_pow_succ_prefix_factor. ff_h_pow_succ_prefix_factor + S (ff_p_pow_succ_prefix) = S ((S (ff_i_pow_succ_prefix)) * x1)) /\ exists ff_q_pow_succ_prefix_factor. x = ff_q_pow_succ_prefix_factor * S ((S (ff_i_pow_succ_prefix)) * x1) + (ff_p_pow_succ_prefix))) /\ ((((exists ff_h_pow_succ_prefix_partial. ff_h_pow_succ_prefix_partial + S (ff_r_pow_succ_prefix) = S ((S (ff_i_pow_succ_prefix)) * ff_v_pow_succ_prefix)) /\ exists ff_q_pow_succ_prefix_partial. ff_u_pow_succ_prefix = ff_q_pow_succ_prefix_partial * S ((S (ff_i_pow_succ_prefix)) * ff_v_pow_succ_prefix) + (ff_r_pow_succ_prefix))) /\ ((((exists ff_h_pow_succ_prefix_successor. ff_h_pow_succ_prefix_successor + S (ff_s_pow_succ_prefix) = S ((S (S ff_i_pow_succ_prefix)) * ff_v_pow_succ_prefix)) /\ exists ff_q_pow_succ_prefix_successor. ff_u_pow_succ_prefix = ff_q_pow_succ_prefix_successor * S ((S (S ff_i_pow_succ_prefix)) * ff_v_pow_succ_prefix) + (ff_s_pow_succ_prefix))) /\ ff_s_pow_succ_prefix = ff_r_pow_succ_prefix * ff_p_pow_succ_prefix)))))) /\ n = r * p)
  15. specialize beta_product_succ_decompose x
  16. specialize beta_product_succ_decompose x1
  17. specialize beta_product_succ_decompose e
  18. specialize beta_product_succ_decompose n
  19. apply beta_product_succ_decompose
  20. exact hpow_witness_witness_right
  21. cases hdecomp
  22. cases hdecomp_witness
  23. cases hdecomp_witness_witness
  24. cases hdecomp_witness_witness_right
  25. have hpa : x2 = a
  26. specialize beta_repeat_entry_eq x
  27. specialize beta_repeat_entry_eq x1
  28. specialize beta_repeat_entry_eq a
  29. specialize beta_repeat_entry_eq (S e)
  30. specialize beta_repeat_entry_eq e
  31. specialize beta_repeat_entry_eq x2
  32. apply beta_repeat_entry_eq
  33. exact hpow_witness_witness_left
  34. specialize le_refl (S e)
  35. exact le_refl
  36. exact hdecomp_witness_witness_left
  37. exists x3
  38. split
  39. exists x
  40. exists x1
  41. split
  42. intro i
  43. intro hi
  44. specialize hpow_witness_witness_left i
  45. apply hpow_witness_witness_left
  46. specialize le_succ (S i)
  47. specialize le_succ e
  48. apply le_succ
  49. exact hi
  50. exact hdecomp_witness_witness_right_left
  51. trans x3 * x2
  52. exact hdecomp_witness_witness_right_right
  53. rewrite hpa
  54. refl
beta_range_empty · unchanged support, not a new admission
forall b c a l. l = 0 -> (forall ff_i_empty. (exists ff_lt_empty_bound. ff_lt_empty_bound + S ff_i_empty = l) -> (((exists ff_h_empty_decoded. ff_h_empty_decoded + S (a + ff_i_empty) = S ((S (ff_i_empty)) * c)) /\ exists ff_q_empty_decoded. b = ff_q_empty_decoded * S ((S (ff_i_empty)) * c) + (a + ff_i_empty))))
  1. intro b
  2. intro c
  3. intro a
  4. intro l
  5. intro hl
  6. intro i
  7. intro hi
  8. rewrite hl at hi
  9. exfalso
  10. cases hi
  11. have hsi : S i = 0
  12. specialize add_eq_zero_right x
  13. specialize add_eq_zero_right (S i)
  14. apply add_eq_zero_right
  15. exact hi_witness
  16. specialize succ_ne_zero i
  17. apply succ_ne_zero
  18. exact hsi
beta_range_succ_extend · unchanged support, not a new admission
forall b c a l sl. sl = S l -> (forall ff_i_before. (exists ff_lt_before_bound. ff_lt_before_bound + S ff_i_before = l) -> (((exists ff_h_before_decoded. ff_h_before_decoded + S (a + ff_i_before) = S ((S (ff_i_before)) * c)) /\ exists ff_q_before_decoded. b = ff_q_before_decoded * S ((S (ff_i_before)) * c) + (a + ff_i_before)))) -> exists z d. (forall ff_i_after. (exists ff_lt_after_bound. ff_lt_after_bound + S ff_i_after = sl) -> (((exists ff_h_after_decoded. ff_h_after_decoded + S (a + ff_i_after) = S ((S (ff_i_after)) * d)) /\ exists ff_q_after_decoded. z = ff_q_after_decoded * S ((S (ff_i_after)) * d) + (a + ff_i_after))))
  1. intro b
  2. intro c
  3. intro a
  4. intro l
  5. intro sl
  6. intro hsl
  7. intro hrange
  8. specialize beta_prefix_extend l
  9. specialize beta_prefix_extend b
  10. specialize beta_prefix_extend c
  11. specialize beta_prefix_extend (a + l)
  12. cases beta_prefix_extend
  13. cases beta_prefix_extend_witness
  14. cases beta_prefix_extend_witness_witness
  15. exists x
  16. exists x1
  17. intro i
  18. intro hi
  19. rewrite hsl at hi
  20. have hil : exists h. h + i = l
  21. specialize le_of_succ_le_succ i
  22. specialize le_of_succ_le_succ l
  23. apply le_of_succ_le_succ
  24. exact hi
  25. have hsplit : i = l \/ exists h. h + S i = l
  26. specialize le_eq_or_lt i
  27. specialize le_eq_or_lt l
  28. apply le_eq_or_lt
  29. exact hil
  30. cases hsplit
  31. rewrite hsplit_left
  32. rewrite hsplit_left
  33. rewrite hsplit_left
  34. rewrite hsplit_left
  35. exact beta_prefix_extend_witness_witness_left
  36. specialize beta_prefix_extend_witness_witness_right i
  37. specialize beta_prefix_extend_witness_witness_right (a + i)
  38. apply beta_prefix_extend_witness_witness_right
  39. exact hsplit_right
  40. specialize hrange i
  41. apply hrange
  42. exact hsplit_right
beta_range_exists · unchanged support, not a new admission
forall a l. exists b c. (forall ff_i_r. (exists ff_lt_r_bound. ff_lt_r_bound + S ff_i_r = l) -> (((exists ff_h_r_decoded. ff_h_r_decoded + S (a + ff_i_r) = S ((S (ff_i_r)) * c)) /\ exists ff_q_r_decoded. b = ff_q_r_decoded * S ((S (ff_i_r)) * c) + (a + ff_i_r))))
  1. intro a
  2. induction l
  3. exists 0
  4. exists 0
  5. specialize beta_range_empty 0
  6. specialize beta_range_empty 0
  7. specialize beta_range_empty a
  8. specialize beta_range_empty 0
  9. apply beta_range_empty
  10. refl
  11. cases IH
  12. cases IH_witness
  13. specialize beta_range_succ_extend x
  14. specialize beta_range_succ_extend x1
  15. specialize beta_range_succ_extend a
  16. specialize beta_range_succ_extend l
  17. specialize beta_range_succ_extend (S l)
  18. apply beta_range_succ_extend
  19. refl
  20. exact IH_witness_witness
beta_range_entry_eq · unchanged support, not a new admission
forall b c a l i x. (forall ff_i_entry. (exists ff_lt_entry_bound. ff_lt_entry_bound + S ff_i_entry = l) -> (((exists ff_h_entry_decoded. ff_h_entry_decoded + S (a + ff_i_entry) = S ((S (ff_i_entry)) * c)) /\ exists ff_q_entry_decoded. b = ff_q_entry_decoded * S ((S (ff_i_entry)) * c) + (a + ff_i_entry)))) -> (exists h. h + S i = l) -> (((exists ff_h_range_entry_x. ff_h_range_entry_x + S (x) = S ((S (i)) * c)) /\ exists ff_q_range_entry_x. b = ff_q_range_entry_x * S ((S (i)) * c) + (x))) -> x = a + i
  1. intro b
  2. intro c
  3. intro a
  4. intro l
  5. intro i
  6. intro x
  7. intro hrange
  8. intro hi
  9. intro hx
  10. have ha : ((exists h. h + S (a + i) = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + (a + i))
  11. specialize hrange i
  12. apply hrange
  13. exact hi
  14. specialize beta_at_unique b
  15. specialize beta_at_unique c
  16. specialize beta_at_unique i
  17. specialize beta_at_unique x
  18. specialize beta_at_unique (a + i)
  19. apply beta_at_unique
  20. exact hx
  21. exact ha
prime_coprime_or_divides · unchanged support, not a new admission
forall p a. (~(p = 1) /\ forall c e. p = c * e -> c = 1 \/ e = 1) -> (forall d. (exists x. p = d * x) -> (exists y. a = d * y) -> d = 1) \/ exists k. a = p * k
  1. intro p
  2. intro a
  3. intro hp
  4. have hg : exists g. (((exists x. p = g * x) /\ (exists y. a = g * y)) /\ forall c. (exists u. p = c * u) -> (exists v. a = c * v) -> exists w. g = c * w)
  5. apply gcd_exists_relational
  6. cases hg
  7. have hgfull : (((exists u. p = x * u) /\ (exists v. a = x * v)) /\ forall c. (exists s. p = c * s) -> (exists t. a = c * t) -> exists w. x = c * w)
  8. exact hg_witness
  9. cases hg_witness
  10. cases hg_witness_left
  11. have hfactor : x = 1 \/ p = x
  12. specialize prime_divisor_eq_one_or_self p
  13. specialize prime_divisor_eq_one_or_self x
  14. apply prime_divisor_eq_one_or_self
  15. exact hp
  16. exact hg_witness_left_left
  17. cases hfactor
  18. left
  19. apply is_gcd_one_to_coprime
  20. have hg1 : (((exists u. p = 1 * u) /\ (exists v. a = 1 * v)) /\ forall c. (exists s. p = c * s) -> (exists t. a = c * t) -> exists w. 1 = c * w)
  21. rewrite <- hfactor_left
  22. rewrite <- hfactor_left
  23. rewrite <- hfactor_left
  24. exact hgfull
  25. exact hg1
  26. right
  27. cases hg_witness_left_right
  28. exists x1
  29. rewrite hfactor_right
  30. exact hg_witness_left_right_witness
prime_not_divides_coprime · unchanged support, not a new admission
forall p a. (~(p = 1) /\ forall c e. p = c * e -> c = 1 \/ e = 1) -> ~(exists k. a = p * k) -> forall d. (exists x. p = d * x) -> (exists y. a = d * y) -> d = 1
  1. intro p
  2. intro a
  3. intro hp
  4. intro hnot
  5. specialize prime_coprime_or_divides p
  6. specialize prime_coprime_or_divides a
  7. have hsplit : (forall d. (exists x. p = d * x) -> (exists y. a = d * y) -> d = 1) \/ exists k. a = p * k
  8. apply prime_coprime_or_divides
  9. exact hp
  10. cases hsplit
  11. exact hsplit_left
  12. exfalso
  13. apply hnot
  14. exact hsplit_right
coprime_balanced_mod_inverse · unchanged support, not a new admission
forall a m. (forall d. (exists x. a = d * x) -> (exists y. m = d * y) -> d = 1) -> exists xp xn u v. a * xp + m * u = (1 + a * xn) + m * v
  1. intro a
  2. intro m
  3. intro hcop
  4. have hbez : exists xp yp xn yn. a * xp + m * yp = 1 + (a * xn + m * yn)
  5. specialize coprime_balanced_bezout a
  6. specialize coprime_balanced_bezout m
  7. apply coprime_balanced_bezout
  8. exact hcop
  9. cases hbez
  10. cases hbez_witness
  11. cases hbez_witness_witness
  12. cases hbez_witness_witness_witness
  13. exists x
  14. exists x2
  15. exists x1
  16. exists x3
  17. trans 1 + (a * x2 + m * x3)
  18. exact hbez_witness_witness_witness_witness
  19. symm
  20. apply add_assoc
coprime_mod_inverse · unchanged support, not a new admission
forall a m. ~(m = 0) -> (forall d. (exists x. a = d * x) -> (exists y. m = d * y) -> d = 1) -> exists z u v. a * z + m * u = 1 + m * v
  1. intro a
  2. intro m
  3. intro hm
  4. intro hcop
  5. have hms : exists k. m = S k
  6. specialize nonzero_is_succ m
  7. apply nonzero_is_succ
  8. exact hm
  9. have hbal : exists xp xn u v. a * xp + m * u = (1 + a * xn) + m * v
  10. specialize coprime_balanced_mod_inverse a
  11. specialize coprime_balanced_mod_inverse m
  12. apply coprime_balanced_mod_inverse
  13. exact hcop
  14. cases hms
  15. cases hbal
  16. cases hbal_witness
  17. cases hbal_witness_witness
  18. cases hbal_witness_witness_witness
  19. have hself : exists u v. (x * (a * x2)) + m * u = (x * (a * x2)) + m * v
  20. specialize mod_eq_refl m
  21. specialize mod_eq_refl (x * (a * x2))
  22. apply mod_eq_refl
  23. have hadd : exists u v. ((a * x1) + x * (a * x2)) + m * u = ((1 + a * x2) + x * (a * x2)) + m * v
  24. specialize mod_eq_add m
  25. specialize mod_eq_add (a * x1)
  26. specialize mod_eq_add (1 + a * x2)
  27. specialize mod_eq_add (x * (a * x2))
  28. specialize mod_eq_add (x * (a * x2))
  29. apply mod_eq_add
  30. exists x3
  31. exists x4
  32. exact hbal_witness_witness_witness_witness
  33. exact hself
  34. have hcancel : exists u v. ((1 + a * x2) + x * (a * x2)) + m * u = 1 + m * v
  35. specialize mod_eq_predecessor_cancel x
  36. specialize mod_eq_predecessor_cancel 1
  37. specialize mod_eq_predecessor_cancel (a * x2)
  38. have hkcancel : exists u v. ((1 + a * x2) + x * (a * x2)) + S x * u = 1 + S x * v
  39. apply mod_eq_predecessor_cancel
  40. rewrite <- hms_witness at hkcancel
  41. rewrite <- hms_witness at hkcancel
  42. exact hkcancel
  43. have hfinal : exists u v. ((a * x1) + x * (a * x2)) + m * u = 1 + m * v
  44. specialize mod_eq_trans m
  45. specialize mod_eq_trans ((a * x1) + x * (a * x2))
  46. specialize mod_eq_trans ((1 + a * x2) + x * (a * x2))
  47. specialize mod_eq_trans 1
  48. apply mod_eq_trans
  49. exact hadd
  50. exact hcancel
  51. have hnorm : a * (x1 + x * x2) = (a * x1) + x * (a * x2)
  52. trans a * x1 + a * (x * x2)
  53. apply mul_add
  54. congr
  55. refl
  56. trans (a * x) * x2
  57. symm
  58. apply mul_assoc
  59. trans (x * a) * x2
  60. congr
  61. apply mul_comm
  62. refl
  63. apply mul_assoc
  64. exists x1 + x * x2
  65. rewrite hnorm
  66. exact hfinal
mod_eq_cancel_coprime · unchanged support, not a new admission
forall m a x y. ~(m = 0) -> (forall d. (exists x. a = d * x) -> (exists y. m = d * y) -> d = 1) -> (exists u v. (a * x) + m * u = (a * y) + m * v) -> exists r s. x + m * r = y + m * s
  1. intro m
  2. intro a
  3. intro x
  4. intro y
  5. intro hm
  6. intro hcop
  7. intro hxy
  8. have hinv : exists z u v. a * z + m * u = 1 + m * v
  9. specialize coprime_mod_inverse a
  10. specialize coprime_mod_inverse m
  11. apply coprime_mod_inverse
  12. exact hm
  13. exact hcop
  14. cases hinv
  15. cases hinv_witness
  16. cases hinv_witness_witness
  17. have hzx : exists u v. (x * (a * x1)) + m * u = (x * 1) + m * v
  18. specialize mod_eq_mul_left m
  19. specialize mod_eq_mul_left (a * x1)
  20. specialize mod_eq_mul_left 1
  21. specialize mod_eq_mul_left x
  22. apply mod_eq_mul_left
  23. exists x2
  24. exists x3
  25. exact hinv_witness_witness_witness
  26. have hnormx : x * (a * x1) = (a * x) * x1
  27. trans (x * a) * x1
  28. symm
  29. apply mul_assoc
  30. trans (a * x) * x1
  31. congr
  32. apply mul_comm
  33. refl
  34. refl
  35. have honex : x * 1 = x
  36. apply mul_one
  37. have hxprod : exists u v. ((a * x) * x1) + m * u = x + m * v
  38. cases hzx
  39. cases hzx_witness
  40. exists x4
  41. exists x5
  42. trans (x * (a * x1)) + m * x4
  43. congr
  44. symm
  45. exact hnormx
  46. refl
  47. trans (x * 1) + m * x5
  48. exact hzx_witness_witness
  49. congr
  50. exact honex
  51. refl
  52. have hxhprod : exists u v. x + m * u = ((a * x) * x1) + m * v
  53. specialize mod_eq_symm m
  54. specialize mod_eq_symm ((a * x) * x1)
  55. specialize mod_eq_symm x
  56. apply mod_eq_symm
  57. exact hxprod
  58. have hscaled : exists u v. ((a * x) * x1) + m * u = ((a * y) * x1) + m * v
  59. specialize mod_eq_mul_right m
  60. specialize mod_eq_mul_right (a * x)
  61. specialize mod_eq_mul_right (a * y)
  62. specialize mod_eq_mul_right x1
  63. apply mod_eq_mul_right
  64. exact hxy
  65. have hzy : exists u v. (y * (a * x1)) + m * u = (y * 1) + m * v
  66. specialize mod_eq_mul_left m
  67. specialize mod_eq_mul_left (a * x1)
  68. specialize mod_eq_mul_left 1
  69. specialize mod_eq_mul_left y
  70. apply mod_eq_mul_left
  71. exists x2
  72. exists x3
  73. exact hinv_witness_witness_witness
  74. have hnormy : y * (a * x1) = (a * y) * x1
  75. trans (y * a) * x1
  76. symm
  77. apply mul_assoc
  78. trans (a * y) * x1
  79. congr
  80. apply mul_comm
  81. refl
  82. refl
  83. have honey : y * 1 = y
  84. apply mul_one
  85. have hyprod : exists u v. ((a * y) * x1) + m * u = y + m * v
  86. cases hzy
  87. cases hzy_witness
  88. exists x4
  89. exists x5
  90. trans (y * (a * x1)) + m * x4
  91. congr
  92. symm
  93. exact hnormy
  94. refl
  95. trans (y * 1) + m * x5
  96. exact hzy_witness_witness
  97. congr
  98. exact honey
  99. refl
  100. have hmid : exists u v. x + m * u = ((a * y) * x1) + m * v
  101. specialize mod_eq_trans m
  102. specialize mod_eq_trans x
  103. specialize mod_eq_trans ((a * x) * x1)
  104. specialize mod_eq_trans ((a * y) * x1)
  105. apply mod_eq_trans
  106. exact hxhprod
  107. exact hscaled
  108. specialize mod_eq_trans m
  109. specialize mod_eq_trans x
  110. specialize mod_eq_trans ((a * y) * x1)
  111. specialize mod_eq_trans y
  112. apply mod_eq_trans
  113. exact hmid
  114. exact hyprod
prime_mod_cancel · unchanged support, not a new admission
forall p a x y. (~(p = 1) /\ forall c e. p = c * e -> c = 1 \/ e = 1) -> ~(exists k. a = p * k) -> (exists u v. (a * x) + p * u = (a * y) + p * v) -> exists r s. x + p * r = y + p * s
  1. intro p
  2. intro a
  3. intro x
  4. intro y
  5. intro hp
  6. intro hnot
  7. intro hxy
  8. have hp0 : ~(p = 0)
  9. intro hpzero
  10. specialize prime_nonzero p
  11. apply prime_nonzero
  12. exact hp
  13. exact hpzero
  14. have hpacop : forall d. (exists u. p = d * u) -> (exists v. a = d * v) -> d = 1
  15. specialize prime_not_divides_coprime p
  16. specialize prime_not_divides_coprime a
  17. apply prime_not_divides_coprime
  18. exact hp
  19. exact hnot
  20. have hapcop : forall d. (exists u. a = d * u) -> (exists v. p = d * v) -> d = 1
  21. specialize coprime_symm p
  22. specialize coprime_symm a
  23. apply coprime_symm
  24. exact hpacop
  25. specialize mod_eq_cancel_coprime p
  26. specialize mod_eq_cancel_coprime a
  27. specialize mod_eq_cancel_coprime x
  28. specialize mod_eq_cancel_coprime y
  29. apply mod_eq_cancel_coprime
  30. exact hp0
  31. exact hapcop
  32. exact hxy
factorial_exists · unchanged support, not a new admission
forall n. exists z. (exists ff_b_exists ff_c_exists. ((forall ff_i_exists_range. (exists ff_lt_exists_range_bound. ff_lt_exists_range_bound + S ff_i_exists_range = n) -> (((exists ff_h_exists_range_decoded. ff_h_exists_range_decoded + S (1 + ff_i_exists_range) = S ((S (ff_i_exists_range)) * ff_c_exists)) /\ exists ff_q_exists_range_decoded. ff_b_exists = ff_q_exists_range_decoded * S ((S (ff_i_exists_range)) * ff_c_exists) + (1 + ff_i_exists_range)))) /\ (exists ff_u_exists_product ff_v_exists_product. ((((exists ff_h_exists_product_start. ff_h_exists_product_start + S (1) = S ((S (0)) * ff_v_exists_product)) /\ exists ff_q_exists_product_start. ff_u_exists_product = ff_q_exists_product_start * S ((S (0)) * ff_v_exists_product) + (1))) /\ ((((exists ff_h_exists_product_terminal. ff_h_exists_product_terminal + S (z) = S ((S (n)) * ff_v_exists_product)) /\ exists ff_q_exists_product_terminal. ff_u_exists_product = ff_q_exists_product_terminal * S ((S (n)) * ff_v_exists_product) + (z))) /\ forall ff_i_exists_product. (exists ff_lt_exists_product_bound. ff_lt_exists_product_bound + S ff_i_exists_product = n) -> exists ff_p_exists_product ff_r_exists_product ff_s_exists_product. ((((exists ff_h_exists_product_factor. ff_h_exists_product_factor + S (ff_p_exists_product) = S ((S (ff_i_exists_product)) * ff_c_exists)) /\ exists ff_q_exists_product_factor. ff_b_exists = ff_q_exists_product_factor * S ((S (ff_i_exists_product)) * ff_c_exists) + (ff_p_exists_product))) /\ ((((exists ff_h_exists_product_partial. ff_h_exists_product_partial + S (ff_r_exists_product) = S ((S (ff_i_exists_product)) * ff_v_exists_product)) /\ exists ff_q_exists_product_partial. ff_u_exists_product = ff_q_exists_product_partial * S ((S (ff_i_exists_product)) * ff_v_exists_product) + (ff_r_exists_product))) /\ ((((exists ff_h_exists_product_successor. ff_h_exists_product_successor + S (ff_s_exists_product) = S ((S (S ff_i_exists_product)) * ff_v_exists_product)) /\ exists ff_q_exists_product_successor. ff_u_exists_product = ff_q_exists_product_successor * S ((S (S ff_i_exists_product)) * ff_v_exists_product) + (ff_s_exists_product))) /\ ff_s_exists_product = ff_r_exists_product * ff_p_exists_product))))))))
  1. intro n
  2. have hrange : exists b c. (forall i. (exists h. h + S i = n) -> ((exists h. h + S (1 + i) = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + (1 + i)))
  3. specialize beta_range_exists 1
  4. specialize beta_range_exists n
  5. exact beta_range_exists
  6. cases hrange
  7. cases hrange_witness
  8. specialize beta_product_exists x
  9. specialize beta_product_exists x1
  10. specialize beta_product_exists n
  11. cases beta_product_exists
  12. cases beta_product_exists_witness
  13. cases beta_product_exists_witness_witness
  14. exists x2
  15. exists x
  16. exists x1
  17. split
  18. exact hrange_witness_witness
  19. exists x3
  20. exists x4
  21. exact beta_product_exists_witness_witness_witness
finite_surjective_zero · unchanged support, not a new admission
forall b c n. n = 0 -> (forall fp_value_zero. (exists fp_gap_zero_value. fp_gap_zero_value + S fp_value_zero = n) -> exists fp_i_zero. ((exists fp_gap_zero_index. fp_gap_zero_index + S fp_i_zero = n) /\ (((exists ff_h_zero_entry. ff_h_zero_entry + S (fp_value_zero) = S ((S (fp_i_zero)) * c)) /\ exists ff_q_zero_entry. b = ff_q_zero_entry * S ((S (fp_i_zero)) * c) + (fp_value_zero)))))
  1. intro b
  2. intro c
  3. intro n
  4. intro hn
  5. intro y
  6. intro hy
  7. rewrite hn at hy
  8. exfalso
  9. cases hy
  10. have hsy : S y = 0
  11. specialize add_eq_zero_right x
  12. specialize add_eq_zero_right (S y)
  13. apply add_eq_zero_right
  14. exact hy_witness
  15. specialize succ_ne_zero y
  16. apply succ_ne_zero
  17. exact hsy
finite_injective_prefix_succ · unchanged support, not a new admission
forall b c n sn. sn = S n -> (forall fp_i_inj_succ fp_j_inj_succ fp_value_inj_succ. (exists fp_gap_inj_succ_i. fp_gap_inj_succ_i + S fp_i_inj_succ = sn) -> (exists fp_gap_inj_succ_j. fp_gap_inj_succ_j + S fp_j_inj_succ = sn) -> (((exists ff_h_inj_succ_left. ff_h_inj_succ_left + S (fp_value_inj_succ) = S ((S (fp_i_inj_succ)) * c)) /\ exists ff_q_inj_succ_left. b = ff_q_inj_succ_left * S ((S (fp_i_inj_succ)) * c) + (fp_value_inj_succ))) -> (((exists ff_h_inj_succ_right. ff_h_inj_succ_right + S (fp_value_inj_succ) = S ((S (fp_j_inj_succ)) * c)) /\ exists ff_q_inj_succ_right. b = ff_q_inj_succ_right * S ((S (fp_j_inj_succ)) * c) + (fp_value_inj_succ))) -> fp_i_inj_succ = fp_j_inj_succ) -> (forall fp_i_inj_prefix fp_j_inj_prefix fp_value_inj_prefix. (exists fp_gap_inj_prefix_i. fp_gap_inj_prefix_i + S fp_i_inj_prefix = n) -> (exists fp_gap_inj_prefix_j. fp_gap_inj_prefix_j + S fp_j_inj_prefix = n) -> (((exists ff_h_inj_prefix_left. ff_h_inj_prefix_left + S (fp_value_inj_prefix) = S ((S (fp_i_inj_prefix)) * c)) /\ exists ff_q_inj_prefix_left. b = ff_q_inj_prefix_left * S ((S (fp_i_inj_prefix)) * c) + (fp_value_inj_prefix))) -> (((exists ff_h_inj_prefix_right. ff_h_inj_prefix_right + S (fp_value_inj_prefix) = S ((S (fp_j_inj_prefix)) * c)) /\ exists ff_q_inj_prefix_right. b = ff_q_inj_prefix_right * S ((S (fp_j_inj_prefix)) * c) + (fp_value_inj_prefix))) -> fp_i_inj_prefix = fp_j_inj_prefix)
  1. intro b
  2. intro c
  3. intro n
  4. intro sn
  5. intro hsn
  6. intro hinj
  7. rewrite hsn at hinj
  8. rewrite hsn at hinj
  9. intro i
  10. intro j
  11. intro x
  12. intro hi
  13. intro hj
  14. intro hxi
  15. intro hxj
  16. specialize hinj i
  17. specialize hinj j
  18. specialize hinj x
  19. apply hinj
  20. specialize le_succ (S i)
  21. specialize le_succ n
  22. apply le_succ
  23. exact hi
  24. specialize le_succ (S j)
  25. specialize le_succ n
  26. apply le_succ
  27. exact hj
  28. exact hxi
  29. exact hxj
finite_lt_succ_eq_or_lt · unchanged support, not a new admission
forall n x. (exists h. h + S x = S n) -> x = n \/ exists h. h + S x = n
  1. intro n
  2. intro x
  3. intro hlt
  4. have hle : exists h. h + x = n
  5. specialize le_of_succ_le_succ x
  6. specialize le_of_succ_le_succ n
  7. apply le_of_succ_le_succ
  8. exact hlt
  9. specialize le_eq_or_lt x
  10. specialize le_eq_or_lt n
  11. apply le_eq_or_lt
  12. exact hle
finite_bounded_entry_lt · unchanged support, not a new admission
forall b c l i x. (forall fp_i_entry_bound. (exists fp_gap_entry_bound_index. fp_gap_entry_bound_index + S fp_i_entry_bound = l) -> exists fp_value_entry_bound. ((((exists ff_h_entry_bound_entry. ff_h_entry_bound_entry + S (fp_value_entry_bound) = S ((S (fp_i_entry_bound)) * c)) /\ exists ff_q_entry_bound_entry. b = ff_q_entry_bound_entry * S ((S (fp_i_entry_bound)) * c) + (fp_value_entry_bound))) /\ (exists fp_gap_entry_bound_value. fp_gap_entry_bound_value + S fp_value_entry_bound = l))) -> (exists h. h + S i = l) -> (((exists ff_h_entry_bound_at. ff_h_entry_bound_at + S (x) = S ((S (i)) * c)) /\ exists ff_q_entry_bound_at. b = ff_q_entry_bound_at * S ((S (i)) * c) + (x))) -> exists h. h + S x = l
  1. intro b
  2. intro c
  3. intro l
  4. intro i
  5. intro x
  6. intro hbounded
  7. intro hi
  8. intro hentry
  9. specialize hbounded i
  10. have hdecoded : exists a. (((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) /\ exists h. h + S a = l)
  11. apply hbounded
  12. exact hi
  13. cases hdecoded
  14. cases hdecoded_witness
  15. have hxa : x = x1
  16. specialize beta_at_unique b
  17. specialize beta_at_unique c
  18. specialize beta_at_unique i
  19. specialize beta_at_unique x
  20. specialize beta_at_unique x1
  21. apply beta_at_unique
  22. exact hentry
  23. exact hdecoded_witness_left
  24. rewrite hxa
  25. exact hdecoded_witness_right
beta_prefix_replace_exists · unchanged support, not a new admission
forall b c i s k. (exists h. h + S i = k) -> exists z d. ((((exists ff_h_replace_entry. ff_h_replace_entry + S (s) = S ((S (i)) * d)) /\ exists ff_q_replace_entry. z = ff_q_replace_entry * S ((S (i)) * d) + (s))) /\ forall j a. (exists h. h + S j = k) -> ~(j = i) -> (((exists ff_h_replace_old. ff_h_replace_old + S (a) = S ((S (j)) * c)) /\ exists ff_q_replace_old. b = ff_q_replace_old * S ((S (j)) * c) + (a))) -> (((exists ff_h_replace_new. ff_h_replace_new + S (a) = S ((S (j)) * d)) /\ exists ff_q_replace_new. z = ff_q_replace_new * S ((S (j)) * d) + (a))))
  1. intro b
  2. intro c
  3. intro i
  4. intro s
  5. induction k
  6. intro hi
  7. exfalso
  8. cases hi
  9. have hsi : S i = 0
  10. specialize add_eq_zero_right x
  11. specialize add_eq_zero_right (S i)
  12. apply add_eq_zero_right
  13. exact hi_witness
  14. specialize succ_ne_zero i
  15. apply succ_ne_zero
  16. exact hsi
  17. intro hi
  18. have hisplit : i = k \/ exists h. h + S i = k
  19. specialize finite_lt_succ_eq_or_lt k
  20. specialize finite_lt_succ_eq_or_lt i
  21. apply finite_lt_succ_eq_or_lt
  22. exact hi
  23. cases hisplit
  24. specialize beta_prefix_extend k
  25. specialize beta_prefix_extend b
  26. specialize beta_prefix_extend c
  27. specialize beta_prefix_extend s
  28. cases beta_prefix_extend
  29. cases beta_prefix_extend_witness
  30. cases beta_prefix_extend_witness_witness
  31. exists x
  32. exists x1
  33. split
  34. rewrite hisplit_left
  35. rewrite hisplit_left
  36. exact beta_prefix_extend_witness_witness_left
  37. intro j
  38. intro a
  39. intro hj
  40. intro hji
  41. intro hold
  42. have hjsplit : j = k \/ exists h. h + S j = k
  43. specialize finite_lt_succ_eq_or_lt k
  44. specialize finite_lt_succ_eq_or_lt j
  45. apply finite_lt_succ_eq_or_lt
  46. exact hj
  47. cases hjsplit
  48. exfalso
  49. apply hji
  50. trans k
  51. exact hjsplit_left
  52. symm
  53. exact hisplit_left
  54. specialize beta_prefix_extend_witness_witness_right j
  55. specialize beta_prefix_extend_witness_witness_right a
  56. apply beta_prefix_extend_witness_witness_right
  57. exact hjsplit_right
  58. exact hold
  59. have hreplaced : exists z d. (((exists h. h + S s = S ((S i) * d)) /\ exists q. z = q * S ((S i) * d) + s) /\ forall j a. (exists h. h + S j = k) -> ~(j = i) -> ((exists h. h + S a = S ((S j) * c)) /\ exists q. b = q * S ((S j) * c) + a) -> ((exists h. h + S a = S ((S j) * d)) /\ exists q. z = q * S ((S j) * d) + a))
  60. apply IH
  61. exact hisplit_right
  62. cases hreplaced
  63. cases hreplaced_witness
  64. cases hreplaced_witness_witness
  65. specialize beta_at_exists b
  66. specialize beta_at_exists c
  67. specialize beta_at_exists k
  68. cases beta_at_exists
  69. specialize beta_prefix_extend k
  70. specialize beta_prefix_extend x
  71. specialize beta_prefix_extend x1
  72. specialize beta_prefix_extend x2
  73. cases beta_prefix_extend
  74. cases beta_prefix_extend_witness
  75. cases beta_prefix_extend_witness_witness
  76. exists x3
  77. exists x4
  78. split
  79. specialize beta_prefix_extend_witness_witness_right i
  80. specialize beta_prefix_extend_witness_witness_right s
  81. apply beta_prefix_extend_witness_witness_right
  82. exact hisplit_right
  83. exact hreplaced_witness_witness_left
  84. intro j
  85. intro a
  86. intro hj
  87. intro hji
  88. intro hold
  89. have hjsplit : j = k \/ exists h. h + S j = k
  90. specialize finite_lt_succ_eq_or_lt k
  91. specialize finite_lt_succ_eq_or_lt j
  92. apply finite_lt_succ_eq_or_lt
  93. exact hj
  94. cases hjsplit
  95. have hax : a = x2
  96. specialize beta_at_unique b
  97. specialize beta_at_unique c
  98. specialize beta_at_unique k
  99. specialize beta_at_unique a
  100. specialize beta_at_unique x2
  101. apply beta_at_unique
  102. rewrite hjsplit_left at hold
  103. rewrite hjsplit_left at hold
  104. exact hold
  105. exact beta_at_exists_witness
  106. rewrite hjsplit_left
  107. rewrite hjsplit_left
  108. rewrite hax
  109. rewrite hax
  110. exact beta_prefix_extend_witness_witness_left
  111. have hmiddle : ((exists h. h + S a = S ((S j) * x1)) /\ exists q. x = q * S ((S j) * x1) + a)
  112. specialize hreplaced_witness_witness_right j
  113. specialize hreplaced_witness_witness_right a
  114. apply hreplaced_witness_witness_right
  115. exact hjsplit_right
  116. exact hji
  117. exact hold
  118. specialize beta_prefix_extend_witness_witness_right j
  119. specialize beta_prefix_extend_witness_witness_right a
  120. apply beta_prefix_extend_witness_witness_right
  121. exact hjsplit_right
  122. exact hmiddle
beta_prefix_swap_last_from_entries · unchanged support, not a new admission
forall b c n i x y. (exists h. h + S i = n) -> (((exists ff_h_swap_old_i. ff_h_swap_old_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_swap_old_i. b = ff_q_swap_old_i * S ((S (i)) * c) + (x))) -> (((exists ff_h_swap_old_n. ff_h_swap_old_n + S (y) = S ((S (n)) * c)) /\ exists ff_q_swap_old_n. b = ff_q_swap_old_n * S ((S (n)) * c) + (y))) -> exists z d. ((((exists ff_h_swap_new_i. ff_h_swap_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_swap_new_i. z = ff_q_swap_new_i * S ((S (i)) * d) + (y))) /\ ((((exists ff_h_swap_new_n. ff_h_swap_new_n + S (x) = S ((S (n)) * d)) /\ exists ff_q_swap_new_n. z = ff_q_swap_new_n * S ((S (n)) * d) + (x))) /\ forall j a. (exists h. h + S j = S n) -> ~(j = i) -> ~(j = n) -> (((exists ff_h_swap_old_j. ff_h_swap_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_swap_old_j. b = ff_q_swap_old_j * S ((S (j)) * c) + (a))) -> (((exists ff_h_swap_new_j. ff_h_swap_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_swap_new_j. z = ff_q_swap_new_j * S ((S (j)) * d) + (a)))))
  1. intro b
  2. intro c
  3. intro n
  4. intro i
  5. intro x
  6. intro y
  7. intro hi
  8. intro hxi
  9. intro hyn
  10. have hisn : exists h. h + S i = S n
  11. specialize le_succ (S i)
  12. specialize le_succ n
  13. apply le_succ
  14. exact hi
  15. have hnsn : exists h. h + S n = S n
  16. specialize le_refl (S n)
  17. exact le_refl
  18. have hin : ~(i = n)
  19. intro hin_eq
  20. specialize lt_irrefl_expanded n
  21. apply lt_irrefl_expanded
  22. rewrite hin_eq at hi
  23. exact hi
  24. have hni : ~(n = i)
  25. intro hni_eq
  26. apply hin
  27. symm
  28. exact hni_eq
  29. have hfirst : exists z d. (((exists h. h + S y = S ((S i) * d)) /\ exists q. z = q * S ((S i) * d) + y) /\ forall j a. (exists h. h + S j = S n) -> ~(j = i) -> ((exists h. h + S a = S ((S j) * c)) /\ exists q. b = q * S ((S j) * c) + a) -> ((exists h. h + S a = S ((S j) * d)) /\ exists q. z = q * S ((S j) * d) + a))
  30. specialize beta_prefix_replace_exists b
  31. specialize beta_prefix_replace_exists c
  32. specialize beta_prefix_replace_exists i
  33. specialize beta_prefix_replace_exists y
  34. specialize beta_prefix_replace_exists (S n)
  35. apply beta_prefix_replace_exists
  36. exact hisn
  37. cases hfirst
  38. cases hfirst_witness
  39. cases hfirst_witness_witness
  40. have hfirst_n : ((exists h. h + S y = S ((S n) * x2)) /\ exists q. x1 = q * S ((S n) * x2) + y)
  41. specialize hfirst_witness_witness_right n
  42. specialize hfirst_witness_witness_right y
  43. apply hfirst_witness_witness_right
  44. exact hnsn
  45. exact hni
  46. exact hyn
  47. have hsecond : exists z d. (((exists h. h + S x = S ((S n) * d)) /\ exists q. z = q * S ((S n) * d) + x) /\ forall j a. (exists h. h + S j = S n) -> ~(j = n) -> ((exists h. h + S a = S ((S j) * x2)) /\ exists q. x1 = q * S ((S j) * x2) + a) -> ((exists h. h + S a = S ((S j) * d)) /\ exists q. z = q * S ((S j) * d) + a))
  48. specialize beta_prefix_replace_exists x1
  49. specialize beta_prefix_replace_exists x2
  50. specialize beta_prefix_replace_exists n
  51. specialize beta_prefix_replace_exists x
  52. specialize beta_prefix_replace_exists (S n)
  53. apply beta_prefix_replace_exists
  54. exact hnsn
  55. cases hsecond
  56. cases hsecond_witness
  57. cases hsecond_witness_witness
  58. exists x3
  59. exists x4
  60. split
  61. specialize hsecond_witness_witness_right i
  62. specialize hsecond_witness_witness_right y
  63. apply hsecond_witness_witness_right
  64. exact hisn
  65. exact hin
  66. exact hfirst_witness_witness_left
  67. split
  68. exact hsecond_witness_witness_left
  69. intro j
  70. intro a
  71. intro hj
  72. intro hji
  73. intro hjn
  74. intro hold
  75. have hmiddle : ((exists h. h + S a = S ((S j) * x2)) /\ exists q. x1 = q * S ((S j) * x2) + a)
  76. specialize hfirst_witness_witness_right j
  77. specialize hfirst_witness_witness_right a
  78. apply hfirst_witness_witness_right
  79. exact hj
  80. exact hji
  81. exact hold
  82. specialize hsecond_witness_witness_right j
  83. specialize hsecond_witness_witness_right a
  84. apply hsecond_witness_witness_right
  85. exact hj
  86. exact hjn
  87. exact hmiddle
beta_prefix_swap_last_reflect · unchanged support, not a new admission
forall b c z d n i x y. (((exists ff_h_reflect_new_i. ff_h_reflect_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_reflect_new_i. z = ff_q_reflect_new_i * S ((S (i)) * d) + (y))) -> (((exists ff_h_reflect_new_n. ff_h_reflect_new_n + S (x) = S ((S (n)) * d)) /\ exists ff_q_reflect_new_n. z = ff_q_reflect_new_n * S ((S (n)) * d) + (x))) -> (forall k v. (exists h. h + S k = S n) -> ~(k = i) -> ~(k = n) -> (((exists ff_h_reflect_old_k. ff_h_reflect_old_k + S (v) = S ((S (k)) * c)) /\ exists ff_q_reflect_old_k. b = ff_q_reflect_old_k * S ((S (k)) * c) + (v))) -> (((exists ff_h_reflect_new_k. ff_h_reflect_new_k + S (v) = S ((S (k)) * d)) /\ exists ff_q_reflect_new_k. z = ff_q_reflect_new_k * S ((S (k)) * d) + (v)))) -> forall j a. (exists h. h + S j = S n) -> (((exists ff_h_reflect_new_j. ff_h_reflect_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_reflect_new_j. z = ff_q_reflect_new_j * S ((S (j)) * d) + (a))) -> ((j = i /\ a = y) \/ ((j = n /\ a = x) \/ (~(j = i) /\ (~(j = n) /\ (((exists ff_h_reflect_old_j. ff_h_reflect_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_reflect_old_j. b = ff_q_reflect_old_j * S ((S (j)) * c) + (a)))))))
  1. intro b
  2. intro c
  3. intro z
  4. intro d
  5. intro n
  6. intro i
  7. intro x
  8. intro y
  9. intro hnew_i
  10. intro hnew_n
  11. intro hpreserve
  12. intro j
  13. intro a
  14. intro hj
  15. intro hnew
  16. specialize eq_decidable j
  17. specialize eq_decidable i
  18. cases eq_decidable
  19. left
  20. split
  21. exact eq_decidable_left
  22. specialize beta_at_unique z
  23. specialize beta_at_unique d
  24. specialize beta_at_unique i
  25. specialize beta_at_unique a
  26. specialize beta_at_unique y
  27. apply beta_at_unique
  28. rewrite eq_decidable_left at hnew
  29. rewrite eq_decidable_left at hnew
  30. exact hnew
  31. exact hnew_i
  32. specialize eq_decidable_before2 n
  33. cases eq_decidable_before2
  34. right
  35. left
  36. split
  37. exact eq_decidable_before2_left
  38. specialize beta_at_unique z
  39. specialize beta_at_unique d
  40. specialize beta_at_unique n
  41. specialize beta_at_unique a
  42. specialize beta_at_unique x
  43. apply beta_at_unique
  44. rewrite eq_decidable_before2_left at hnew
  45. rewrite eq_decidable_before2_left at hnew
  46. exact hnew
  47. exact hnew_n
  48. specialize beta_at_exists b
  49. specialize beta_at_exists c
  50. specialize beta_at_exists j
  51. cases beta_at_exists
  52. have htransport : ((exists h. h + S x1 = S ((S j) * d)) /\ exists q. z = q * S ((S j) * d) + x1)
  53. specialize hpreserve j
  54. specialize hpreserve x1
  55. apply hpreserve
  56. exact hj
  57. exact eq_decidable_right
  58. exact eq_decidable_before2_right
  59. exact beta_at_exists_witness
  60. have hav : a = x1
  61. specialize beta_at_unique z
  62. specialize beta_at_unique d
  63. specialize beta_at_unique j
  64. specialize beta_at_unique a
  65. specialize beta_at_unique x1
  66. apply beta_at_unique
  67. exact hnew
  68. exact htransport
  69. right
  70. right
  71. split
  72. exact eq_decidable_right
  73. split
  74. exact eq_decidable_before2_right
  75. rewrite hav
  76. rewrite hav
  77. exact beta_at_exists_witness
finite_swap_last_bounded · unchanged support, not a new admission
forall b c z d n sn i x y. sn = S n -> (exists h. h + S i = n) -> (forall fp_i_swap_bound_old. (exists fp_gap_swap_bound_old_index. fp_gap_swap_bound_old_index + S fp_i_swap_bound_old = sn) -> exists fp_value_swap_bound_old. ((((exists ff_h_swap_bound_old_entry. ff_h_swap_bound_old_entry + S (fp_value_swap_bound_old) = S ((S (fp_i_swap_bound_old)) * c)) /\ exists ff_q_swap_bound_old_entry. b = ff_q_swap_bound_old_entry * S ((S (fp_i_swap_bound_old)) * c) + (fp_value_swap_bound_old))) /\ (exists fp_gap_swap_bound_old_value. fp_gap_swap_bound_old_value + S fp_value_swap_bound_old = sn))) -> (((exists ff_h_swap_bound_old_i. ff_h_swap_bound_old_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_swap_bound_old_i. b = ff_q_swap_bound_old_i * S ((S (i)) * c) + (x))) -> (((exists ff_h_swap_bound_old_n. ff_h_swap_bound_old_n + S (y) = S ((S (n)) * c)) /\ exists ff_q_swap_bound_old_n. b = ff_q_swap_bound_old_n * S ((S (n)) * c) + (y))) -> (((exists ff_h_swap_bound_new_i. ff_h_swap_bound_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_swap_bound_new_i. z = ff_q_swap_bound_new_i * S ((S (i)) * d) + (y))) -> (((exists ff_h_swap_bound_new_n. ff_h_swap_bound_new_n + S (x) = S ((S (n)) * d)) /\ exists ff_q_swap_bound_new_n. z = ff_q_swap_bound_new_n * S ((S (n)) * d) + (x))) -> (forall j a. (exists h. h + S j = S n) -> ~(j = i) -> ~(j = n) -> (((exists ff_h_swap_bound_old_j. ff_h_swap_bound_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_swap_bound_old_j. b = ff_q_swap_bound_old_j * S ((S (j)) * c) + (a))) -> (((exists ff_h_swap_bound_new_j. ff_h_swap_bound_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_swap_bound_new_j. z = ff_q_swap_bound_new_j * S ((S (j)) * d) + (a)))) -> (forall fp_i_swap_bound_new. (exists fp_gap_swap_bound_new_index. fp_gap_swap_bound_new_index + S fp_i_swap_bound_new = sn) -> exists fp_value_swap_bound_new. ((((exists ff_h_swap_bound_new_entry. ff_h_swap_bound_new_entry + S (fp_value_swap_bound_new) = S ((S (fp_i_swap_bound_new)) * d)) /\ exists ff_q_swap_bound_new_entry. z = ff_q_swap_bound_new_entry * S ((S (fp_i_swap_bound_new)) * d) + (fp_value_swap_bound_new))) /\ (exists fp_gap_swap_bound_new_value. fp_gap_swap_bound_new_value + S fp_value_swap_bound_new = sn)))
  1. intro b
  2. intro c
  3. intro z
  4. intro d
  5. intro n
  6. intro sn
  7. intro i
  8. intro x
  9. intro y
  10. intro hsn
  11. intro hi
  12. intro hbounded
  13. intro hold_i
  14. intro hold_n
  15. intro hnew_i
  16. intro hnew_n
  17. intro hpreserve
  18. rewrite hsn at hbounded
  19. rewrite hsn at hbounded
  20. have hisn : exists h. h + S i = S n
  21. specialize le_succ (S i)
  22. specialize le_succ n
  23. apply le_succ
  24. exact hi
  25. have hnsn : exists h. h + S n = S n
  26. specialize le_refl (S n)
  27. exact le_refl
  28. have hentry_bound_i : forall b c l i x. (forall fp_i_entry_bound. (exists fp_gap_entry_bound_index. fp_gap_entry_bound_index + S fp_i_entry_bound = l) -> exists fp_value_entry_bound. ((((exists ff_h_entry_bound_entry. ff_h_entry_bound_entry + S (fp_value_entry_bound) = S ((S (fp_i_entry_bound)) * c)) /\ exists ff_q_entry_bound_entry. b = ff_q_entry_bound_entry * S ((S (fp_i_entry_bound)) * c) + (fp_value_entry_bound))) /\ (exists fp_gap_entry_bound_value. fp_gap_entry_bound_value + S fp_value_entry_bound = l))) -> (exists h. h + S i = l) -> (((exists ff_h_entry_bound_at. ff_h_entry_bound_at + S (x) = S ((S (i)) * c)) /\ exists ff_q_entry_bound_at. b = ff_q_entry_bound_at * S ((S (i)) * c) + (x))) -> exists h. h + S x = l
  29. exact finite_bounded_entry_lt
  30. have hentry_bound_n : forall b c l i x. (forall fp_i_entry_bound. (exists fp_gap_entry_bound_index. fp_gap_entry_bound_index + S fp_i_entry_bound = l) -> exists fp_value_entry_bound. ((((exists ff_h_entry_bound_entry. ff_h_entry_bound_entry + S (fp_value_entry_bound) = S ((S (fp_i_entry_bound)) * c)) /\ exists ff_q_entry_bound_entry. b = ff_q_entry_bound_entry * S ((S (fp_i_entry_bound)) * c) + (fp_value_entry_bound))) /\ (exists fp_gap_entry_bound_value. fp_gap_entry_bound_value + S fp_value_entry_bound = l))) -> (exists h. h + S i = l) -> (((exists ff_h_entry_bound_at. ff_h_entry_bound_at + S (x) = S ((S (i)) * c)) /\ exists ff_q_entry_bound_at. b = ff_q_entry_bound_at * S ((S (i)) * c) + (x))) -> exists h. h + S x = l
  31. exact finite_bounded_entry_lt
  32. have hxb : exists h. h + S x = S n
  33. specialize hentry_bound_i b
  34. specialize hentry_bound_i c
  35. specialize hentry_bound_i (S n)
  36. specialize hentry_bound_i i
  37. specialize hentry_bound_i x
  38. apply hentry_bound_i
  39. exact hbounded
  40. exact hisn
  41. exact hold_i
  42. have hyb : exists h. h + S y = S n
  43. specialize hentry_bound_n b
  44. specialize hentry_bound_n c
  45. specialize hentry_bound_n (S n)
  46. specialize hentry_bound_n n
  47. specialize hentry_bound_n y
  48. apply hentry_bound_n
  49. exact hbounded
  50. exact hnsn
  51. exact hold_n
  52. have heq_i : forall u v. u = v \/ ~(u = v)
  53. exact eq_decidable
  54. have heq_n : forall u v. u = v \/ ~(u = v)
  55. exact eq_decidable
  56. rewrite hsn
  57. rewrite hsn
  58. intro j
  59. intro hj
  60. specialize heq_i j
  61. specialize heq_i i
  62. cases heq_i
  63. exists y
  64. split
  65. rewrite heq_i_left
  66. rewrite heq_i_left
  67. exact hnew_i
  68. exact hyb
  69. specialize heq_n j
  70. specialize heq_n n
  71. cases heq_n
  72. exists x
  73. split
  74. rewrite heq_n_left
  75. rewrite heq_n_left
  76. exact hnew_n
  77. exact hxb
  78. specialize hbounded j
  79. have hold : exists a. (((exists h. h + S a = S ((S j) * c)) /\ exists q. b = q * S ((S j) * c) + a) /\ exists h. h + S a = S n)
  80. apply hbounded
  81. exact hj
  82. cases hold
  83. cases hold_witness
  84. exists x1
  85. split
  86. specialize hpreserve j
  87. specialize hpreserve x1
  88. apply hpreserve
  89. exact hj
  90. exact heq_i_right
  91. exact heq_n_right
  92. exact hold_witness_left
  93. exact hold_witness_right
finite_swap_last_injective · unchanged support, not a new admission
forall b c z d n sn i x y. sn = S n -> (exists h. h + S i = n) -> (forall fp_i_swap_inj_old fp_j_swap_inj_old fp_value_swap_inj_old. (exists fp_gap_swap_inj_old_i. fp_gap_swap_inj_old_i + S fp_i_swap_inj_old = sn) -> (exists fp_gap_swap_inj_old_j. fp_gap_swap_inj_old_j + S fp_j_swap_inj_old = sn) -> (((exists ff_h_swap_inj_old_left. ff_h_swap_inj_old_left + S (fp_value_swap_inj_old) = S ((S (fp_i_swap_inj_old)) * c)) /\ exists ff_q_swap_inj_old_left. b = ff_q_swap_inj_old_left * S ((S (fp_i_swap_inj_old)) * c) + (fp_value_swap_inj_old))) -> (((exists ff_h_swap_inj_old_right. ff_h_swap_inj_old_right + S (fp_value_swap_inj_old) = S ((S (fp_j_swap_inj_old)) * c)) /\ exists ff_q_swap_inj_old_right. b = ff_q_swap_inj_old_right * S ((S (fp_j_swap_inj_old)) * c) + (fp_value_swap_inj_old))) -> fp_i_swap_inj_old = fp_j_swap_inj_old) -> (((exists ff_h_swap_inj_old_i. ff_h_swap_inj_old_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_swap_inj_old_i. b = ff_q_swap_inj_old_i * S ((S (i)) * c) + (x))) -> (((exists ff_h_swap_inj_old_n. ff_h_swap_inj_old_n + S (y) = S ((S (n)) * c)) /\ exists ff_q_swap_inj_old_n. b = ff_q_swap_inj_old_n * S ((S (n)) * c) + (y))) -> (((exists ff_h_swap_inj_new_i. ff_h_swap_inj_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_swap_inj_new_i. z = ff_q_swap_inj_new_i * S ((S (i)) * d) + (y))) -> (((exists ff_h_swap_inj_new_n. ff_h_swap_inj_new_n + S (x) = S ((S (n)) * d)) /\ exists ff_q_swap_inj_new_n. z = ff_q_swap_inj_new_n * S ((S (n)) * d) + (x))) -> (forall j a. (exists h. h + S j = S n) -> ~(j = i) -> ~(j = n) -> (((exists ff_h_swap_inj_old_j. ff_h_swap_inj_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_swap_inj_old_j. b = ff_q_swap_inj_old_j * S ((S (j)) * c) + (a))) -> (((exists ff_h_swap_inj_new_j. ff_h_swap_inj_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_swap_inj_new_j. z = ff_q_swap_inj_new_j * S ((S (j)) * d) + (a)))) -> (forall fp_i_swap_inj_new fp_j_swap_inj_new fp_value_swap_inj_new. (exists fp_gap_swap_inj_new_i. fp_gap_swap_inj_new_i + S fp_i_swap_inj_new = sn) -> (exists fp_gap_swap_inj_new_j. fp_gap_swap_inj_new_j + S fp_j_swap_inj_new = sn) -> (((exists ff_h_swap_inj_new_left. ff_h_swap_inj_new_left + S (fp_value_swap_inj_new) = S ((S (fp_i_swap_inj_new)) * d)) /\ exists ff_q_swap_inj_new_left. z = ff_q_swap_inj_new_left * S ((S (fp_i_swap_inj_new)) * d) + (fp_value_swap_inj_new))) -> (((exists ff_h_swap_inj_new_right. ff_h_swap_inj_new_right + S (fp_value_swap_inj_new) = S ((S (fp_j_swap_inj_new)) * d)) /\ exists ff_q_swap_inj_new_right. z = ff_q_swap_inj_new_right * S ((S (fp_j_swap_inj_new)) * d) + (fp_value_swap_inj_new))) -> fp_i_swap_inj_new = fp_j_swap_inj_new)
  1. intro b
  2. intro c
  3. intro z
  4. intro d
  5. intro n
  6. intro sn
  7. intro i
  8. intro x
  9. intro y
  10. intro hsn
  11. intro hi
  12. intro hinjective
  13. intro hold_i
  14. intro hold_n
  15. intro hnew_i
  16. intro hnew_n
  17. intro hpreserve
  18. rewrite hsn at hinjective
  19. rewrite hsn at hinjective
  20. have hisn : exists h. h + S i = S n
  21. specialize le_succ (S i)
  22. specialize le_succ n
  23. apply le_succ
  24. exact hi
  25. have hnsn : exists h. h + S n = S n
  26. specialize le_refl (S n)
  27. exact le_refl
  28. have hreflect_j : forall b c z d n i x y. (((exists ff_h_reflect_new_i. ff_h_reflect_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_reflect_new_i. z = ff_q_reflect_new_i * S ((S (i)) * d) + (y))) -> (((exists ff_h_reflect_new_n. ff_h_reflect_new_n + S (x) = S ((S (n)) * d)) /\ exists ff_q_reflect_new_n. z = ff_q_reflect_new_n * S ((S (n)) * d) + (x))) -> (forall k v. (exists h. h + S k = S n) -> ~(k = i) -> ~(k = n) -> (((exists ff_h_reflect_old_k. ff_h_reflect_old_k + S (v) = S ((S (k)) * c)) /\ exists ff_q_reflect_old_k. b = ff_q_reflect_old_k * S ((S (k)) * c) + (v))) -> (((exists ff_h_reflect_new_k. ff_h_reflect_new_k + S (v) = S ((S (k)) * d)) /\ exists ff_q_reflect_new_k. z = ff_q_reflect_new_k * S ((S (k)) * d) + (v)))) -> forall j a. (exists h. h + S j = S n) -> (((exists ff_h_reflect_new_j. ff_h_reflect_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_reflect_new_j. z = ff_q_reflect_new_j * S ((S (j)) * d) + (a))) -> ((j = i /\ a = y) \/ ((j = n /\ a = x) \/ (~(j = i) /\ (~(j = n) /\ (((exists ff_h_reflect_old_j. ff_h_reflect_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_reflect_old_j. b = ff_q_reflect_old_j * S ((S (j)) * c) + (a)))))))
  29. exact beta_prefix_swap_last_reflect
  30. have hreflect_k : forall b c z d n i x y. (((exists ff_h_reflect_new_i. ff_h_reflect_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_reflect_new_i. z = ff_q_reflect_new_i * S ((S (i)) * d) + (y))) -> (((exists ff_h_reflect_new_n. ff_h_reflect_new_n + S (x) = S ((S (n)) * d)) /\ exists ff_q_reflect_new_n. z = ff_q_reflect_new_n * S ((S (n)) * d) + (x))) -> (forall k v. (exists h. h + S k = S n) -> ~(k = i) -> ~(k = n) -> (((exists ff_h_reflect_old_k. ff_h_reflect_old_k + S (v) = S ((S (k)) * c)) /\ exists ff_q_reflect_old_k. b = ff_q_reflect_old_k * S ((S (k)) * c) + (v))) -> (((exists ff_h_reflect_new_k. ff_h_reflect_new_k + S (v) = S ((S (k)) * d)) /\ exists ff_q_reflect_new_k. z = ff_q_reflect_new_k * S ((S (k)) * d) + (v)))) -> forall j a. (exists h. h + S j = S n) -> (((exists ff_h_reflect_new_j. ff_h_reflect_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_reflect_new_j. z = ff_q_reflect_new_j * S ((S (j)) * d) + (a))) -> ((j = i /\ a = y) \/ ((j = n /\ a = x) \/ (~(j = i) /\ (~(j = n) /\ (((exists ff_h_reflect_old_j. ff_h_reflect_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_reflect_old_j. b = ff_q_reflect_old_j * S ((S (j)) * c) + (a)))))))
  31. exact beta_prefix_swap_last_reflect
  32. rewrite hsn
  33. rewrite hsn
  34. intro j
  35. intro k
  36. intro a
  37. intro hj
  38. intro hk
  39. intro hnew_j
  40. intro hnew_k
  41. specialize hreflect_j b
  42. specialize hreflect_j c
  43. specialize hreflect_j z
  44. specialize hreflect_j d
  45. specialize hreflect_j n
  46. specialize hreflect_j i
  47. specialize hreflect_j x
  48. specialize hreflect_j y
  49. have hreflect_entries_j : forall j a. (exists h. h + S j = S n) -> (((exists ff_h_reflect_new_j. ff_h_reflect_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_reflect_new_j. z = ff_q_reflect_new_j * S ((S (j)) * d) + (a))) -> ((j = i /\ a = y) \/ ((j = n /\ a = x) \/ (~(j = i) /\ (~(j = n) /\ (((exists ff_h_reflect_old_j. ff_h_reflect_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_reflect_old_j. b = ff_q_reflect_old_j * S ((S (j)) * c) + (a)))))))
  50. apply hreflect_j
  51. exact hnew_i
  52. exact hnew_n
  53. exact hpreserve
  54. specialize hreflect_entries_j j
  55. specialize hreflect_entries_j a
  56. have hclass_j : ((j = i /\ a = y) \/ ((j = n /\ a = x) \/ (~(j = i) /\ (~(j = n) /\ ((exists h. h + S a = S ((S j) * c)) /\ exists q. b = q * S ((S j) * c) + a)))))
  57. apply hreflect_entries_j
  58. exact hj
  59. exact hnew_j
  60. specialize hreflect_k b
  61. specialize hreflect_k c
  62. specialize hreflect_k z
  63. specialize hreflect_k d
  64. specialize hreflect_k n
  65. specialize hreflect_k i
  66. specialize hreflect_k x
  67. specialize hreflect_k y
  68. have hreflect_entries_k : forall j a. (exists h. h + S j = S n) -> (((exists ff_h_reflect_new_j. ff_h_reflect_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_reflect_new_j. z = ff_q_reflect_new_j * S ((S (j)) * d) + (a))) -> ((j = i /\ a = y) \/ ((j = n /\ a = x) \/ (~(j = i) /\ (~(j = n) /\ (((exists ff_h_reflect_old_j. ff_h_reflect_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_reflect_old_j. b = ff_q_reflect_old_j * S ((S (j)) * c) + (a)))))))
  69. apply hreflect_k
  70. exact hnew_i
  71. exact hnew_n
  72. exact hpreserve
  73. specialize hreflect_entries_k k
  74. specialize hreflect_entries_k a
  75. have hclass_k : ((k = i /\ a = y) \/ ((k = n /\ a = x) \/ (~(k = i) /\ (~(k = n) /\ ((exists h. h + S a = S ((S k) * c)) /\ exists q. b = q * S ((S k) * c) + a)))))
  76. apply hreflect_entries_k
  77. exact hk
  78. exact hnew_k
  79. cases hclass_j
  80. cases hclass_j_left
  81. cases hclass_k
  82. cases hclass_k_left
  83. trans i
  84. exact hclass_j_left_left
  85. symm
  86. exact hclass_k_left_left
  87. cases hclass_k_right
  88. cases hclass_k_right_left
  89. have hxy : x = y
  90. trans a
  91. symm
  92. exact hclass_k_right_left_right
  93. exact hclass_j_left_right
  94. have hin : i = n
  95. specialize hinjective i
  96. specialize hinjective n
  97. specialize hinjective x
  98. apply hinjective
  99. exact hisn
  100. exact hnsn
  101. exact hold_i
  102. rewrite hxy
  103. rewrite hxy
  104. exact hold_n
  105. trans i
  106. exact hclass_j_left_left
  107. trans n
  108. exact hin
  109. symm
  110. exact hclass_k_right_left_left
  111. cases hclass_k_right_right
  112. cases hclass_k_right_right_right
  113. have hnk : n = k
  114. specialize hinjective n
  115. specialize hinjective k
  116. specialize hinjective y
  117. apply hinjective
  118. exact hnsn
  119. exact hk
  120. exact hold_n
  121. rewrite <- hclass_j_left_right
  122. rewrite <- hclass_j_left_right
  123. exact hclass_k_right_right_right_right
  124. exfalso
  125. apply hclass_k_right_right_right_left
  126. symm
  127. exact hnk
  128. cases hclass_j_right
  129. cases hclass_j_right_left
  130. cases hclass_k
  131. cases hclass_k_left
  132. have hxy2 : x = y
  133. trans a
  134. symm
  135. exact hclass_j_right_left_right
  136. exact hclass_k_left_right
  137. have hin2 : n = i
  138. specialize hinjective n
  139. specialize hinjective i
  140. specialize hinjective y
  141. apply hinjective
  142. exact hnsn
  143. exact hisn
  144. exact hold_n
  145. rewrite <- hxy2
  146. rewrite <- hxy2
  147. exact hold_i
  148. trans n
  149. exact hclass_j_right_left_left
  150. trans i
  151. exact hin2
  152. symm
  153. exact hclass_k_left_left
  154. cases hclass_k_right
  155. cases hclass_k_right_left
  156. trans n
  157. exact hclass_j_right_left_left
  158. symm
  159. exact hclass_k_right_left_left
  160. cases hclass_k_right_right
  161. cases hclass_k_right_right_right
  162. have hik : i = k
  163. specialize hinjective i
  164. specialize hinjective k
  165. specialize hinjective x
  166. apply hinjective
  167. exact hisn
  168. exact hk
  169. exact hold_i
  170. rewrite <- hclass_j_right_left_right
  171. rewrite <- hclass_j_right_left_right
  172. exact hclass_k_right_right_right_right
  173. exfalso
  174. apply hclass_k_right_right_left
  175. symm
  176. exact hik
  177. cases hclass_j_right_right
  178. cases hclass_j_right_right_right
  179. cases hclass_k
  180. cases hclass_k_left
  181. have hjn : j = n
  182. specialize hinjective j
  183. specialize hinjective n
  184. specialize hinjective y
  185. apply hinjective
  186. exact hj
  187. exact hnsn
  188. rewrite <- hclass_k_left_right
  189. rewrite <- hclass_k_left_right
  190. exact hclass_j_right_right_right_right
  191. exact hold_n
  192. exfalso
  193. apply hclass_j_right_right_right_left
  194. exact hjn
  195. cases hclass_k_right
  196. cases hclass_k_right_left
  197. have hji : j = i
  198. specialize hinjective j
  199. specialize hinjective i
  200. specialize hinjective x
  201. apply hinjective
  202. exact hj
  203. exact hisn
  204. rewrite <- hclass_k_right_left_right
  205. rewrite <- hclass_k_right_left_right
  206. exact hclass_j_right_right_right_right
  207. exact hold_i
  208. exfalso
  209. apply hclass_j_right_right_left
  210. exact hji
  211. cases hclass_k_right_right
  212. cases hclass_k_right_right_right
  213. specialize hinjective j
  214. specialize hinjective k
  215. specialize hinjective a
  216. apply hinjective
  217. exact hj
  218. exact hk
  219. exact hclass_j_right_right_right_right
  220. exact hclass_k_right_right_right_right
finite_swap_last_surjective_back · unchanged support, not a new admission
forall b c z d n sn i x y. sn = S n -> (exists h. h + S i = n) -> (((exists ff_h_swap_surj_old_i. ff_h_swap_surj_old_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_swap_surj_old_i. b = ff_q_swap_surj_old_i * S ((S (i)) * c) + (x))) -> (((exists ff_h_swap_surj_old_n. ff_h_swap_surj_old_n + S (y) = S ((S (n)) * c)) /\ exists ff_q_swap_surj_old_n. b = ff_q_swap_surj_old_n * S ((S (n)) * c) + (y))) -> (((exists ff_h_swap_surj_new_i. ff_h_swap_surj_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_swap_surj_new_i. z = ff_q_swap_surj_new_i * S ((S (i)) * d) + (y))) -> (((exists ff_h_swap_surj_new_n. ff_h_swap_surj_new_n + S (x) = S ((S (n)) * d)) /\ exists ff_q_swap_surj_new_n. z = ff_q_swap_surj_new_n * S ((S (n)) * d) + (x))) -> (forall j a. (exists h. h + S j = S n) -> ~(j = i) -> ~(j = n) -> (((exists ff_h_swap_surj_old_j. ff_h_swap_surj_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_swap_surj_old_j. b = ff_q_swap_surj_old_j * S ((S (j)) * c) + (a))) -> (((exists ff_h_swap_surj_new_j. ff_h_swap_surj_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_swap_surj_new_j. z = ff_q_swap_surj_new_j * S ((S (j)) * d) + (a)))) -> (forall fp_value_swap_surj_new. (exists fp_gap_swap_surj_new_value. fp_gap_swap_surj_new_value + S fp_value_swap_surj_new = sn) -> exists fp_i_swap_surj_new. ((exists fp_gap_swap_surj_new_index. fp_gap_swap_surj_new_index + S fp_i_swap_surj_new = sn) /\ (((exists ff_h_swap_surj_new_entry. ff_h_swap_surj_new_entry + S (fp_value_swap_surj_new) = S ((S (fp_i_swap_surj_new)) * d)) /\ exists ff_q_swap_surj_new_entry. z = ff_q_swap_surj_new_entry * S ((S (fp_i_swap_surj_new)) * d) + (fp_value_swap_surj_new))))) -> (forall fp_value_swap_surj_old. (exists fp_gap_swap_surj_old_value. fp_gap_swap_surj_old_value + S fp_value_swap_surj_old = sn) -> exists fp_i_swap_surj_old. ((exists fp_gap_swap_surj_old_index. fp_gap_swap_surj_old_index + S fp_i_swap_surj_old = sn) /\ (((exists ff_h_swap_surj_old_entry. ff_h_swap_surj_old_entry + S (fp_value_swap_surj_old) = S ((S (fp_i_swap_surj_old)) * c)) /\ exists ff_q_swap_surj_old_entry. b = ff_q_swap_surj_old_entry * S ((S (fp_i_swap_surj_old)) * c) + (fp_value_swap_surj_old)))))
  1. intro b
  2. intro c
  3. intro z
  4. intro d
  5. intro n
  6. intro sn
  7. intro i
  8. intro x
  9. intro y
  10. intro hsn
  11. intro hi
  12. intro hold_i
  13. intro hold_n
  14. intro hnew_i
  15. intro hnew_n
  16. intro hpreserve
  17. intro hsurjective
  18. rewrite hsn at hsurjective
  19. rewrite hsn at hsurjective
  20. have hisn : exists h. h + S i = S n
  21. specialize le_succ (S i)
  22. specialize le_succ n
  23. apply le_succ
  24. exact hi
  25. have hnsn : exists h. h + S n = S n
  26. specialize le_refl (S n)
  27. exact le_refl
  28. have hreflect : forall b c z d n i x y. (((exists ff_h_reflect_new_i. ff_h_reflect_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_reflect_new_i. z = ff_q_reflect_new_i * S ((S (i)) * d) + (y))) -> (((exists ff_h_reflect_new_n. ff_h_reflect_new_n + S (x) = S ((S (n)) * d)) /\ exists ff_q_reflect_new_n. z = ff_q_reflect_new_n * S ((S (n)) * d) + (x))) -> (forall k v. (exists h. h + S k = S n) -> ~(k = i) -> ~(k = n) -> (((exists ff_h_reflect_old_k. ff_h_reflect_old_k + S (v) = S ((S (k)) * c)) /\ exists ff_q_reflect_old_k. b = ff_q_reflect_old_k * S ((S (k)) * c) + (v))) -> (((exists ff_h_reflect_new_k. ff_h_reflect_new_k + S (v) = S ((S (k)) * d)) /\ exists ff_q_reflect_new_k. z = ff_q_reflect_new_k * S ((S (k)) * d) + (v)))) -> forall j a. (exists h. h + S j = S n) -> (((exists ff_h_reflect_new_j. ff_h_reflect_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_reflect_new_j. z = ff_q_reflect_new_j * S ((S (j)) * d) + (a))) -> ((j = i /\ a = y) \/ ((j = n /\ a = x) \/ (~(j = i) /\ (~(j = n) /\ (((exists ff_h_reflect_old_j. ff_h_reflect_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_reflect_old_j. b = ff_q_reflect_old_j * S ((S (j)) * c) + (a)))))))
  29. exact beta_prefix_swap_last_reflect
  30. specialize hreflect b
  31. specialize hreflect c
  32. specialize hreflect z
  33. specialize hreflect d
  34. specialize hreflect n
  35. specialize hreflect i
  36. specialize hreflect x
  37. specialize hreflect y
  38. have hreflect_entries : forall j a. (exists h. h + S j = S n) -> ((exists h. h + S a = S ((S j) * d)) /\ exists q. z = q * S ((S j) * d) + a) -> ((j = i /\ a = y) \/ ((j = n /\ a = x) \/ (~(j = i) /\ (~(j = n) /\ ((exists h. h + S a = S ((S j) * c)) /\ exists q. b = q * S ((S j) * c) + a)))))
  39. apply hreflect
  40. exact hnew_i
  41. exact hnew_n
  42. exact hpreserve
  43. rewrite hsn
  44. rewrite hsn
  45. intro a
  46. intro ha
  47. specialize hsurjective a
  48. have hoccurs : exists j. ((exists h. h + S j = S n) /\ ((exists h. h + S a = S ((S j) * d)) /\ exists q. z = q * S ((S j) * d) + a))
  49. apply hsurjective
  50. exact ha
  51. cases hoccurs
  52. cases hoccurs_witness
  53. specialize hreflect_entries x1
  54. specialize hreflect_entries a
  55. have hsource : ((x1 = i /\ a = y) \/ ((x1 = n /\ a = x) \/ (~(x1 = i) /\ (~(x1 = n) /\ ((exists h. h + S a = S ((S x1) * c)) /\ exists q. b = q * S ((S x1) * c) + a)))))
  56. apply hreflect_entries
  57. exact hoccurs_witness_left
  58. exact hoccurs_witness_right
  59. cases hsource
  60. cases hsource_left
  61. exists n
  62. split
  63. exact hnsn
  64. rewrite hsource_left_right
  65. rewrite hsource_left_right
  66. exact hold_n
  67. cases hsource_right
  68. cases hsource_right_left
  69. exists i
  70. split
  71. exact hisn
  72. rewrite hsource_right_left_right
  73. rewrite hsource_right_left_right
  74. exact hold_i
  75. cases hsource_right_right
  76. cases hsource_right_right_right
  77. exists x1
  78. split
  79. exact hoccurs_witness_left
  80. exact hsource_right_right_right_right
finite_contains_decidable · unchanged support, not a new admission
forall b c l y. ((exists fp_i_contains_l. ((exists fp_gap_contains_l_index. fp_gap_contains_l_index + S fp_i_contains_l = l) /\ (((exists ff_h_contains_l_entry. ff_h_contains_l_entry + S (y) = S ((S (fp_i_contains_l)) * c)) /\ exists ff_q_contains_l_entry. b = ff_q_contains_l_entry * S ((S (fp_i_contains_l)) * c) + (y))))) \/ ~(exists fp_i_contains_l. ((exists fp_gap_contains_l_index. fp_gap_contains_l_index + S fp_i_contains_l = l) /\ (((exists ff_h_contains_l_entry. ff_h_contains_l_entry + S (y) = S ((S (fp_i_contains_l)) * c)) /\ exists ff_q_contains_l_entry. b = ff_q_contains_l_entry * S ((S (fp_i_contains_l)) * c) + (y))))))
  1. intro b
  2. intro c
  3. induction l
  4. intro y
  5. right
  6. intro hcontains
  7. cases hcontains
  8. cases hcontains_witness
  9. cases hcontains_witness_left
  10. have hsi : S x = 0
  11. specialize add_eq_zero_right x1
  12. specialize add_eq_zero_right (S x)
  13. apply add_eq_zero_right
  14. exact hcontains_witness_left_witness
  15. specialize succ_ne_zero x
  16. apply succ_ne_zero
  17. exact hsi
  18. intro y
  19. have hpresent : (exists i. ((exists h. h + S i = l) /\ ((exists h. h + S y = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + y))) \/ ~(exists i. ((exists h. h + S i = l) /\ ((exists h. h + S y = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + y)))
  20. specialize IH y
  21. exact IH
  22. cases hpresent
  23. left
  24. cases hpresent_left
  25. cases hpresent_left_witness
  26. exists x
  27. split
  28. specialize le_succ (S x)
  29. specialize le_succ l
  30. apply le_succ
  31. exact hpresent_left_witness_left
  32. exact hpresent_left_witness_right
  33. specialize beta_at_exists b
  34. specialize beta_at_exists c
  35. specialize beta_at_exists l
  36. cases beta_at_exists
  37. specialize eq_decidable x
  38. specialize eq_decidable y
  39. cases eq_decidable
  40. left
  41. exists l
  42. split
  43. specialize le_refl (S l)
  44. exact le_refl
  45. rewrite eq_decidable_left at beta_at_exists_witness
  46. rewrite eq_decidable_left at beta_at_exists_witness
  47. exact beta_at_exists_witness
  48. right
  49. intro hfull
  50. cases hfull
  51. cases hfull_witness
  52. have hindex : x1 = l \/ exists h. h + S x1 = l
  53. specialize finite_lt_succ_eq_or_lt l
  54. specialize finite_lt_succ_eq_or_lt x1
  55. apply finite_lt_succ_eq_or_lt
  56. exact hfull_witness_left
  57. cases hindex
  58. have hentry : ((exists h. h + S y = S ((S l) * c)) /\ exists q. b = q * S ((S l) * c) + y)
  59. rewrite hindex_left at hfull_witness_right
  60. rewrite hindex_left at hfull_witness_right
  61. exact hfull_witness_right
  62. have hxy : x = y
  63. specialize beta_at_unique b
  64. specialize beta_at_unique c
  65. specialize beta_at_unique l
  66. specialize beta_at_unique x
  67. specialize beta_at_unique y
  68. apply beta_at_unique
  69. exact beta_at_exists_witness
  70. exact hentry
  71. apply eq_decidable_right
  72. exact hxy
  73. apply hpresent_right
  74. exists x1
  75. split
  76. exact hindex_right
  77. exact hfull_witness_right
finite_bounded_prefix_without_top · unchanged support, not a new admission
forall b c n sn. sn = S n -> (forall fp_i_bounded_succ. (exists fp_gap_bounded_succ_index. fp_gap_bounded_succ_index + S fp_i_bounded_succ = sn) -> exists fp_value_bounded_succ. ((((exists ff_h_bounded_succ_entry. ff_h_bounded_succ_entry + S (fp_value_bounded_succ) = S ((S (fp_i_bounded_succ)) * c)) /\ exists ff_q_bounded_succ_entry. b = ff_q_bounded_succ_entry * S ((S (fp_i_bounded_succ)) * c) + (fp_value_bounded_succ))) /\ (exists fp_gap_bounded_succ_value. fp_gap_bounded_succ_value + S fp_value_bounded_succ = sn))) -> (forall i. (exists h. h + S i = n) -> ~(((exists ff_h_top_i. ff_h_top_i + S (n) = S ((S (i)) * c)) /\ exists ff_q_top_i. b = ff_q_top_i * S ((S (i)) * c) + (n)))) -> (forall fp_i_bounded_prefix. (exists fp_gap_bounded_prefix_index. fp_gap_bounded_prefix_index + S fp_i_bounded_prefix = n) -> exists fp_value_bounded_prefix. ((((exists ff_h_bounded_prefix_entry. ff_h_bounded_prefix_entry + S (fp_value_bounded_prefix) = S ((S (fp_i_bounded_prefix)) * c)) /\ exists ff_q_bounded_prefix_entry. b = ff_q_bounded_prefix_entry * S ((S (fp_i_bounded_prefix)) * c) + (fp_value_bounded_prefix))) /\ (exists fp_gap_bounded_prefix_value. fp_gap_bounded_prefix_value + S fp_value_bounded_prefix = n)))
  1. intro b
  2. intro c
  3. intro n
  4. intro sn
  5. intro hsn
  6. intro hbounded
  7. intro hnotop
  8. rewrite hsn at hbounded
  9. rewrite hsn at hbounded
  10. intro i
  11. intro hi
  12. specialize hbounded i
  13. have hfull : exists x. (((exists h. h + S x = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + x) /\ exists h. h + S x = S n)
  14. apply hbounded
  15. specialize le_succ (S i)
  16. specialize le_succ n
  17. apply le_succ
  18. exact hi
  19. cases hfull
  20. cases hfull_witness
  21. have hsplit : x = n \/ exists h. h + S x = n
  22. specialize finite_lt_succ_eq_or_lt n
  23. specialize finite_lt_succ_eq_or_lt x
  24. apply finite_lt_succ_eq_or_lt
  25. exact hfull_witness_right
  26. cases hsplit
  27. exfalso
  28. specialize hnotop i
  29. apply hnotop
  30. exact hi
  31. rewrite <- hsplit_left
  32. rewrite <- hsplit_left
  33. exact hfull_witness_left
  34. exists x
  35. split
  36. exact hfull_witness_left
  37. exact hsplit_right
finite_bounded_last_succ · unchanged support, not a new admission
forall b c n sn. sn = S n -> (forall fp_i_bounded_succ. (exists fp_gap_bounded_succ_index. fp_gap_bounded_succ_index + S fp_i_bounded_succ = sn) -> exists fp_value_bounded_succ. ((((exists ff_h_bounded_succ_entry. ff_h_bounded_succ_entry + S (fp_value_bounded_succ) = S ((S (fp_i_bounded_succ)) * c)) /\ exists ff_q_bounded_succ_entry. b = ff_q_bounded_succ_entry * S ((S (fp_i_bounded_succ)) * c) + (fp_value_bounded_succ))) /\ (exists fp_gap_bounded_succ_value. fp_gap_bounded_succ_value + S fp_value_bounded_succ = sn))) -> exists x. ((((exists ff_h_last_x. ff_h_last_x + S (x) = S ((S (n)) * c)) /\ exists ff_q_last_x. b = ff_q_last_x * S ((S (n)) * c) + (x))) /\ exists h. h + S x = S n)
  1. intro b
  2. intro c
  3. intro n
  4. intro sn
  5. intro hsn
  6. intro hbounded
  7. rewrite hsn at hbounded
  8. rewrite hsn at hbounded
  9. specialize hbounded n
  10. apply hbounded
  11. specialize le_refl (S n)
  12. exact le_refl
finite_surjective_succ_intro · unchanged support, not a new admission
forall b c n sn. sn = S n -> (forall fp_value_surj_n. (exists fp_gap_surj_n_value. fp_gap_surj_n_value + S fp_value_surj_n = n) -> exists fp_i_surj_n. ((exists fp_gap_surj_n_index. fp_gap_surj_n_index + S fp_i_surj_n = n) /\ (((exists ff_h_surj_n_entry. ff_h_surj_n_entry + S (fp_value_surj_n) = S ((S (fp_i_surj_n)) * c)) /\ exists ff_q_surj_n_entry. b = ff_q_surj_n_entry * S ((S (fp_i_surj_n)) * c) + (fp_value_surj_n))))) -> (((exists ff_h_last_n. ff_h_last_n + S (n) = S ((S (n)) * c)) /\ exists ff_q_last_n. b = ff_q_last_n * S ((S (n)) * c) + (n))) -> (forall fp_value_surj_succ. (exists fp_gap_surj_succ_value. fp_gap_surj_succ_value + S fp_value_surj_succ = sn) -> exists fp_i_surj_succ. ((exists fp_gap_surj_succ_index. fp_gap_surj_succ_index + S fp_i_surj_succ = sn) /\ (((exists ff_h_surj_succ_entry. ff_h_surj_succ_entry + S (fp_value_surj_succ) = S ((S (fp_i_surj_succ)) * c)) /\ exists ff_q_surj_succ_entry. b = ff_q_surj_succ_entry * S ((S (fp_i_surj_succ)) * c) + (fp_value_surj_succ)))))
  1. intro b
  2. intro c
  3. intro n
  4. intro sn
  5. intro hsn
  6. intro hsurj
  7. intro hlast
  8. rewrite hsn
  9. rewrite hsn
  10. intro y
  11. intro hy
  12. have hsplit : y = n \/ exists h. h + S y = n
  13. specialize finite_lt_succ_eq_or_lt n
  14. specialize finite_lt_succ_eq_or_lt y
  15. apply finite_lt_succ_eq_or_lt
  16. exact hy
  17. cases hsplit
  18. exists n
  19. split
  20. specialize le_refl (S n)
  21. exact le_refl
  22. rewrite hsplit_left
  23. rewrite hsplit_left
  24. exact hlast
  25. specialize hsurj y
  26. have hpre : exists i. ((exists h. h + S i = n) /\ ((exists h. h + S y = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + y))
  27. apply hsurj
  28. exact hsplit_right
  29. cases hpre
  30. cases hpre_witness
  31. exists x
  32. split
  33. specialize le_succ (S x)
  34. specialize le_succ n
  35. apply le_succ
  36. exact hpre_witness_left
  37. exact hpre_witness_right
finite_last_is_top_from_prefix_surjective · unchanged support, not a new admission
forall b c n sn. sn = S n -> (forall fp_i_bounded_succ. (exists fp_gap_bounded_succ_index. fp_gap_bounded_succ_index + S fp_i_bounded_succ = sn) -> exists fp_value_bounded_succ. ((((exists ff_h_bounded_succ_entry. ff_h_bounded_succ_entry + S (fp_value_bounded_succ) = S ((S (fp_i_bounded_succ)) * c)) /\ exists ff_q_bounded_succ_entry. b = ff_q_bounded_succ_entry * S ((S (fp_i_bounded_succ)) * c) + (fp_value_bounded_succ))) /\ (exists fp_gap_bounded_succ_value. fp_gap_bounded_succ_value + S fp_value_bounded_succ = sn))) -> (forall fp_i_inj_succ fp_j_inj_succ fp_value_inj_succ. (exists fp_gap_inj_succ_i. fp_gap_inj_succ_i + S fp_i_inj_succ = sn) -> (exists fp_gap_inj_succ_j. fp_gap_inj_succ_j + S fp_j_inj_succ = sn) -> (((exists ff_h_inj_succ_left. ff_h_inj_succ_left + S (fp_value_inj_succ) = S ((S (fp_i_inj_succ)) * c)) /\ exists ff_q_inj_succ_left. b = ff_q_inj_succ_left * S ((S (fp_i_inj_succ)) * c) + (fp_value_inj_succ))) -> (((exists ff_h_inj_succ_right. ff_h_inj_succ_right + S (fp_value_inj_succ) = S ((S (fp_j_inj_succ)) * c)) /\ exists ff_q_inj_succ_right. b = ff_q_inj_succ_right * S ((S (fp_j_inj_succ)) * c) + (fp_value_inj_succ))) -> fp_i_inj_succ = fp_j_inj_succ) -> (forall fp_value_surj_n. (exists fp_gap_surj_n_value. fp_gap_surj_n_value + S fp_value_surj_n = n) -> exists fp_i_surj_n. ((exists fp_gap_surj_n_index. fp_gap_surj_n_index + S fp_i_surj_n = n) /\ (((exists ff_h_surj_n_entry. ff_h_surj_n_entry + S (fp_value_surj_n) = S ((S (fp_i_surj_n)) * c)) /\ exists ff_q_surj_n_entry. b = ff_q_surj_n_entry * S ((S (fp_i_surj_n)) * c) + (fp_value_surj_n))))) -> (((exists ff_h_last_n. ff_h_last_n + S (n) = S ((S (n)) * c)) /\ exists ff_q_last_n. b = ff_q_last_n * S ((S (n)) * c) + (n)))
  1. intro b
  2. intro c
  3. intro n
  4. intro sn
  5. intro hsn
  6. intro hbounded
  7. intro hinj
  8. intro hsurj
  9. rewrite hsn at hinj
  10. rewrite hsn at hinj
  11. have hlast : exists x. (((exists h. h + S x = S ((S n) * c)) /\ exists q. b = q * S ((S n) * c) + x) /\ exists h. h + S x = S n)
  12. specialize finite_bounded_last_succ b
  13. specialize finite_bounded_last_succ c
  14. specialize finite_bounded_last_succ n
  15. specialize finite_bounded_last_succ sn
  16. apply finite_bounded_last_succ
  17. exact hsn
  18. exact hbounded
  19. cases hlast
  20. cases hlast_witness
  21. have hsplit : x = n \/ exists h. h + S x = n
  22. specialize finite_lt_succ_eq_or_lt n
  23. specialize finite_lt_succ_eq_or_lt x
  24. apply finite_lt_succ_eq_or_lt
  25. exact hlast_witness_right
  26. cases hsplit
  27. rewrite hsplit_left at hlast_witness_left
  28. rewrite hsplit_left at hlast_witness_left
  29. exact hlast_witness_left
  30. specialize hsurj x
  31. have hpre : exists i. ((exists h. h + S i = n) /\ ((exists h. h + S x = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + x))
  32. apply hsurj
  33. exact hsplit_right
  34. cases hpre
  35. cases hpre_witness
  36. have hni : n = x1
  37. specialize hinj n
  38. specialize hinj x1
  39. specialize hinj x
  40. apply hinj
  41. specialize le_refl (S n)
  42. exact le_refl
  43. specialize le_succ (S x1)
  44. specialize le_succ n
  45. apply le_succ
  46. exact hpre_witness_left
  47. exact hlast_witness_left
  48. exact hpre_witness_right
  49. exfalso
  50. specialize lt_irrefl_expanded n
  51. apply lt_irrefl_expanded
  52. rewrite hni
  53. exact hpre_witness_left
finite_surjective_succ_from_prefix · unchanged support, not a new admission
forall b c n sn. sn = S n -> (forall fp_i_bounded_succ. (exists fp_gap_bounded_succ_index. fp_gap_bounded_succ_index + S fp_i_bounded_succ = sn) -> exists fp_value_bounded_succ. ((((exists ff_h_bounded_succ_entry. ff_h_bounded_succ_entry + S (fp_value_bounded_succ) = S ((S (fp_i_bounded_succ)) * c)) /\ exists ff_q_bounded_succ_entry. b = ff_q_bounded_succ_entry * S ((S (fp_i_bounded_succ)) * c) + (fp_value_bounded_succ))) /\ (exists fp_gap_bounded_succ_value. fp_gap_bounded_succ_value + S fp_value_bounded_succ = sn))) -> (forall fp_i_inj_succ fp_j_inj_succ fp_value_inj_succ. (exists fp_gap_inj_succ_i. fp_gap_inj_succ_i + S fp_i_inj_succ = sn) -> (exists fp_gap_inj_succ_j. fp_gap_inj_succ_j + S fp_j_inj_succ = sn) -> (((exists ff_h_inj_succ_left. ff_h_inj_succ_left + S (fp_value_inj_succ) = S ((S (fp_i_inj_succ)) * c)) /\ exists ff_q_inj_succ_left. b = ff_q_inj_succ_left * S ((S (fp_i_inj_succ)) * c) + (fp_value_inj_succ))) -> (((exists ff_h_inj_succ_right. ff_h_inj_succ_right + S (fp_value_inj_succ) = S ((S (fp_j_inj_succ)) * c)) /\ exists ff_q_inj_succ_right. b = ff_q_inj_succ_right * S ((S (fp_j_inj_succ)) * c) + (fp_value_inj_succ))) -> fp_i_inj_succ = fp_j_inj_succ) -> (forall fp_value_surj_n. (exists fp_gap_surj_n_value. fp_gap_surj_n_value + S fp_value_surj_n = n) -> exists fp_i_surj_n. ((exists fp_gap_surj_n_index. fp_gap_surj_n_index + S fp_i_surj_n = n) /\ (((exists ff_h_surj_n_entry. ff_h_surj_n_entry + S (fp_value_surj_n) = S ((S (fp_i_surj_n)) * c)) /\ exists ff_q_surj_n_entry. b = ff_q_surj_n_entry * S ((S (fp_i_surj_n)) * c) + (fp_value_surj_n))))) -> (forall fp_value_surj_succ. (exists fp_gap_surj_succ_value. fp_gap_surj_succ_value + S fp_value_surj_succ = sn) -> exists fp_i_surj_succ. ((exists fp_gap_surj_succ_index. fp_gap_surj_succ_index + S fp_i_surj_succ = sn) /\ (((exists ff_h_surj_succ_entry. ff_h_surj_succ_entry + S (fp_value_surj_succ) = S ((S (fp_i_surj_succ)) * c)) /\ exists ff_q_surj_succ_entry. b = ff_q_surj_succ_entry * S ((S (fp_i_surj_succ)) * c) + (fp_value_surj_succ)))))
  1. intro b
  2. intro c
  3. intro n
  4. intro sn
  5. intro hsn
  6. intro hbounded
  7. intro hinj
  8. intro hsurj
  9. have hlast : ((exists ff_h_last_n. ff_h_last_n + S (n) = S ((S (n)) * c)) /\ exists ff_q_last_n. b = ff_q_last_n * S ((S (n)) * c) + (n))
  10. specialize finite_last_is_top_from_prefix_surjective b
  11. specialize finite_last_is_top_from_prefix_surjective c
  12. specialize finite_last_is_top_from_prefix_surjective n
  13. specialize finite_last_is_top_from_prefix_surjective sn
  14. apply finite_last_is_top_from_prefix_surjective
  15. exact hsn
  16. exact hbounded
  17. exact hinj
  18. exact hsurj
  19. specialize finite_surjective_succ_intro b
  20. specialize finite_surjective_succ_intro c
  21. specialize finite_surjective_succ_intro n
  22. specialize finite_surjective_succ_intro sn
  23. apply finite_surjective_succ_intro
  24. exact hsn
  25. exact hsurj
  26. exact hlast
finite_no_top_successor_gate · unchanged support, not a new admission
forall b c n sn. sn = S n -> (forall fp_i_bounded_succ. (exists fp_gap_bounded_succ_index. fp_gap_bounded_succ_index + S fp_i_bounded_succ = sn) -> exists fp_value_bounded_succ. ((((exists ff_h_bounded_succ_entry. ff_h_bounded_succ_entry + S (fp_value_bounded_succ) = S ((S (fp_i_bounded_succ)) * c)) /\ exists ff_q_bounded_succ_entry. b = ff_q_bounded_succ_entry * S ((S (fp_i_bounded_succ)) * c) + (fp_value_bounded_succ))) /\ (exists fp_gap_bounded_succ_value. fp_gap_bounded_succ_value + S fp_value_bounded_succ = sn))) -> (forall fp_i_inj_succ fp_j_inj_succ fp_value_inj_succ. (exists fp_gap_inj_succ_i. fp_gap_inj_succ_i + S fp_i_inj_succ = sn) -> (exists fp_gap_inj_succ_j. fp_gap_inj_succ_j + S fp_j_inj_succ = sn) -> (((exists ff_h_inj_succ_left. ff_h_inj_succ_left + S (fp_value_inj_succ) = S ((S (fp_i_inj_succ)) * c)) /\ exists ff_q_inj_succ_left. b = ff_q_inj_succ_left * S ((S (fp_i_inj_succ)) * c) + (fp_value_inj_succ))) -> (((exists ff_h_inj_succ_right. ff_h_inj_succ_right + S (fp_value_inj_succ) = S ((S (fp_j_inj_succ)) * c)) /\ exists ff_q_inj_succ_right. b = ff_q_inj_succ_right * S ((S (fp_j_inj_succ)) * c) + (fp_value_inj_succ))) -> fp_i_inj_succ = fp_j_inj_succ) -> ~(exists fp_i_contains_top. ((exists fp_gap_contains_top_index. fp_gap_contains_top_index + S fp_i_contains_top = n) /\ (((exists ff_h_contains_top_entry. ff_h_contains_top_entry + S (n) = S ((S (fp_i_contains_top)) * c)) /\ exists ff_q_contains_top_entry. b = ff_q_contains_top_entry * S ((S (fp_i_contains_top)) * c) + (n))))) -> ((forall fp_i_bounded_prefix. (exists fp_gap_bounded_prefix_index. fp_gap_bounded_prefix_index + S fp_i_bounded_prefix = n) -> exists fp_value_bounded_prefix. ((((exists ff_h_bounded_prefix_entry. ff_h_bounded_prefix_entry + S (fp_value_bounded_prefix) = S ((S (fp_i_bounded_prefix)) * c)) /\ exists ff_q_bounded_prefix_entry. b = ff_q_bounded_prefix_entry * S ((S (fp_i_bounded_prefix)) * c) + (fp_value_bounded_prefix))) /\ (exists fp_gap_bounded_prefix_value. fp_gap_bounded_prefix_value + S fp_value_bounded_prefix = n))) -> (forall fp_i_inj_prefix fp_j_inj_prefix fp_value_inj_prefix. (exists fp_gap_inj_prefix_i. fp_gap_inj_prefix_i + S fp_i_inj_prefix = n) -> (exists fp_gap_inj_prefix_j. fp_gap_inj_prefix_j + S fp_j_inj_prefix = n) -> (((exists ff_h_inj_prefix_left. ff_h_inj_prefix_left + S (fp_value_inj_prefix) = S ((S (fp_i_inj_prefix)) * c)) /\ exists ff_q_inj_prefix_left. b = ff_q_inj_prefix_left * S ((S (fp_i_inj_prefix)) * c) + (fp_value_inj_prefix))) -> (((exists ff_h_inj_prefix_right. ff_h_inj_prefix_right + S (fp_value_inj_prefix) = S ((S (fp_j_inj_prefix)) * c)) /\ exists ff_q_inj_prefix_right. b = ff_q_inj_prefix_right * S ((S (fp_j_inj_prefix)) * c) + (fp_value_inj_prefix))) -> fp_i_inj_prefix = fp_j_inj_prefix) -> (forall fp_value_surj_n. (exists fp_gap_surj_n_value. fp_gap_surj_n_value + S fp_value_surj_n = n) -> exists fp_i_surj_n. ((exists fp_gap_surj_n_index. fp_gap_surj_n_index + S fp_i_surj_n = n) /\ (((exists ff_h_surj_n_entry. ff_h_surj_n_entry + S (fp_value_surj_n) = S ((S (fp_i_surj_n)) * c)) /\ exists ff_q_surj_n_entry. b = ff_q_surj_n_entry * S ((S (fp_i_surj_n)) * c) + (fp_value_surj_n)))))) -> (forall fp_value_surj_succ. (exists fp_gap_surj_succ_value. fp_gap_surj_succ_value + S fp_value_surj_succ = sn) -> exists fp_i_surj_succ. ((exists fp_gap_surj_succ_index. fp_gap_surj_succ_index + S fp_i_surj_succ = sn) /\ (((exists ff_h_surj_succ_entry. ff_h_surj_succ_entry + S (fp_value_surj_succ) = S ((S (fp_i_surj_succ)) * c)) /\ exists ff_q_surj_succ_entry. b = ff_q_surj_succ_entry * S ((S (fp_i_surj_succ)) * c) + (fp_value_surj_succ)))))
  1. intro b
  2. intro c
  3. intro n
  4. intro sn
  5. intro hsn
  6. intro hbounded
  7. intro hinj
  8. intro hmissing
  9. intro hinduction
  10. have hnotop : forall i. (exists h. h + S i = n) -> ~((exists h. h + S n = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + n)
  11. intro i
  12. intro hi
  13. intro hentry
  14. apply hmissing
  15. exists i
  16. split
  17. exact hi
  18. exact hentry
  19. have hprefix_bounded : forall fp_i_bounded_prefix. (exists fp_gap_bounded_prefix_index. fp_gap_bounded_prefix_index + S fp_i_bounded_prefix = n) -> exists fp_value_bounded_prefix. ((((exists ff_h_bounded_prefix_entry. ff_h_bounded_prefix_entry + S (fp_value_bounded_prefix) = S ((S (fp_i_bounded_prefix)) * c)) /\ exists ff_q_bounded_prefix_entry. b = ff_q_bounded_prefix_entry * S ((S (fp_i_bounded_prefix)) * c) + (fp_value_bounded_prefix))) /\ (exists fp_gap_bounded_prefix_value. fp_gap_bounded_prefix_value + S fp_value_bounded_prefix = n))
  20. specialize finite_bounded_prefix_without_top b
  21. specialize finite_bounded_prefix_without_top c
  22. specialize finite_bounded_prefix_without_top n
  23. specialize finite_bounded_prefix_without_top sn
  24. apply finite_bounded_prefix_without_top
  25. exact hsn
  26. exact hbounded
  27. exact hnotop
  28. have hprefix_injective : forall fp_i_inj_prefix fp_j_inj_prefix fp_value_inj_prefix. (exists fp_gap_inj_prefix_i. fp_gap_inj_prefix_i + S fp_i_inj_prefix = n) -> (exists fp_gap_inj_prefix_j. fp_gap_inj_prefix_j + S fp_j_inj_prefix = n) -> (((exists ff_h_inj_prefix_left. ff_h_inj_prefix_left + S (fp_value_inj_prefix) = S ((S (fp_i_inj_prefix)) * c)) /\ exists ff_q_inj_prefix_left. b = ff_q_inj_prefix_left * S ((S (fp_i_inj_prefix)) * c) + (fp_value_inj_prefix))) -> (((exists ff_h_inj_prefix_right. ff_h_inj_prefix_right + S (fp_value_inj_prefix) = S ((S (fp_j_inj_prefix)) * c)) /\ exists ff_q_inj_prefix_right. b = ff_q_inj_prefix_right * S ((S (fp_j_inj_prefix)) * c) + (fp_value_inj_prefix))) -> fp_i_inj_prefix = fp_j_inj_prefix
  29. specialize finite_injective_prefix_succ b
  30. specialize finite_injective_prefix_succ c
  31. specialize finite_injective_prefix_succ n
  32. specialize finite_injective_prefix_succ sn
  33. apply finite_injective_prefix_succ
  34. exact hsn
  35. exact hinj
  36. have hprefix_surjective : forall fp_value_surj_n. (exists fp_gap_surj_n_value. fp_gap_surj_n_value + S fp_value_surj_n = n) -> exists fp_i_surj_n. ((exists fp_gap_surj_n_index. fp_gap_surj_n_index + S fp_i_surj_n = n) /\ (((exists ff_h_surj_n_entry. ff_h_surj_n_entry + S (fp_value_surj_n) = S ((S (fp_i_surj_n)) * c)) /\ exists ff_q_surj_n_entry. b = ff_q_surj_n_entry * S ((S (fp_i_surj_n)) * c) + (fp_value_surj_n))))
  37. apply hinduction
  38. exact hprefix_bounded
  39. exact hprefix_injective
  40. specialize finite_surjective_succ_from_prefix b
  41. specialize finite_surjective_succ_from_prefix c
  42. specialize finite_surjective_succ_from_prefix n
  43. specialize finite_surjective_succ_from_prefix sn
  44. apply finite_surjective_succ_from_prefix
  45. exact hsn
  46. exact hbounded
  47. exact hinj
  48. exact hprefix_surjective
finite_bounded_injective_surjective · unchanged support, not a new admission
forall n b c. (forall fp_i_pigeon_bounded. (exists fp_gap_pigeon_bounded_index. fp_gap_pigeon_bounded_index + S fp_i_pigeon_bounded = n) -> exists fp_value_pigeon_bounded. ((((exists ff_h_pigeon_bounded_entry. ff_h_pigeon_bounded_entry + S (fp_value_pigeon_bounded) = S ((S (fp_i_pigeon_bounded)) * c)) /\ exists ff_q_pigeon_bounded_entry. b = ff_q_pigeon_bounded_entry * S ((S (fp_i_pigeon_bounded)) * c) + (fp_value_pigeon_bounded))) /\ (exists fp_gap_pigeon_bounded_value. fp_gap_pigeon_bounded_value + S fp_value_pigeon_bounded = n))) -> (forall fp_i_pigeon_injective fp_j_pigeon_injective fp_value_pigeon_injective. (exists fp_gap_pigeon_injective_i. fp_gap_pigeon_injective_i + S fp_i_pigeon_injective = n) -> (exists fp_gap_pigeon_injective_j. fp_gap_pigeon_injective_j + S fp_j_pigeon_injective = n) -> (((exists ff_h_pigeon_injective_left. ff_h_pigeon_injective_left + S (fp_value_pigeon_injective) = S ((S (fp_i_pigeon_injective)) * c)) /\ exists ff_q_pigeon_injective_left. b = ff_q_pigeon_injective_left * S ((S (fp_i_pigeon_injective)) * c) + (fp_value_pigeon_injective))) -> (((exists ff_h_pigeon_injective_right. ff_h_pigeon_injective_right + S (fp_value_pigeon_injective) = S ((S (fp_j_pigeon_injective)) * c)) /\ exists ff_q_pigeon_injective_right. b = ff_q_pigeon_injective_right * S ((S (fp_j_pigeon_injective)) * c) + (fp_value_pigeon_injective))) -> fp_i_pigeon_injective = fp_j_pigeon_injective) -> (forall fp_value_pigeon_surjective. (exists fp_gap_pigeon_surjective_value. fp_gap_pigeon_surjective_value + S fp_value_pigeon_surjective = n) -> exists fp_i_pigeon_surjective. ((exists fp_gap_pigeon_surjective_index. fp_gap_pigeon_surjective_index + S fp_i_pigeon_surjective = n) /\ (((exists ff_h_pigeon_surjective_entry. ff_h_pigeon_surjective_entry + S (fp_value_pigeon_surjective) = S ((S (fp_i_pigeon_surjective)) * c)) /\ exists ff_q_pigeon_surjective_entry. b = ff_q_pigeon_surjective_entry * S ((S (fp_i_pigeon_surjective)) * c) + (fp_value_pigeon_surjective)))))
  1. induction n
  2. intro b
  3. intro c
  4. intro hbounded
  5. intro hinjective
  6. specialize finite_surjective_zero b
  7. specialize finite_surjective_zero c
  8. specialize finite_surjective_zero 0
  9. apply finite_surjective_zero
  10. refl
  11. intro b
  12. intro c
  13. intro hbounded
  14. intro hinjective
  15. have hcontains : (exists fp_i_contains_top. ((exists fp_gap_contains_top_index. fp_gap_contains_top_index + S fp_i_contains_top = n) /\ (((exists ff_h_contains_top_entry. ff_h_contains_top_entry + S (n) = S ((S (fp_i_contains_top)) * c)) /\ exists ff_q_contains_top_entry. b = ff_q_contains_top_entry * S ((S (fp_i_contains_top)) * c) + (n))))) \/ ~(exists fp_i_contains_top. ((exists fp_gap_contains_top_index. fp_gap_contains_top_index + S fp_i_contains_top = n) /\ (((exists ff_h_contains_top_entry. ff_h_contains_top_entry + S (n) = S ((S (fp_i_contains_top)) * c)) /\ exists ff_q_contains_top_entry. b = ff_q_contains_top_entry * S ((S (fp_i_contains_top)) * c) + (n)))))
  16. specialize finite_contains_decidable b
  17. specialize finite_contains_decidable c
  18. specialize finite_contains_decidable n
  19. specialize finite_contains_decidable n
  20. exact finite_contains_decidable
  21. cases hcontains
  22. cases hcontains_left
  23. cases hcontains_left_witness
  24. have hlast : exists y. (((exists h. h + S y = S ((S n) * c)) /\ exists q. b = q * S ((S n) * c) + y) /\ exists h. h + S y = S n)
  25. specialize finite_bounded_last_succ b
  26. specialize finite_bounded_last_succ c
  27. specialize finite_bounded_last_succ n
  28. specialize finite_bounded_last_succ (S n)
  29. apply finite_bounded_last_succ
  30. refl
  31. exact hbounded
  32. cases hlast
  33. cases hlast_witness
  34. have hswap : exists z d. ((((exists ff_h_pigeon_swap_new_i. ff_h_pigeon_swap_new_i + S (x1) = S ((S (x)) * d)) /\ exists ff_q_pigeon_swap_new_i. z = ff_q_pigeon_swap_new_i * S ((S (x)) * d) + (x1))) /\ ((((exists ff_h_pigeon_swap_new_n. ff_h_pigeon_swap_new_n + S (n) = S ((S (n)) * d)) /\ exists ff_q_pigeon_swap_new_n. z = ff_q_pigeon_swap_new_n * S ((S (n)) * d) + (n))) /\ forall j a. (exists h. h + S j = S n) -> ~(j = x) -> ~(j = n) -> (((exists ff_h_pigeon_swap_old_other. ff_h_pigeon_swap_old_other + S (a) = S ((S (j)) * c)) /\ exists ff_q_pigeon_swap_old_other. b = ff_q_pigeon_swap_old_other * S ((S (j)) * c) + (a))) -> (((exists ff_h_pigeon_swap_new_other. ff_h_pigeon_swap_new_other + S (a) = S ((S (j)) * d)) /\ exists ff_q_pigeon_swap_new_other. z = ff_q_pigeon_swap_new_other * S ((S (j)) * d) + (a)))))
  35. specialize beta_prefix_swap_last_from_entries b
  36. specialize beta_prefix_swap_last_from_entries c
  37. specialize beta_prefix_swap_last_from_entries n
  38. specialize beta_prefix_swap_last_from_entries x
  39. specialize beta_prefix_swap_last_from_entries n
  40. specialize beta_prefix_swap_last_from_entries x1
  41. apply beta_prefix_swap_last_from_entries
  42. exact hcontains_left_witness_left
  43. exact hcontains_left_witness_right
  44. exact hlast_witness_left
  45. cases hswap
  46. cases hswap_witness
  47. cases hswap_witness_witness
  48. cases hswap_witness_witness_right
  49. have hswap_bounded : forall fp_i_pigeon_swapped_bounded. (exists fp_gap_pigeon_swapped_bounded_index. fp_gap_pigeon_swapped_bounded_index + S fp_i_pigeon_swapped_bounded = S n) -> exists fp_value_pigeon_swapped_bounded. ((((exists ff_h_pigeon_swapped_bounded_entry. ff_h_pigeon_swapped_bounded_entry + S (fp_value_pigeon_swapped_bounded) = S ((S (fp_i_pigeon_swapped_bounded)) * x3)) /\ exists ff_q_pigeon_swapped_bounded_entry. x2 = ff_q_pigeon_swapped_bounded_entry * S ((S (fp_i_pigeon_swapped_bounded)) * x3) + (fp_value_pigeon_swapped_bounded))) /\ (exists fp_gap_pigeon_swapped_bounded_value. fp_gap_pigeon_swapped_bounded_value + S fp_value_pigeon_swapped_bounded = S n))
  50. specialize finite_swap_last_bounded b
  51. specialize finite_swap_last_bounded c
  52. specialize finite_swap_last_bounded x2
  53. specialize finite_swap_last_bounded x3
  54. specialize finite_swap_last_bounded n
  55. specialize finite_swap_last_bounded (S n)
  56. specialize finite_swap_last_bounded x
  57. specialize finite_swap_last_bounded n
  58. specialize finite_swap_last_bounded x1
  59. apply finite_swap_last_bounded
  60. refl
  61. exact hcontains_left_witness_left
  62. exact hbounded
  63. exact hcontains_left_witness_right
  64. exact hlast_witness_left
  65. exact hswap_witness_witness_left
  66. exact hswap_witness_witness_right_left
  67. exact hswap_witness_witness_right_right
  68. have hswap_injective : forall fp_i_pigeon_swapped_injective fp_j_pigeon_swapped_injective fp_value_pigeon_swapped_injective. (exists fp_gap_pigeon_swapped_injective_i. fp_gap_pigeon_swapped_injective_i + S fp_i_pigeon_swapped_injective = S n) -> (exists fp_gap_pigeon_swapped_injective_j. fp_gap_pigeon_swapped_injective_j + S fp_j_pigeon_swapped_injective = S n) -> (((exists ff_h_pigeon_swapped_injective_left. ff_h_pigeon_swapped_injective_left + S (fp_value_pigeon_swapped_injective) = S ((S (fp_i_pigeon_swapped_injective)) * x3)) /\ exists ff_q_pigeon_swapped_injective_left. x2 = ff_q_pigeon_swapped_injective_left * S ((S (fp_i_pigeon_swapped_injective)) * x3) + (fp_value_pigeon_swapped_injective))) -> (((exists ff_h_pigeon_swapped_injective_right. ff_h_pigeon_swapped_injective_right + S (fp_value_pigeon_swapped_injective) = S ((S (fp_j_pigeon_swapped_injective)) * x3)) /\ exists ff_q_pigeon_swapped_injective_right. x2 = ff_q_pigeon_swapped_injective_right * S ((S (fp_j_pigeon_swapped_injective)) * x3) + (fp_value_pigeon_swapped_injective))) -> fp_i_pigeon_swapped_injective = fp_j_pigeon_swapped_injective
  69. specialize finite_swap_last_injective b
  70. specialize finite_swap_last_injective c
  71. specialize finite_swap_last_injective x2
  72. specialize finite_swap_last_injective x3
  73. specialize finite_swap_last_injective n
  74. specialize finite_swap_last_injective (S n)
  75. specialize finite_swap_last_injective x
  76. specialize finite_swap_last_injective n
  77. specialize finite_swap_last_injective x1
  78. apply finite_swap_last_injective
  79. refl
  80. exact hcontains_left_witness_left
  81. exact hinjective
  82. exact hcontains_left_witness_right
  83. exact hlast_witness_left
  84. exact hswap_witness_witness_left
  85. exact hswap_witness_witness_right_left
  86. exact hswap_witness_witness_right_right
  87. have hnotop : forall j. (exists h. h + S j = n) -> ~(((exists ff_h_pigeon_top_j. ff_h_pigeon_top_j + S (n) = S ((S (j)) * x3)) /\ exists ff_q_pigeon_top_j. x2 = ff_q_pigeon_top_j * S ((S (j)) * x3) + (n)))
  88. intro j
  89. intro hj
  90. intro htop
  91. have hjsn : exists h. h + S j = S n
  92. specialize le_succ (S j)
  93. specialize le_succ n
  94. apply le_succ
  95. exact hj
  96. have hnsn : exists h. h + S n = S n
  97. specialize le_refl (S n)
  98. exact le_refl
  99. have hjneq : j = n
  100. specialize hswap_injective j
  101. specialize hswap_injective n
  102. specialize hswap_injective n
  103. apply hswap_injective
  104. exact hjsn
  105. exact hnsn
  106. exact htop
  107. exact hswap_witness_witness_right_left
  108. specialize lt_irrefl_expanded n
  109. apply lt_irrefl_expanded
  110. rewrite hjneq at hj
  111. exact hj
  112. have hprefix_bounded : forall fp_i_pigeon_swapped_prefix_bounded. (exists fp_gap_pigeon_swapped_prefix_bounded_index. fp_gap_pigeon_swapped_prefix_bounded_index + S fp_i_pigeon_swapped_prefix_bounded = n) -> exists fp_value_pigeon_swapped_prefix_bounded. ((((exists ff_h_pigeon_swapped_prefix_bounded_entry. ff_h_pigeon_swapped_prefix_bounded_entry + S (fp_value_pigeon_swapped_prefix_bounded) = S ((S (fp_i_pigeon_swapped_prefix_bounded)) * x3)) /\ exists ff_q_pigeon_swapped_prefix_bounded_entry. x2 = ff_q_pigeon_swapped_prefix_bounded_entry * S ((S (fp_i_pigeon_swapped_prefix_bounded)) * x3) + (fp_value_pigeon_swapped_prefix_bounded))) /\ (exists fp_gap_pigeon_swapped_prefix_bounded_value. fp_gap_pigeon_swapped_prefix_bounded_value + S fp_value_pigeon_swapped_prefix_bounded = n))
  113. specialize finite_bounded_prefix_without_top x2
  114. specialize finite_bounded_prefix_without_top x3
  115. specialize finite_bounded_prefix_without_top n
  116. specialize finite_bounded_prefix_without_top (S n)
  117. apply finite_bounded_prefix_without_top
  118. refl
  119. exact hswap_bounded
  120. exact hnotop
  121. have hprefix_injective : forall fp_i_pigeon_swapped_prefix_injective fp_j_pigeon_swapped_prefix_injective fp_value_pigeon_swapped_prefix_injective. (exists fp_gap_pigeon_swapped_prefix_injective_i. fp_gap_pigeon_swapped_prefix_injective_i + S fp_i_pigeon_swapped_prefix_injective = n) -> (exists fp_gap_pigeon_swapped_prefix_injective_j. fp_gap_pigeon_swapped_prefix_injective_j + S fp_j_pigeon_swapped_prefix_injective = n) -> (((exists ff_h_pigeon_swapped_prefix_injective_left. ff_h_pigeon_swapped_prefix_injective_left + S (fp_value_pigeon_swapped_prefix_injective) = S ((S (fp_i_pigeon_swapped_prefix_injective)) * x3)) /\ exists ff_q_pigeon_swapped_prefix_injective_left. x2 = ff_q_pigeon_swapped_prefix_injective_left * S ((S (fp_i_pigeon_swapped_prefix_injective)) * x3) + (fp_value_pigeon_swapped_prefix_injective))) -> (((exists ff_h_pigeon_swapped_prefix_injective_right. ff_h_pigeon_swapped_prefix_injective_right + S (fp_value_pigeon_swapped_prefix_injective) = S ((S (fp_j_pigeon_swapped_prefix_injective)) * x3)) /\ exists ff_q_pigeon_swapped_prefix_injective_right. x2 = ff_q_pigeon_swapped_prefix_injective_right * S ((S (fp_j_pigeon_swapped_prefix_injective)) * x3) + (fp_value_pigeon_swapped_prefix_injective))) -> fp_i_pigeon_swapped_prefix_injective = fp_j_pigeon_swapped_prefix_injective
  122. specialize finite_injective_prefix_succ x2
  123. specialize finite_injective_prefix_succ x3
  124. specialize finite_injective_prefix_succ n
  125. specialize finite_injective_prefix_succ (S n)
  126. apply finite_injective_prefix_succ
  127. refl
  128. exact hswap_injective
  129. have hprefix_surjective : forall fp_value_pigeon_swapped_prefix_surjective. (exists fp_gap_pigeon_swapped_prefix_surjective_value. fp_gap_pigeon_swapped_prefix_surjective_value + S fp_value_pigeon_swapped_prefix_surjective = n) -> exists fp_i_pigeon_swapped_prefix_surjective. ((exists fp_gap_pigeon_swapped_prefix_surjective_index. fp_gap_pigeon_swapped_prefix_surjective_index + S fp_i_pigeon_swapped_prefix_surjective = n) /\ (((exists ff_h_pigeon_swapped_prefix_surjective_entry. ff_h_pigeon_swapped_prefix_surjective_entry + S (fp_value_pigeon_swapped_prefix_surjective) = S ((S (fp_i_pigeon_swapped_prefix_surjective)) * x3)) /\ exists ff_q_pigeon_swapped_prefix_surjective_entry. x2 = ff_q_pigeon_swapped_prefix_surjective_entry * S ((S (fp_i_pigeon_swapped_prefix_surjective)) * x3) + (fp_value_pigeon_swapped_prefix_surjective))))
  130. specialize IH x2
  131. specialize IH x3
  132. apply IH
  133. exact hprefix_bounded
  134. exact hprefix_injective
  135. have hswap_surjective : forall fp_value_pigeon_swapped_surjective. (exists fp_gap_pigeon_swapped_surjective_value. fp_gap_pigeon_swapped_surjective_value + S fp_value_pigeon_swapped_surjective = S n) -> exists fp_i_pigeon_swapped_surjective. ((exists fp_gap_pigeon_swapped_surjective_index. fp_gap_pigeon_swapped_surjective_index + S fp_i_pigeon_swapped_surjective = S n) /\ (((exists ff_h_pigeon_swapped_surjective_entry. ff_h_pigeon_swapped_surjective_entry + S (fp_value_pigeon_swapped_surjective) = S ((S (fp_i_pigeon_swapped_surjective)) * x3)) /\ exists ff_q_pigeon_swapped_surjective_entry. x2 = ff_q_pigeon_swapped_surjective_entry * S ((S (fp_i_pigeon_swapped_surjective)) * x3) + (fp_value_pigeon_swapped_surjective))))
  136. specialize finite_surjective_succ_from_prefix x2
  137. specialize finite_surjective_succ_from_prefix x3
  138. specialize finite_surjective_succ_from_prefix n
  139. specialize finite_surjective_succ_from_prefix (S n)
  140. apply finite_surjective_succ_from_prefix
  141. refl
  142. exact hswap_bounded
  143. exact hswap_injective
  144. exact hprefix_surjective
  145. specialize finite_swap_last_surjective_back b
  146. specialize finite_swap_last_surjective_back c
  147. specialize finite_swap_last_surjective_back x2
  148. specialize finite_swap_last_surjective_back x3
  149. specialize finite_swap_last_surjective_back n
  150. specialize finite_swap_last_surjective_back (S n)
  151. specialize finite_swap_last_surjective_back x
  152. specialize finite_swap_last_surjective_back n
  153. specialize finite_swap_last_surjective_back x1
  154. apply finite_swap_last_surjective_back
  155. refl
  156. exact hcontains_left_witness_left
  157. exact hcontains_left_witness_right
  158. exact hlast_witness_left
  159. exact hswap_witness_witness_left
  160. exact hswap_witness_witness_right_left
  161. exact hswap_witness_witness_right_right
  162. exact hswap_surjective
  163. specialize finite_no_top_successor_gate b
  164. specialize finite_no_top_successor_gate c
  165. specialize finite_no_top_successor_gate n
  166. specialize finite_no_top_successor_gate (S n)
  167. apply finite_no_top_successor_gate
  168. refl
  169. exact hbounded
  170. exact hinjective
  171. exact hcontains_right
  172. intro hprefix_bounded
  173. intro hprefix_injective
  174. specialize IH b
  175. specialize IH c
  176. apply IH
  177. exact hprefix_bounded
  178. exact hprefix_injective
beta_product_replace_balance · unchanged support, not a new admission
forall k b c z d i x y p q. (exists h. h + S i = k) -> (((exists ff_h_balance_old_i. ff_h_balance_old_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_balance_old_i. b = ff_q_balance_old_i * S ((S (i)) * c) + (x))) -> (((exists ff_h_balance_new_i. ff_h_balance_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_balance_new_i. z = ff_q_balance_new_i * S ((S (i)) * d) + (y))) -> (forall j a. (exists h. h + S j = k) -> ~(j = i) -> (((exists ff_h_balance_old_j. ff_h_balance_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_balance_old_j. b = ff_q_balance_old_j * S ((S (j)) * c) + (a))) -> (((exists ff_h_balance_new_j. ff_h_balance_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_balance_new_j. z = ff_q_balance_new_j * S ((S (j)) * d) + (a)))) -> (exists ff_u_balance_old ff_v_balance_old. ((((exists ff_h_balance_old_start. ff_h_balance_old_start + S (1) = S ((S (0)) * ff_v_balance_old)) /\ exists ff_q_balance_old_start. ff_u_balance_old = ff_q_balance_old_start * S ((S (0)) * ff_v_balance_old) + (1))) /\ ((((exists ff_h_balance_old_terminal. ff_h_balance_old_terminal + S (p) = S ((S (k)) * ff_v_balance_old)) /\ exists ff_q_balance_old_terminal. ff_u_balance_old = ff_q_balance_old_terminal * S ((S (k)) * ff_v_balance_old) + (p))) /\ forall ff_i_balance_old. (exists ff_lt_balance_old_bound. ff_lt_balance_old_bound + S ff_i_balance_old = k) -> exists ff_p_balance_old ff_r_balance_old ff_s_balance_old. ((((exists ff_h_balance_old_factor. ff_h_balance_old_factor + S (ff_p_balance_old) = S ((S (ff_i_balance_old)) * c)) /\ exists ff_q_balance_old_factor. b = ff_q_balance_old_factor * S ((S (ff_i_balance_old)) * c) + (ff_p_balance_old))) /\ ((((exists ff_h_balance_old_partial. ff_h_balance_old_partial + S (ff_r_balance_old) = S ((S (ff_i_balance_old)) * ff_v_balance_old)) /\ exists ff_q_balance_old_partial. ff_u_balance_old = ff_q_balance_old_partial * S ((S (ff_i_balance_old)) * ff_v_balance_old) + (ff_r_balance_old))) /\ ((((exists ff_h_balance_old_successor. ff_h_balance_old_successor + S (ff_s_balance_old) = S ((S (S ff_i_balance_old)) * ff_v_balance_old)) /\ exists ff_q_balance_old_successor. ff_u_balance_old = ff_q_balance_old_successor * S ((S (S ff_i_balance_old)) * ff_v_balance_old) + (ff_s_balance_old))) /\ ff_s_balance_old = ff_r_balance_old * ff_p_balance_old)))))) -> (exists ff_u_balance_new ff_v_balance_new. ((((exists ff_h_balance_new_start. ff_h_balance_new_start + S (1) = S ((S (0)) * ff_v_balance_new)) /\ exists ff_q_balance_new_start. ff_u_balance_new = ff_q_balance_new_start * S ((S (0)) * ff_v_balance_new) + (1))) /\ ((((exists ff_h_balance_new_terminal. ff_h_balance_new_terminal + S (q) = S ((S (k)) * ff_v_balance_new)) /\ exists ff_q_balance_new_terminal. ff_u_balance_new = ff_q_balance_new_terminal * S ((S (k)) * ff_v_balance_new) + (q))) /\ forall ff_i_balance_new. (exists ff_lt_balance_new_bound. ff_lt_balance_new_bound + S ff_i_balance_new = k) -> exists ff_p_balance_new ff_r_balance_new ff_s_balance_new. ((((exists ff_h_balance_new_factor. ff_h_balance_new_factor + S (ff_p_balance_new) = S ((S (ff_i_balance_new)) * d)) /\ exists ff_q_balance_new_factor. z = ff_q_balance_new_factor * S ((S (ff_i_balance_new)) * d) + (ff_p_balance_new))) /\ ((((exists ff_h_balance_new_partial. ff_h_balance_new_partial + S (ff_r_balance_new) = S ((S (ff_i_balance_new)) * ff_v_balance_new)) /\ exists ff_q_balance_new_partial. ff_u_balance_new = ff_q_balance_new_partial * S ((S (ff_i_balance_new)) * ff_v_balance_new) + (ff_r_balance_new))) /\ ((((exists ff_h_balance_new_successor. ff_h_balance_new_successor + S (ff_s_balance_new) = S ((S (S ff_i_balance_new)) * ff_v_balance_new)) /\ exists ff_q_balance_new_successor. ff_u_balance_new = ff_q_balance_new_successor * S ((S (S ff_i_balance_new)) * ff_v_balance_new) + (ff_s_balance_new))) /\ ff_s_balance_new = ff_r_balance_new * ff_p_balance_new)))))) -> q * x = p * y
  1. induction k
  2. intro b
  3. intro c
  4. intro z
  5. intro d
  6. intro i
  7. intro x
  8. intro y
  9. intro p
  10. intro q
  11. intro hi
  12. exfalso
  13. cases hi
  14. have hsi : S i = 0
  15. specialize add_eq_zero_right x1
  16. specialize add_eq_zero_right (S i)
  17. apply add_eq_zero_right
  18. exact hi_witness
  19. specialize succ_ne_zero i
  20. apply succ_ne_zero
  21. exact hsi
  22. intro b
  23. intro c
  24. intro z
  25. intro d
  26. intro i
  27. intro x
  28. intro y
  29. intro p
  30. intro q
  31. intro hi
  32. intro hold_i
  33. intro hnew_i
  34. intro hpreserve
  35. intro hproduct_old
  36. intro hproduct_new
  37. have hisplit : i = k \/ exists h. h + S i = k
  38. specialize finite_lt_succ_eq_or_lt k
  39. specialize finite_lt_succ_eq_or_lt i
  40. apply finite_lt_succ_eq_or_lt
  41. exact hi
  42. have hold_decomp : exists a r. (((exists ff_h_balance_old_last. ff_h_balance_old_last + S (a) = S ((S (k)) * c)) /\ exists ff_q_balance_old_last. b = ff_q_balance_old_last * S ((S (k)) * c) + (a))) /\ ((exists ff_u_balance_old_prefix ff_v_balance_old_prefix. ((((exists ff_h_balance_old_prefix_start. ff_h_balance_old_prefix_start + S (1) = S ((S (0)) * ff_v_balance_old_prefix)) /\ exists ff_q_balance_old_prefix_start. ff_u_balance_old_prefix = ff_q_balance_old_prefix_start * S ((S (0)) * ff_v_balance_old_prefix) + (1))) /\ ((((exists ff_h_balance_old_prefix_terminal. ff_h_balance_old_prefix_terminal + S (r) = S ((S (k)) * ff_v_balance_old_prefix)) /\ exists ff_q_balance_old_prefix_terminal. ff_u_balance_old_prefix = ff_q_balance_old_prefix_terminal * S ((S (k)) * ff_v_balance_old_prefix) + (r))) /\ forall ff_i_balance_old_prefix. (exists ff_lt_balance_old_prefix_bound. ff_lt_balance_old_prefix_bound + S ff_i_balance_old_prefix = k) -> exists ff_p_balance_old_prefix ff_r_balance_old_prefix ff_s_balance_old_prefix. ((((exists ff_h_balance_old_prefix_factor. ff_h_balance_old_prefix_factor + S (ff_p_balance_old_prefix) = S ((S (ff_i_balance_old_prefix)) * c)) /\ exists ff_q_balance_old_prefix_factor. b = ff_q_balance_old_prefix_factor * S ((S (ff_i_balance_old_prefix)) * c) + (ff_p_balance_old_prefix))) /\ ((((exists ff_h_balance_old_prefix_partial. ff_h_balance_old_prefix_partial + S (ff_r_balance_old_prefix) = S ((S (ff_i_balance_old_prefix)) * ff_v_balance_old_prefix)) /\ exists ff_q_balance_old_prefix_partial. ff_u_balance_old_prefix = ff_q_balance_old_prefix_partial * S ((S (ff_i_balance_old_prefix)) * ff_v_balance_old_prefix) + (ff_r_balance_old_prefix))) /\ ((((exists ff_h_balance_old_prefix_successor. ff_h_balance_old_prefix_successor + S (ff_s_balance_old_prefix) = S ((S (S ff_i_balance_old_prefix)) * ff_v_balance_old_prefix)) /\ exists ff_q_balance_old_prefix_successor. ff_u_balance_old_prefix = ff_q_balance_old_prefix_successor * S ((S (S ff_i_balance_old_prefix)) * ff_v_balance_old_prefix) + (ff_s_balance_old_prefix))) /\ ff_s_balance_old_prefix = ff_r_balance_old_prefix * ff_p_balance_old_prefix)))))) /\ p = r * a)
  43. specialize beta_product_succ_decompose b
  44. specialize beta_product_succ_decompose c
  45. specialize beta_product_succ_decompose k
  46. specialize beta_product_succ_decompose p
  47. apply beta_product_succ_decompose
  48. exact hproduct_old
  49. have hnew_decomp : exists a r. (((exists ff_h_balance_new_last. ff_h_balance_new_last + S (a) = S ((S (k)) * d)) /\ exists ff_q_balance_new_last. z = ff_q_balance_new_last * S ((S (k)) * d) + (a))) /\ ((exists ff_u_balance_new_prefix ff_v_balance_new_prefix. ((((exists ff_h_balance_new_prefix_start. ff_h_balance_new_prefix_start + S (1) = S ((S (0)) * ff_v_balance_new_prefix)) /\ exists ff_q_balance_new_prefix_start. ff_u_balance_new_prefix = ff_q_balance_new_prefix_start * S ((S (0)) * ff_v_balance_new_prefix) + (1))) /\ ((((exists ff_h_balance_new_prefix_terminal. ff_h_balance_new_prefix_terminal + S (r) = S ((S (k)) * ff_v_balance_new_prefix)) /\ exists ff_q_balance_new_prefix_terminal. ff_u_balance_new_prefix = ff_q_balance_new_prefix_terminal * S ((S (k)) * ff_v_balance_new_prefix) + (r))) /\ forall ff_i_balance_new_prefix. (exists ff_lt_balance_new_prefix_bound. ff_lt_balance_new_prefix_bound + S ff_i_balance_new_prefix = k) -> exists ff_p_balance_new_prefix ff_r_balance_new_prefix ff_s_balance_new_prefix. ((((exists ff_h_balance_new_prefix_factor. ff_h_balance_new_prefix_factor + S (ff_p_balance_new_prefix) = S ((S (ff_i_balance_new_prefix)) * d)) /\ exists ff_q_balance_new_prefix_factor. z = ff_q_balance_new_prefix_factor * S ((S (ff_i_balance_new_prefix)) * d) + (ff_p_balance_new_prefix))) /\ ((((exists ff_h_balance_new_prefix_partial. ff_h_balance_new_prefix_partial + S (ff_r_balance_new_prefix) = S ((S (ff_i_balance_new_prefix)) * ff_v_balance_new_prefix)) /\ exists ff_q_balance_new_prefix_partial. ff_u_balance_new_prefix = ff_q_balance_new_prefix_partial * S ((S (ff_i_balance_new_prefix)) * ff_v_balance_new_prefix) + (ff_r_balance_new_prefix))) /\ ((((exists ff_h_balance_new_prefix_successor. ff_h_balance_new_prefix_successor + S (ff_s_balance_new_prefix) = S ((S (S ff_i_balance_new_prefix)) * ff_v_balance_new_prefix)) /\ exists ff_q_balance_new_prefix_successor. ff_u_balance_new_prefix = ff_q_balance_new_prefix_successor * S ((S (S ff_i_balance_new_prefix)) * ff_v_balance_new_prefix) + (ff_s_balance_new_prefix))) /\ ff_s_balance_new_prefix = ff_r_balance_new_prefix * ff_p_balance_new_prefix)))))) /\ q = r * a)
  50. specialize beta_product_succ_decompose z
  51. specialize beta_product_succ_decompose d
  52. specialize beta_product_succ_decompose k
  53. specialize beta_product_succ_decompose q
  54. apply beta_product_succ_decompose
  55. exact hproduct_new
  56. cases hold_decomp
  57. cases hold_decomp_witness
  58. cases hold_decomp_witness_witness
  59. cases hold_decomp_witness_witness_right
  60. cases hnew_decomp
  61. cases hnew_decomp_witness
  62. cases hnew_decomp_witness_witness
  63. cases hnew_decomp_witness_witness_right
  64. cases hisplit
  65. have hax : x1 = x
  66. specialize beta_at_unique b
  67. specialize beta_at_unique c
  68. specialize beta_at_unique k
  69. specialize beta_at_unique x1
  70. specialize beta_at_unique x
  71. apply beta_at_unique
  72. exact hold_decomp_witness_witness_left
  73. rewrite hisplit_left at hold_i
  74. rewrite hisplit_left at hold_i
  75. exact hold_i
  76. have hby : x3 = y
  77. specialize beta_at_unique z
  78. specialize beta_at_unique d
  79. specialize beta_at_unique k
  80. specialize beta_at_unique x3
  81. specialize beta_at_unique y
  82. apply beta_at_unique
  83. exact hnew_decomp_witness_witness_left
  84. rewrite hisplit_left at hnew_i
  85. rewrite hisplit_left at hnew_i
  86. exact hnew_i
  87. have hprefix_transport : exists ff_u_balance_transported_prefix ff_v_balance_transported_prefix. ((((exists ff_h_balance_transported_prefix_start. ff_h_balance_transported_prefix_start + S (1) = S ((S (0)) * ff_v_balance_transported_prefix)) /\ exists ff_q_balance_transported_prefix_start. ff_u_balance_transported_prefix = ff_q_balance_transported_prefix_start * S ((S (0)) * ff_v_balance_transported_prefix) + (1))) /\ ((((exists ff_h_balance_transported_prefix_terminal. ff_h_balance_transported_prefix_terminal + S (x2) = S ((S (k)) * ff_v_balance_transported_prefix)) /\ exists ff_q_balance_transported_prefix_terminal. ff_u_balance_transported_prefix = ff_q_balance_transported_prefix_terminal * S ((S (k)) * ff_v_balance_transported_prefix) + (x2))) /\ forall ff_i_balance_transported_prefix. (exists ff_lt_balance_transported_prefix_bound. ff_lt_balance_transported_prefix_bound + S ff_i_balance_transported_prefix = k) -> exists ff_p_balance_transported_prefix ff_r_balance_transported_prefix ff_s_balance_transported_prefix. ((((exists ff_h_balance_transported_prefix_factor. ff_h_balance_transported_prefix_factor + S (ff_p_balance_transported_prefix) = S ((S (ff_i_balance_transported_prefix)) * d)) /\ exists ff_q_balance_transported_prefix_factor. z = ff_q_balance_transported_prefix_factor * S ((S (ff_i_balance_transported_prefix)) * d) + (ff_p_balance_transported_prefix))) /\ ((((exists ff_h_balance_transported_prefix_partial. ff_h_balance_transported_prefix_partial + S (ff_r_balance_transported_prefix) = S ((S (ff_i_balance_transported_prefix)) * ff_v_balance_transported_prefix)) /\ exists ff_q_balance_transported_prefix_partial. ff_u_balance_transported_prefix = ff_q_balance_transported_prefix_partial * S ((S (ff_i_balance_transported_prefix)) * ff_v_balance_transported_prefix) + (ff_r_balance_transported_prefix))) /\ ((((exists ff_h_balance_transported_prefix_successor. ff_h_balance_transported_prefix_successor + S (ff_s_balance_transported_prefix) = S ((S (S ff_i_balance_transported_prefix)) * ff_v_balance_transported_prefix)) /\ exists ff_q_balance_transported_prefix_successor. ff_u_balance_transported_prefix = ff_q_balance_transported_prefix_successor * S ((S (S ff_i_balance_transported_prefix)) * ff_v_balance_transported_prefix) + (ff_s_balance_transported_prefix))) /\ ff_s_balance_transported_prefix = ff_r_balance_transported_prefix * ff_p_balance_transported_prefix)))))
  88. specialize beta_product_transport_prefix b
  89. specialize beta_product_transport_prefix c
  90. specialize beta_product_transport_prefix z
  91. specialize beta_product_transport_prefix d
  92. specialize beta_product_transport_prefix k
  93. specialize beta_product_transport_prefix x2
  94. apply beta_product_transport_prefix
  95. exact hold_decomp_witness_witness_right_left
  96. intro j
  97. intro a
  98. intro hj
  99. intro hold
  100. specialize hpreserve j
  101. specialize hpreserve a
  102. apply hpreserve
  103. specialize le_succ (S j)
  104. specialize le_succ k
  105. apply le_succ
  106. exact hj
  107. intro hjk
  108. specialize lt_irrefl_expanded k
  109. apply lt_irrefl_expanded
  110. rewrite hjk at hj
  111. rewrite hisplit_left at hj
  112. exact hj
  113. exact hold
  114. cases hprefix_transport
  115. cases hprefix_transport_witness
  116. cases hnew_decomp_witness_witness_right_left
  117. cases hnew_decomp_witness_witness_right_left_witness
  118. rewrite hold_decomp_witness_witness_right_right
  119. rewrite hnew_decomp_witness_witness_right_right
  120. rewrite hax
  121. rewrite hby
  122. trans (x4 * x) * y
  123. simp [mul_assoc, mul_comm]
  124. congr
  125. congr
  126. symm
  127. specialize beta_product_functional z
  128. specialize beta_product_functional d
  129. specialize beta_product_functional k
  130. specialize beta_product_functional x2
  131. specialize beta_product_functional x5
  132. specialize beta_product_functional x6
  133. specialize beta_product_functional x4
  134. specialize beta_product_functional x7
  135. specialize beta_product_functional x8
  136. apply beta_product_functional
  137. exact hprefix_transport_witness_witness
  138. exact hnew_decomp_witness_witness_right_left_witness_witness
  139. refl
  140. refl
  141. have hki : ~(k = i)
  142. intro hki_eq
  143. specialize lt_irrefl_expanded k
  144. apply lt_irrefl_expanded
  145. rewrite <- hki_eq at hisplit_right
  146. exact hisplit_right
  147. have hlast_new : ((exists h. h + S x1 = S ((S k) * d)) /\ exists w. z = w * S ((S k) * d) + x1)
  148. specialize hpreserve k
  149. specialize hpreserve x1
  150. apply hpreserve
  151. specialize le_refl (S k)
  152. exact le_refl
  153. exact hki
  154. exact hold_decomp_witness_witness_left
  155. have hlast_eq : x3 = x1
  156. specialize beta_at_unique z
  157. specialize beta_at_unique d
  158. specialize beta_at_unique k
  159. specialize beta_at_unique x3
  160. specialize beta_at_unique x1
  161. apply beta_at_unique
  162. exact hnew_decomp_witness_witness_left
  163. exact hlast_new
  164. have hprefix_preserve : forall j a. (exists h. h + S j = k) -> ~(j = i) -> ((exists h. h + S a = S ((S j) * c)) /\ exists w. b = w * S ((S j) * c) + a) -> ((exists h. h + S a = S ((S j) * d)) /\ exists w. z = w * S ((S j) * d) + a)
  165. intro j
  166. intro a
  167. intro hj
  168. intro hji
  169. intro hold
  170. specialize hpreserve j
  171. specialize hpreserve a
  172. apply hpreserve
  173. specialize le_succ (S j)
  174. specialize le_succ k
  175. apply le_succ
  176. exact hj
  177. exact hji
  178. exact hold
  179. have hbalance : x4 * x = x2 * y
  180. specialize IH b
  181. specialize IH c
  182. specialize IH z
  183. specialize IH d
  184. specialize IH i
  185. specialize IH x
  186. specialize IH y
  187. specialize IH x2
  188. specialize IH x4
  189. apply IH
  190. exact hisplit_right
  191. exact hold_i
  192. exact hnew_i
  193. exact hprefix_preserve
  194. exact hold_decomp_witness_witness_right_left
  195. exact hnew_decomp_witness_witness_right_left
  196. rewrite hold_decomp_witness_witness_right_right
  197. rewrite hnew_decomp_witness_witness_right_right
  198. rewrite hlast_eq
  199. trans (x4 * x) * x1
  200. simp [mul_assoc, mul_comm]
  201. rewrite hbalance
  202. simp [mul_assoc, mul_comm]
beta_product_swap_last_invariant · unchanged support, not a new admission
forall b c z d n i x y p q. (exists h. h + S i = n) -> (((exists ff_h_product_swap_old_i. ff_h_product_swap_old_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_product_swap_old_i. b = ff_q_product_swap_old_i * S ((S (i)) * c) + (x))) -> (((exists ff_h_product_swap_old_n. ff_h_product_swap_old_n + S (y) = S ((S (n)) * c)) /\ exists ff_q_product_swap_old_n. b = ff_q_product_swap_old_n * S ((S (n)) * c) + (y))) -> (((exists ff_h_product_swap_new_i. ff_h_product_swap_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_product_swap_new_i. z = ff_q_product_swap_new_i * S ((S (i)) * d) + (y))) -> (((exists ff_h_product_swap_new_n. ff_h_product_swap_new_n + S (x) = S ((S (n)) * d)) /\ exists ff_q_product_swap_new_n. z = ff_q_product_swap_new_n * S ((S (n)) * d) + (x))) -> (forall j a. (exists h. h + S j = S n) -> ~(j = i) -> ~(j = n) -> (((exists ff_h_product_swap_old_j. ff_h_product_swap_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_product_swap_old_j. b = ff_q_product_swap_old_j * S ((S (j)) * c) + (a))) -> (((exists ff_h_product_swap_new_j. ff_h_product_swap_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_product_swap_new_j. z = ff_q_product_swap_new_j * S ((S (j)) * d) + (a)))) -> (exists ff_u_product_swap_old ff_v_product_swap_old. ((((exists ff_h_product_swap_old_start. ff_h_product_swap_old_start + S (1) = S ((S (0)) * ff_v_product_swap_old)) /\ exists ff_q_product_swap_old_start. ff_u_product_swap_old = ff_q_product_swap_old_start * S ((S (0)) * ff_v_product_swap_old) + (1))) /\ ((((exists ff_h_product_swap_old_terminal. ff_h_product_swap_old_terminal + S (p) = S ((S (S n)) * ff_v_product_swap_old)) /\ exists ff_q_product_swap_old_terminal. ff_u_product_swap_old = ff_q_product_swap_old_terminal * S ((S (S n)) * ff_v_product_swap_old) + (p))) /\ forall ff_i_product_swap_old. (exists ff_lt_product_swap_old_bound. ff_lt_product_swap_old_bound + S ff_i_product_swap_old = S n) -> exists ff_p_product_swap_old ff_r_product_swap_old ff_s_product_swap_old. ((((exists ff_h_product_swap_old_factor. ff_h_product_swap_old_factor + S (ff_p_product_swap_old) = S ((S (ff_i_product_swap_old)) * c)) /\ exists ff_q_product_swap_old_factor. b = ff_q_product_swap_old_factor * S ((S (ff_i_product_swap_old)) * c) + (ff_p_product_swap_old))) /\ ((((exists ff_h_product_swap_old_partial. ff_h_product_swap_old_partial + S (ff_r_product_swap_old) = S ((S (ff_i_product_swap_old)) * ff_v_product_swap_old)) /\ exists ff_q_product_swap_old_partial. ff_u_product_swap_old = ff_q_product_swap_old_partial * S ((S (ff_i_product_swap_old)) * ff_v_product_swap_old) + (ff_r_product_swap_old))) /\ ((((exists ff_h_product_swap_old_successor. ff_h_product_swap_old_successor + S (ff_s_product_swap_old) = S ((S (S ff_i_product_swap_old)) * ff_v_product_swap_old)) /\ exists ff_q_product_swap_old_successor. ff_u_product_swap_old = ff_q_product_swap_old_successor * S ((S (S ff_i_product_swap_old)) * ff_v_product_swap_old) + (ff_s_product_swap_old))) /\ ff_s_product_swap_old = ff_r_product_swap_old * ff_p_product_swap_old)))))) -> (exists ff_u_product_swap_new ff_v_product_swap_new. ((((exists ff_h_product_swap_new_start. ff_h_product_swap_new_start + S (1) = S ((S (0)) * ff_v_product_swap_new)) /\ exists ff_q_product_swap_new_start. ff_u_product_swap_new = ff_q_product_swap_new_start * S ((S (0)) * ff_v_product_swap_new) + (1))) /\ ((((exists ff_h_product_swap_new_terminal. ff_h_product_swap_new_terminal + S (q) = S ((S (S n)) * ff_v_product_swap_new)) /\ exists ff_q_product_swap_new_terminal. ff_u_product_swap_new = ff_q_product_swap_new_terminal * S ((S (S n)) * ff_v_product_swap_new) + (q))) /\ forall ff_i_product_swap_new. (exists ff_lt_product_swap_new_bound. ff_lt_product_swap_new_bound + S ff_i_product_swap_new = S n) -> exists ff_p_product_swap_new ff_r_product_swap_new ff_s_product_swap_new. ((((exists ff_h_product_swap_new_factor. ff_h_product_swap_new_factor + S (ff_p_product_swap_new) = S ((S (ff_i_product_swap_new)) * d)) /\ exists ff_q_product_swap_new_factor. z = ff_q_product_swap_new_factor * S ((S (ff_i_product_swap_new)) * d) + (ff_p_product_swap_new))) /\ ((((exists ff_h_product_swap_new_partial. ff_h_product_swap_new_partial + S (ff_r_product_swap_new) = S ((S (ff_i_product_swap_new)) * ff_v_product_swap_new)) /\ exists ff_q_product_swap_new_partial. ff_u_product_swap_new = ff_q_product_swap_new_partial * S ((S (ff_i_product_swap_new)) * ff_v_product_swap_new) + (ff_r_product_swap_new))) /\ ((((exists ff_h_product_swap_new_successor. ff_h_product_swap_new_successor + S (ff_s_product_swap_new) = S ((S (S ff_i_product_swap_new)) * ff_v_product_swap_new)) /\ exists ff_q_product_swap_new_successor. ff_u_product_swap_new = ff_q_product_swap_new_successor * S ((S (S ff_i_product_swap_new)) * ff_v_product_swap_new) + (ff_s_product_swap_new))) /\ ff_s_product_swap_new = ff_r_product_swap_new * ff_p_product_swap_new)))))) -> p = q
  1. intro b
  2. intro c
  3. intro z
  4. intro d
  5. intro n
  6. intro i
  7. intro x
  8. intro y
  9. intro p
  10. intro q
  11. intro hi
  12. intro hold_i
  13. intro hold_n
  14. intro hnew_i
  15. intro hnew_n
  16. intro hpreserve
  17. intro hproduct_old
  18. intro hproduct_new
  19. have hold_decomp : exists a r. (((exists ff_h_swap_old_last. ff_h_swap_old_last + S (a) = S ((S (n)) * c)) /\ exists ff_q_swap_old_last. b = ff_q_swap_old_last * S ((S (n)) * c) + (a))) /\ ((exists ff_u_swap_old_prefix ff_v_swap_old_prefix. ((((exists ff_h_swap_old_prefix_start. ff_h_swap_old_prefix_start + S (1) = S ((S (0)) * ff_v_swap_old_prefix)) /\ exists ff_q_swap_old_prefix_start. ff_u_swap_old_prefix = ff_q_swap_old_prefix_start * S ((S (0)) * ff_v_swap_old_prefix) + (1))) /\ ((((exists ff_h_swap_old_prefix_terminal. ff_h_swap_old_prefix_terminal + S (r) = S ((S (n)) * ff_v_swap_old_prefix)) /\ exists ff_q_swap_old_prefix_terminal. ff_u_swap_old_prefix = ff_q_swap_old_prefix_terminal * S ((S (n)) * ff_v_swap_old_prefix) + (r))) /\ forall ff_i_swap_old_prefix. (exists ff_lt_swap_old_prefix_bound. ff_lt_swap_old_prefix_bound + S ff_i_swap_old_prefix = n) -> exists ff_p_swap_old_prefix ff_r_swap_old_prefix ff_s_swap_old_prefix. ((((exists ff_h_swap_old_prefix_factor. ff_h_swap_old_prefix_factor + S (ff_p_swap_old_prefix) = S ((S (ff_i_swap_old_prefix)) * c)) /\ exists ff_q_swap_old_prefix_factor. b = ff_q_swap_old_prefix_factor * S ((S (ff_i_swap_old_prefix)) * c) + (ff_p_swap_old_prefix))) /\ ((((exists ff_h_swap_old_prefix_partial. ff_h_swap_old_prefix_partial + S (ff_r_swap_old_prefix) = S ((S (ff_i_swap_old_prefix)) * ff_v_swap_old_prefix)) /\ exists ff_q_swap_old_prefix_partial. ff_u_swap_old_prefix = ff_q_swap_old_prefix_partial * S ((S (ff_i_swap_old_prefix)) * ff_v_swap_old_prefix) + (ff_r_swap_old_prefix))) /\ ((((exists ff_h_swap_old_prefix_successor. ff_h_swap_old_prefix_successor + S (ff_s_swap_old_prefix) = S ((S (S ff_i_swap_old_prefix)) * ff_v_swap_old_prefix)) /\ exists ff_q_swap_old_prefix_successor. ff_u_swap_old_prefix = ff_q_swap_old_prefix_successor * S ((S (S ff_i_swap_old_prefix)) * ff_v_swap_old_prefix) + (ff_s_swap_old_prefix))) /\ ff_s_swap_old_prefix = ff_r_swap_old_prefix * ff_p_swap_old_prefix)))))) /\ p = r * a)
  20. specialize beta_product_succ_decompose b
  21. specialize beta_product_succ_decompose c
  22. specialize beta_product_succ_decompose n
  23. specialize beta_product_succ_decompose p
  24. apply beta_product_succ_decompose
  25. exact hproduct_old
  26. have hnew_decomp : exists a r. (((exists ff_h_swap_new_last. ff_h_swap_new_last + S (a) = S ((S (n)) * d)) /\ exists ff_q_swap_new_last. z = ff_q_swap_new_last * S ((S (n)) * d) + (a))) /\ ((exists ff_u_swap_new_prefix ff_v_swap_new_prefix. ((((exists ff_h_swap_new_prefix_start. ff_h_swap_new_prefix_start + S (1) = S ((S (0)) * ff_v_swap_new_prefix)) /\ exists ff_q_swap_new_prefix_start. ff_u_swap_new_prefix = ff_q_swap_new_prefix_start * S ((S (0)) * ff_v_swap_new_prefix) + (1))) /\ ((((exists ff_h_swap_new_prefix_terminal. ff_h_swap_new_prefix_terminal + S (r) = S ((S (n)) * ff_v_swap_new_prefix)) /\ exists ff_q_swap_new_prefix_terminal. ff_u_swap_new_prefix = ff_q_swap_new_prefix_terminal * S ((S (n)) * ff_v_swap_new_prefix) + (r))) /\ forall ff_i_swap_new_prefix. (exists ff_lt_swap_new_prefix_bound. ff_lt_swap_new_prefix_bound + S ff_i_swap_new_prefix = n) -> exists ff_p_swap_new_prefix ff_r_swap_new_prefix ff_s_swap_new_prefix. ((((exists ff_h_swap_new_prefix_factor. ff_h_swap_new_prefix_factor + S (ff_p_swap_new_prefix) = S ((S (ff_i_swap_new_prefix)) * d)) /\ exists ff_q_swap_new_prefix_factor. z = ff_q_swap_new_prefix_factor * S ((S (ff_i_swap_new_prefix)) * d) + (ff_p_swap_new_prefix))) /\ ((((exists ff_h_swap_new_prefix_partial. ff_h_swap_new_prefix_partial + S (ff_r_swap_new_prefix) = S ((S (ff_i_swap_new_prefix)) * ff_v_swap_new_prefix)) /\ exists ff_q_swap_new_prefix_partial. ff_u_swap_new_prefix = ff_q_swap_new_prefix_partial * S ((S (ff_i_swap_new_prefix)) * ff_v_swap_new_prefix) + (ff_r_swap_new_prefix))) /\ ((((exists ff_h_swap_new_prefix_successor. ff_h_swap_new_prefix_successor + S (ff_s_swap_new_prefix) = S ((S (S ff_i_swap_new_prefix)) * ff_v_swap_new_prefix)) /\ exists ff_q_swap_new_prefix_successor. ff_u_swap_new_prefix = ff_q_swap_new_prefix_successor * S ((S (S ff_i_swap_new_prefix)) * ff_v_swap_new_prefix) + (ff_s_swap_new_prefix))) /\ ff_s_swap_new_prefix = ff_r_swap_new_prefix * ff_p_swap_new_prefix)))))) /\ q = r * a)
  27. specialize beta_product_succ_decompose z
  28. specialize beta_product_succ_decompose d
  29. specialize beta_product_succ_decompose n
  30. specialize beta_product_succ_decompose q
  31. apply beta_product_succ_decompose
  32. exact hproduct_new
  33. cases hold_decomp
  34. cases hold_decomp_witness
  35. cases hold_decomp_witness_witness
  36. cases hold_decomp_witness_witness_right
  37. cases hnew_decomp
  38. cases hnew_decomp_witness
  39. cases hnew_decomp_witness_witness
  40. cases hnew_decomp_witness_witness_right
  41. have hold_last : x1 = y
  42. specialize beta_at_unique b
  43. specialize beta_at_unique c
  44. specialize beta_at_unique n
  45. specialize beta_at_unique x1
  46. specialize beta_at_unique y
  47. apply beta_at_unique
  48. exact hold_decomp_witness_witness_left
  49. exact hold_n
  50. have hnew_last : x3 = x
  51. specialize beta_at_unique z
  52. specialize beta_at_unique d
  53. specialize beta_at_unique n
  54. specialize beta_at_unique x3
  55. specialize beta_at_unique x
  56. apply beta_at_unique
  57. exact hnew_decomp_witness_witness_left
  58. exact hnew_n
  59. have hprefix_preserve : forall j a. (exists h. h + S j = n) -> ~(j = i) -> ((exists h. h + S a = S ((S j) * c)) /\ exists w. b = w * S ((S j) * c) + a) -> ((exists h. h + S a = S ((S j) * d)) /\ exists w. z = w * S ((S j) * d) + a)
  60. intro j
  61. intro a
  62. intro hj
  63. intro hji
  64. intro hold
  65. specialize hpreserve j
  66. specialize hpreserve a
  67. apply hpreserve
  68. specialize le_succ (S j)
  69. specialize le_succ n
  70. apply le_succ
  71. exact hj
  72. exact hji
  73. intro hjn
  74. specialize lt_irrefl_expanded n
  75. apply lt_irrefl_expanded
  76. rewrite hjn at hj
  77. exact hj
  78. exact hold
  79. have hbalance : x4 * x = x2 * y
  80. specialize beta_product_replace_balance n
  81. specialize beta_product_replace_balance b
  82. specialize beta_product_replace_balance c
  83. specialize beta_product_replace_balance z
  84. specialize beta_product_replace_balance d
  85. specialize beta_product_replace_balance i
  86. specialize beta_product_replace_balance x
  87. specialize beta_product_replace_balance y
  88. specialize beta_product_replace_balance x2
  89. specialize beta_product_replace_balance x4
  90. apply beta_product_replace_balance
  91. exact hi
  92. exact hold_i
  93. exact hnew_i
  94. exact hprefix_preserve
  95. exact hold_decomp_witness_witness_right_left
  96. exact hnew_decomp_witness_witness_right_left
  97. rewrite hold_decomp_witness_witness_right_right
  98. rewrite hnew_decomp_witness_witness_right_right
  99. rewrite hold_last
  100. rewrite hnew_last
  101. symm
  102. exact hbalance
finite_fixed_last_prefix_bounded · unchanged support, not a new admission
forall r s n. (forall fp_i_fixed_last_bounded_succ. (exists fp_gap_fixed_last_bounded_succ_index. fp_gap_fixed_last_bounded_succ_index + S fp_i_fixed_last_bounded_succ = S n) -> exists fp_value_fixed_last_bounded_succ. ((((exists ff_h_fixed_last_bounded_succ_entry. ff_h_fixed_last_bounded_succ_entry + S (fp_value_fixed_last_bounded_succ) = S ((S (fp_i_fixed_last_bounded_succ)) * s)) /\ exists ff_q_fixed_last_bounded_succ_entry. r = ff_q_fixed_last_bounded_succ_entry * S ((S (fp_i_fixed_last_bounded_succ)) * s) + (fp_value_fixed_last_bounded_succ))) /\ (exists fp_gap_fixed_last_bounded_succ_value. fp_gap_fixed_last_bounded_succ_value + S fp_value_fixed_last_bounded_succ = S n))) -> (forall fp_i_fixed_last_injective_succ fp_j_fixed_last_injective_succ fp_value_fixed_last_injective_succ. (exists fp_gap_fixed_last_injective_succ_i. fp_gap_fixed_last_injective_succ_i + S fp_i_fixed_last_injective_succ = S n) -> (exists fp_gap_fixed_last_injective_succ_j. fp_gap_fixed_last_injective_succ_j + S fp_j_fixed_last_injective_succ = S n) -> (((exists ff_h_fixed_last_injective_succ_left. ff_h_fixed_last_injective_succ_left + S (fp_value_fixed_last_injective_succ) = S ((S (fp_i_fixed_last_injective_succ)) * s)) /\ exists ff_q_fixed_last_injective_succ_left. r = ff_q_fixed_last_injective_succ_left * S ((S (fp_i_fixed_last_injective_succ)) * s) + (fp_value_fixed_last_injective_succ))) -> (((exists ff_h_fixed_last_injective_succ_right. ff_h_fixed_last_injective_succ_right + S (fp_value_fixed_last_injective_succ) = S ((S (fp_j_fixed_last_injective_succ)) * s)) /\ exists ff_q_fixed_last_injective_succ_right. r = ff_q_fixed_last_injective_succ_right * S ((S (fp_j_fixed_last_injective_succ)) * s) + (fp_value_fixed_last_injective_succ))) -> fp_i_fixed_last_injective_succ = fp_j_fixed_last_injective_succ) -> (((exists ff_h_fixed_last_entry. ff_h_fixed_last_entry + S (n) = S ((S (n)) * s)) /\ exists ff_q_fixed_last_entry. r = ff_q_fixed_last_entry * S ((S (n)) * s) + (n))) -> (forall fp_i_fixed_last_bounded_prefix. (exists fp_gap_fixed_last_bounded_prefix_index. fp_gap_fixed_last_bounded_prefix_index + S fp_i_fixed_last_bounded_prefix = n) -> exists fp_value_fixed_last_bounded_prefix. ((((exists ff_h_fixed_last_bounded_prefix_entry. ff_h_fixed_last_bounded_prefix_entry + S (fp_value_fixed_last_bounded_prefix) = S ((S (fp_i_fixed_last_bounded_prefix)) * s)) /\ exists ff_q_fixed_last_bounded_prefix_entry. r = ff_q_fixed_last_bounded_prefix_entry * S ((S (fp_i_fixed_last_bounded_prefix)) * s) + (fp_value_fixed_last_bounded_prefix))) /\ (exists fp_gap_fixed_last_bounded_prefix_value. fp_gap_fixed_last_bounded_prefix_value + S fp_value_fixed_last_bounded_prefix = n)))
  1. intro r
  2. intro s
  3. intro n
  4. intro hbounded
  5. intro hinjective
  6. intro hlast
  7. have hnotop : forall i. (exists h. h + S i = n) -> ~((exists h. h + S n = S ((S i) * s)) /\ exists q. r = q * S ((S i) * s) + n)
  8. intro i
  9. intro hi
  10. intro htop
  11. have hisn : exists h. h + S i = S n
  12. specialize le_succ (S i)
  13. specialize le_succ n
  14. apply le_succ
  15. exact hi
  16. have hnsn : exists h. h + S n = S n
  17. specialize le_refl (S n)
  18. exact le_refl
  19. have hin : i = n
  20. specialize hinjective i
  21. specialize hinjective n
  22. specialize hinjective n
  23. apply hinjective
  24. exact hisn
  25. exact hnsn
  26. exact htop
  27. exact hlast
  28. specialize lt_irrefl_expanded n
  29. apply lt_irrefl_expanded
  30. rewrite hin at hi
  31. exact hi
  32. specialize finite_bounded_prefix_without_top r
  33. specialize finite_bounded_prefix_without_top s
  34. specialize finite_bounded_prefix_without_top n
  35. specialize finite_bounded_prefix_without_top (S n)
  36. apply finite_bounded_prefix_without_top
  37. refl
  38. exact hbounded
  39. exact hnotop
beta_reindex_alignment_swap_last · unchanged support, not a new admission
forall r s u v b c z d w e n i m x y. (((exists ff_h_align_swap_map_i. ff_h_align_swap_map_i + S (m) = S ((S (i)) * v)) /\ exists ff_q_align_swap_map_i. u = ff_q_align_swap_map_i * S ((S (i)) * v) + (m))) -> (((exists ff_h_align_swap_map_n. ff_h_align_swap_map_n + S (n) = S ((S (n)) * v)) /\ exists ff_q_align_swap_map_n. u = ff_q_align_swap_map_n * S ((S (n)) * v) + (n))) -> (forall k j. (exists h. h + S k = S n) -> ~(k = i) -> ~(k = n) -> (((exists ff_h_align_swap_map_old. ff_h_align_swap_map_old + S (j) = S ((S (k)) * s)) /\ exists ff_q_align_swap_map_old. r = ff_q_align_swap_map_old * S ((S (k)) * s) + (j))) -> (((exists ff_h_align_swap_map_new. ff_h_align_swap_map_new + S (j) = S ((S (k)) * v)) /\ exists ff_q_align_swap_map_new. u = ff_q_align_swap_map_new * S ((S (k)) * v) + (j)))) -> (((exists ff_h_align_swap_source_m. ff_h_align_swap_source_m + S (y) = S ((S (m)) * c)) /\ exists ff_q_align_swap_source_m. b = ff_q_align_swap_source_m * S ((S (m)) * c) + (y))) -> (((exists ff_h_align_swap_source_n. ff_h_align_swap_source_n + S (x) = S ((S (n)) * c)) /\ exists ff_q_align_swap_source_n. b = ff_q_align_swap_source_n * S ((S (n)) * c) + (x))) -> (((exists ff_h_align_swap_target_i. ff_h_align_swap_target_i + S (y) = S ((S (i)) * e)) /\ exists ff_q_align_swap_target_i. w = ff_q_align_swap_target_i * S ((S (i)) * e) + (y))) -> (((exists ff_h_align_swap_target_n. ff_h_align_swap_target_n + S (x) = S ((S (n)) * e)) /\ exists ff_q_align_swap_target_n. w = ff_q_align_swap_target_n * S ((S (n)) * e) + (x))) -> (forall k a. (exists h. h + S k = S n) -> ~(k = i) -> ~(k = n) -> (((exists ff_h_align_swap_target_old. ff_h_align_swap_target_old + S (a) = S ((S (k)) * d)) /\ exists ff_q_align_swap_target_old. z = ff_q_align_swap_target_old * S ((S (k)) * d) + (a))) -> (((exists ff_h_align_swap_target_new. ff_h_align_swap_target_new + S (a) = S ((S (k)) * e)) /\ exists ff_q_align_swap_target_new. w = ff_q_align_swap_target_new * S ((S (k)) * e) + (a)))) -> (forall fpr_i_align_swap_old fpr_j_align_swap_old fpr_x_align_swap_old. (exists fpr_h_align_swap_old. fpr_h_align_swap_old + S fpr_i_align_swap_old = S n) -> (((exists ff_h_align_swap_old_map. ff_h_align_swap_old_map + S (fpr_j_align_swap_old) = S ((S (fpr_i_align_swap_old)) * s)) /\ exists ff_q_align_swap_old_map. r = ff_q_align_swap_old_map * S ((S (fpr_i_align_swap_old)) * s) + (fpr_j_align_swap_old))) -> (((exists ff_h_align_swap_old_source. ff_h_align_swap_old_source + S (fpr_x_align_swap_old) = S ((S (fpr_j_align_swap_old)) * c)) /\ exists ff_q_align_swap_old_source. b = ff_q_align_swap_old_source * S ((S (fpr_j_align_swap_old)) * c) + (fpr_x_align_swap_old))) -> (((exists ff_h_align_swap_old_target. ff_h_align_swap_old_target + S (fpr_x_align_swap_old) = S ((S (fpr_i_align_swap_old)) * d)) /\ exists ff_q_align_swap_old_target. z = ff_q_align_swap_old_target * S ((S (fpr_i_align_swap_old)) * d) + (fpr_x_align_swap_old)))) -> (forall fpr_i_align_swap_new fpr_j_align_swap_new fpr_x_align_swap_new. (exists fpr_h_align_swap_new. fpr_h_align_swap_new + S fpr_i_align_swap_new = S n) -> (((exists ff_h_align_swap_new_map. ff_h_align_swap_new_map + S (fpr_j_align_swap_new) = S ((S (fpr_i_align_swap_new)) * v)) /\ exists ff_q_align_swap_new_map. u = ff_q_align_swap_new_map * S ((S (fpr_i_align_swap_new)) * v) + (fpr_j_align_swap_new))) -> (((exists ff_h_align_swap_new_source. ff_h_align_swap_new_source + S (fpr_x_align_swap_new) = S ((S (fpr_j_align_swap_new)) * c)) /\ exists ff_q_align_swap_new_source. b = ff_q_align_swap_new_source * S ((S (fpr_j_align_swap_new)) * c) + (fpr_x_align_swap_new))) -> (((exists ff_h_align_swap_new_target. ff_h_align_swap_new_target + S (fpr_x_align_swap_new) = S ((S (fpr_i_align_swap_new)) * e)) /\ exists ff_q_align_swap_new_target. w = ff_q_align_swap_new_target * S ((S (fpr_i_align_swap_new)) * e) + (fpr_x_align_swap_new))))
  1. intro r
  2. intro s
  3. intro u
  4. intro v
  5. intro b
  6. intro c
  7. intro z
  8. intro d
  9. intro w
  10. intro e
  11. intro n
  12. intro i
  13. intro m
  14. intro x
  15. intro y
  16. intro hmap_i
  17. intro hmap_n
  18. intro hmap_preserve
  19. intro hsource_m
  20. intro hsource_n
  21. intro htarget_i
  22. intro htarget_n
  23. intro htarget_preserve
  24. intro haligned
  25. have hreflect : forall k j. (exists h. h + S k = S n) -> ((exists h. h + S j = S ((S k) * v)) /\ exists q. u = q * S ((S k) * v) + j) -> (k = i /\ j = m) \/ ((k = n /\ j = n) \/ (~(k = i) /\ (~(k = n) /\ ((exists h. h + S j = S ((S k) * s)) /\ exists q. r = q * S ((S k) * s) + j))))
  26. specialize beta_prefix_swap_last_reflect r
  27. specialize beta_prefix_swap_last_reflect s
  28. specialize beta_prefix_swap_last_reflect u
  29. specialize beta_prefix_swap_last_reflect v
  30. specialize beta_prefix_swap_last_reflect n
  31. specialize beta_prefix_swap_last_reflect i
  32. specialize beta_prefix_swap_last_reflect n
  33. specialize beta_prefix_swap_last_reflect m
  34. apply beta_prefix_swap_last_reflect
  35. exact hmap_i
  36. exact hmap_n
  37. exact hmap_preserve
  38. intro k
  39. intro j
  40. intro a
  41. intro hk
  42. intro hmap
  43. intro hsource
  44. specialize hreflect k
  45. specialize hreflect j
  46. have hcases : (k = i /\ j = m) \/ ((k = n /\ j = n) \/ (~(k = i) /\ (~(k = n) /\ ((exists h. h + S j = S ((S k) * s)) /\ exists q. r = q * S ((S k) * s) + j))))
  47. apply hreflect
  48. exact hk
  49. exact hmap
  50. cases hcases
  51. cases hcases_left
  52. have hay : a = y
  53. specialize beta_at_unique b
  54. specialize beta_at_unique c
  55. specialize beta_at_unique m
  56. specialize beta_at_unique a
  57. specialize beta_at_unique y
  58. apply beta_at_unique
  59. rewrite hcases_left_right at hsource
  60. rewrite hcases_left_right at hsource
  61. exact hsource
  62. exact hsource_m
  63. rewrite hcases_left_left
  64. rewrite hcases_left_left
  65. rewrite hay
  66. rewrite hay
  67. exact htarget_i
  68. cases hcases_right
  69. cases hcases_right_left
  70. have hax : a = x
  71. specialize beta_at_unique b
  72. specialize beta_at_unique c
  73. specialize beta_at_unique n
  74. specialize beta_at_unique a
  75. specialize beta_at_unique x
  76. apply beta_at_unique
  77. rewrite hcases_right_left_right at hsource
  78. rewrite hcases_right_left_right at hsource
  79. exact hsource
  80. exact hsource_n
  81. rewrite hcases_right_left_left
  82. rewrite hcases_right_left_left
  83. rewrite hax
  84. rewrite hax
  85. exact htarget_n
  86. cases hcases_right_right
  87. cases hcases_right_right_right
  88. have hold_target : ((exists h. h + S a = S ((S k) * d)) /\ exists q. z = q * S ((S k) * d) + a)
  89. specialize haligned k
  90. specialize haligned j
  91. specialize haligned a
  92. apply haligned
  93. exact hk
  94. exact hcases_right_right_right_right
  95. exact hsource
  96. specialize htarget_preserve k
  97. specialize htarget_preserve a
  98. apply htarget_preserve
  99. exact hk
  100. exact hcases_right_right_left
  101. exact hcases_right_right_right_left
  102. exact hold_target
mod_eq_zero_iff_eq · unchanged support, not a new admission
forall a b. (((exists hgcrt_mod_left_zero_source hgcrt_mod_right_zero_source. a + 0 * hgcrt_mod_left_zero_source = b + 0 * hgcrt_mod_right_zero_source) -> a = b) /\ (a = b -> (exists hgcrt_mod_left_zero_result hgcrt_mod_right_zero_result. a + 0 * hgcrt_mod_left_zero_result = b + 0 * hgcrt_mod_right_zero_result)))
  1. intro a
  2. intro b
  3. split
  4. intro h
  5. cases h
  6. cases h_witness
  7. trans a + 0 * x
  8. symm
  9. trans a + 0
  10. congr
  11. refl
  12. apply mul_zero_left
  13. apply PA3
  14. trans b + 0 * x1
  15. exact h_witness_witness
  16. trans b + 0
  17. congr
  18. refl
  19. apply mul_zero_left
  20. apply PA3
  21. intro h
  22. exists 0
  23. exists 0
  24. rewrite h
  25. refl
mod_eq_scale · unchanged support, not a new admission
forall k m a b. (exists hgcrt_mod_left_scale_source hgcrt_mod_right_scale_source. a + m * hgcrt_mod_left_scale_source = b + m * hgcrt_mod_right_scale_source) -> (exists hgcrt_mod_left_scale_result hgcrt_mod_right_scale_result. (k * a) + (k * m) * hgcrt_mod_left_scale_result = (k * b) + (k * m) * hgcrt_mod_right_scale_result)
  1. intro k
  2. intro m
  3. intro a
  4. intro b
  5. intro h
  6. cases h
  7. cases h_witness
  8. exists x
  9. exists x1
  10. trans k * a + k * (m * x)
  11. congr
  12. refl
  13. apply mul_assoc
  14. trans k * (a + m * x)
  15. symm
  16. apply mul_add
  17. trans k * (b + m * x1)
  18. congr
  19. refl
  20. exact h_witness_witness
  21. trans k * b + k * (m * x1)
  22. apply mul_add
  23. congr
  24. refl
  25. symm
  26. apply mul_assoc
is_gcd_quotients_coprime_nonzero · unchanged support, not a new admission
forall g m n M N. ((((exists hag_left_factor_quotient_assumption. m = g * hag_left_factor_quotient_assumption) /\ (exists hag_right_factor_quotient_assumption. n = g * hag_right_factor_quotient_assumption)) /\ forall hag_divisor_quotient_assumption. (exists hag_common_left_quotient_assumption. m = hag_divisor_quotient_assumption * hag_common_left_quotient_assumption) -> (exists hag_common_right_quotient_assumption. n = hag_divisor_quotient_assumption * hag_common_right_quotient_assumption) -> exists hag_greatest_factor_quotient_assumption. g = hag_divisor_quotient_assumption * hag_greatest_factor_quotient_assumption)) -> ~(g = 0) -> m = g * M -> n = g * N -> (forall hmi_divisor_quotient_result. (exists hmi_left_factor_quotient_result. M = hmi_divisor_quotient_result * hmi_left_factor_quotient_result) -> (exists hmi_right_factor_quotient_result. N = hmi_divisor_quotient_result * hmi_right_factor_quotient_result) -> hmi_divisor_quotient_result = 1)
  1. intro g
  2. intro m
  3. intro n
  4. intro M
  5. intro N
  6. intro hg
  7. intro hg0
  8. intro hm
  9. intro hn
  10. intro d
  11. intro hdM
  12. intro hdN
  13. cases hdM
  14. cases hdN
  15. have hdm : exists u. m = (g * d) * u
  16. exists x
  17. trans g * M
  18. exact hm
  19. trans g * (d * x)
  20. congr
  21. refl
  22. exact hdM_witness
  23. symm
  24. apply mul_assoc
  25. have hdn : exists v. n = (g * d) * v
  26. exists x1
  27. trans g * N
  28. exact hn
  29. trans g * (d * x1)
  30. congr
  31. refl
  32. exact hdN_witness
  33. symm
  34. apply mul_assoc
  35. have hdg : exists w. g = (g * d) * w
  36. specialize is_gcd_greatest g
  37. specialize is_gcd_greatest m
  38. specialize is_gcd_greatest n
  39. specialize is_gcd_greatest (g * d)
  40. apply is_gcd_greatest
  41. exact hg
  42. exact hdm
  43. exact hdn
  44. cases hdg
  45. have hnorm : g = g * (d * x2)
  46. trans (g * d) * x2
  47. exact hdg_witness
  48. apply mul_assoc
  49. have hone : 1 = d * x2
  50. specialize mul_left_cancel_nonzero g
  51. specialize mul_left_cancel_nonzero 1
  52. specialize mul_left_cancel_nonzero (d * x2)
  53. apply mul_left_cancel_nonzero
  54. exact hg0
  55. trans g
  56. apply mul_one
  57. exact hnorm
  58. specialize divisor_one d
  59. apply divisor_one
  60. exists x2
  61. exact hone
mod_eq_common_remainder_decomposition · unchanged support, not a new admission
forall g a b. ~(g = 0) -> (exists hgcrt_mod_left_common_remainder_assumption hgcrt_mod_right_common_remainder_assumption. a + g * hgcrt_mod_left_common_remainder_assumption = b + g * hgcrt_mod_right_common_remainder_assumption) -> exists A B r. ((a = g * A + r /\ b = g * B + r) /\ (exists hmi_gap_common_remainder_bound. hmi_gap_common_remainder_bound + S r = g))
  1. intro g
  2. intro a
  3. intro b
  4. intro hg0
  5. intro hab
  6. have hdiva : exists q r. a = g * q + r /\ exists h. h + S r = g
  7. specialize division_remainder_exists g
  8. specialize division_remainder_exists a
  9. apply division_remainder_exists
  10. exact hg0
  11. cases hdiva
  12. cases hdiva_witness
  13. cases hdiva_witness_witness
  14. have haqr : a = x * g + x1
  15. trans g * x + x1
  16. exact hdiva_witness_witness_left
  17. congr
  18. apply mul_comm
  19. refl
  20. have har : exists hgcrt_mod_left_common_remainder_a_r hgcrt_mod_right_common_remainder_a_r. a + g * hgcrt_mod_left_common_remainder_a_r = x1 + g * hgcrt_mod_right_common_remainder_a_r
  21. specialize remainder_decomposition_to_mod_eq g
  22. specialize remainder_decomposition_to_mod_eq a
  23. specialize remainder_decomposition_to_mod_eq x
  24. specialize remainder_decomposition_to_mod_eq x1
  25. apply remainder_decomposition_to_mod_eq
  26. exact haqr
  27. have hba : exists hgcrt_mod_left_common_remainder_b_a hgcrt_mod_right_common_remainder_b_a. b + g * hgcrt_mod_left_common_remainder_b_a = a + g * hgcrt_mod_right_common_remainder_b_a
  28. specialize mod_eq_symm g
  29. specialize mod_eq_symm a
  30. specialize mod_eq_symm b
  31. apply mod_eq_symm
  32. exact hab
  33. have hbr : exists hgcrt_mod_left_common_remainder_b_r hgcrt_mod_right_common_remainder_b_r. b + g * hgcrt_mod_left_common_remainder_b_r = x1 + g * hgcrt_mod_right_common_remainder_b_r
  34. specialize mod_eq_trans g
  35. specialize mod_eq_trans b
  36. specialize mod_eq_trans a
  37. specialize mod_eq_trans x1
  38. apply mod_eq_trans
  39. exact hba
  40. exact har
  41. have hqb : exists q. b = q * g + x1
  42. specialize mod_eq_to_remainder_decomposition g
  43. specialize mod_eq_to_remainder_decomposition b
  44. specialize mod_eq_to_remainder_decomposition x1
  45. apply mod_eq_to_remainder_decomposition
  46. exact hg0
  47. exact hdiva_witness_witness_right
  48. exact hbr
  49. cases hqb
  50. exists x
  51. exists x2
  52. exists x1
  53. split
  54. split
  55. exact hdiva_witness_witness_left
  56. trans x2 * g + x1
  57. exact hqb_witness
  58. congr
  59. apply mul_comm
  60. refl
  61. exact hdiva_witness_witness_right
crt_scaled_common_remainder_lift · unchanged support, not a new admission
forall g m n a b M N A B r. m = g * M -> n = g * N -> a = g * A + r -> b = g * B + r -> ~(M = 0) -> ~(N = 0) -> (forall hmi_divisor_lift_assumption. (exists hmi_left_factor_lift_assumption. M = hmi_divisor_lift_assumption * hmi_left_factor_lift_assumption) -> (exists hmi_right_factor_lift_assumption. N = hmi_divisor_lift_assumption * hmi_right_factor_lift_assumption) -> hmi_divisor_lift_assumption = 1) -> exists x. (((exists hgcrt_mod_left_lift_result_left hgcrt_mod_right_lift_result_left. x + m * hgcrt_mod_left_lift_result_left = a + m * hgcrt_mod_right_lift_result_left) /\ (exists hgcrt_mod_left_lift_result_right hgcrt_mod_right_lift_result_right. x + n * hgcrt_mod_left_lift_result_right = b + n * hgcrt_mod_right_lift_result_right)))
  1. intro g
  2. intro m
  3. intro n
  4. intro a
  5. intro b
  6. intro M
  7. intro N
  8. intro A
  9. intro B
  10. intro r
  11. intro hm
  12. intro hn
  13. intro ha
  14. intro hb
  15. intro hM
  16. intro hN
  17. intro hcop
  18. have hcrt : exists x. (((exists hgcrt_mod_left_lift_reduced_left hgcrt_mod_right_lift_reduced_left. x + M * hgcrt_mod_left_lift_reduced_left = A + M * hgcrt_mod_right_lift_reduced_left) /\ (exists hgcrt_mod_left_lift_reduced_right hgcrt_mod_right_lift_reduced_right. x + N * hgcrt_mod_left_lift_reduced_right = B + N * hgcrt_mod_right_lift_reduced_right)))
  19. specialize binary_crt M
  20. specialize binary_crt N
  21. specialize binary_crt A
  22. specialize binary_crt B
  23. apply binary_crt
  24. exact hM
  25. exact hN
  26. exact hcop
  27. cases hcrt
  28. cases hcrt_witness
  29. have hls : exists hgcrt_mod_left_lift_ls hgcrt_mod_right_lift_ls. (g * x) + (g * M) * hgcrt_mod_left_lift_ls = (g * A) + (g * M) * hgcrt_mod_right_lift_ls
  30. specialize mod_eq_scale g
  31. specialize mod_eq_scale M
  32. specialize mod_eq_scale x
  33. specialize mod_eq_scale A
  34. apply mod_eq_scale
  35. exact hcrt_witness_left
  36. have hrs : exists hgcrt_mod_left_lift_rs hgcrt_mod_right_lift_rs. (g * x) + (g * N) * hgcrt_mod_left_lift_rs = (g * B) + (g * N) * hgcrt_mod_right_lift_rs
  37. specialize mod_eq_scale g
  38. specialize mod_eq_scale N
  39. specialize mod_eq_scale x
  40. specialize mod_eq_scale B
  41. apply mod_eq_scale
  42. exact hcrt_witness_right
  43. have hlr : exists hgcrt_mod_left_lift_lr hgcrt_mod_right_lift_lr. r + (g * M) * hgcrt_mod_left_lift_lr = r + (g * M) * hgcrt_mod_right_lift_lr
  44. specialize mod_eq_refl (g * M)
  45. specialize mod_eq_refl r
  46. apply mod_eq_refl
  47. have hrr : exists hgcrt_mod_left_lift_rr hgcrt_mod_right_lift_rr. r + (g * N) * hgcrt_mod_left_lift_rr = r + (g * N) * hgcrt_mod_right_lift_rr
  48. specialize mod_eq_refl (g * N)
  49. specialize mod_eq_refl r
  50. apply mod_eq_refl
  51. have hll : exists hgcrt_mod_left_lift_ll hgcrt_mod_right_lift_ll. (g * x + r) + (g * M) * hgcrt_mod_left_lift_ll = (g * A + r) + (g * M) * hgcrt_mod_right_lift_ll
  52. specialize mod_eq_add (g * M)
  53. specialize mod_eq_add (g * x)
  54. specialize mod_eq_add (g * A)
  55. specialize mod_eq_add r
  56. specialize mod_eq_add r
  57. apply mod_eq_add
  58. exact hls
  59. exact hlr
  60. have hrl : exists hgcrt_mod_left_lift_rl hgcrt_mod_right_lift_rl. (g * x + r) + (g * N) * hgcrt_mod_left_lift_rl = (g * B + r) + (g * N) * hgcrt_mod_right_lift_rl
  61. specialize mod_eq_add (g * N)
  62. specialize mod_eq_add (g * x)
  63. specialize mod_eq_add (g * B)
  64. specialize mod_eq_add r
  65. specialize mod_eq_add r
  66. apply mod_eq_add
  67. exact hrs
  68. exact hrr
  69. exists g * x + r
  70. split
  71. rewrite <- hm at hll
  72. rewrite <- hm at hll
  73. rewrite <- ha at hll
  74. exact hll
  75. rewrite <- hn at hrl
  76. rewrite <- hn at hrl
  77. rewrite <- hb at hrl
  78. exact hrl
generalized_binary_crt_sufficient_nonzero · unchanged support, not a new admission
forall g m n a b. ~(m = 0) -> ~(n = 0) -> ((((exists hag_left_factor_sufficient_assumption. m = g * hag_left_factor_sufficient_assumption) /\ (exists hag_right_factor_sufficient_assumption. n = g * hag_right_factor_sufficient_assumption)) /\ forall hag_divisor_sufficient_assumption. (exists hag_common_left_sufficient_assumption. m = hag_divisor_sufficient_assumption * hag_common_left_sufficient_assumption) -> (exists hag_common_right_sufficient_assumption. n = hag_divisor_sufficient_assumption * hag_common_right_sufficient_assumption) -> exists hag_greatest_factor_sufficient_assumption. g = hag_divisor_sufficient_assumption * hag_greatest_factor_sufficient_assumption)) -> (exists hgcrt_mod_left_sufficient_compatibility hgcrt_mod_right_sufficient_compatibility. a + g * hgcrt_mod_left_sufficient_compatibility = b + g * hgcrt_mod_right_sufficient_compatibility) -> exists x. (((exists hgcrt_mod_left_sufficient_result_left hgcrt_mod_right_sufficient_result_left. x + m * hgcrt_mod_left_sufficient_result_left = a + m * hgcrt_mod_right_sufficient_result_left) /\ (exists hgcrt_mod_left_sufficient_result_right hgcrt_mod_right_sufficient_result_right. x + n * hgcrt_mod_left_sufficient_result_right = b + n * hgcrt_mod_right_sufficient_result_right)))
  1. intro g
  2. intro m
  3. intro n
  4. intro a
  5. intro b
  6. intro hm0
  7. intro hn0
  8. intro hgcd
  9. intro hcompat
  10. have hmfactor : exists M. m = g * M
  11. specialize is_gcd_dvd_left g
  12. specialize is_gcd_dvd_left m
  13. specialize is_gcd_dvd_left n
  14. apply is_gcd_dvd_left
  15. exact hgcd
  16. have hnfactor : exists N. n = g * N
  17. specialize is_gcd_dvd_right g
  18. specialize is_gcd_dvd_right m
  19. specialize is_gcd_dvd_right n
  20. apply is_gcd_dvd_right
  21. exact hgcd
  22. cases hmfactor
  23. cases hnfactor
  24. have hg0 : ~(g = 0)
  25. intro hgz
  26. apply hm0
  27. trans g * x
  28. exact hmfactor_witness
  29. rewrite hgz
  30. apply mul_zero_left
  31. have hM0 : ~(x = 0)
  32. intro hx0
  33. apply hm0
  34. trans g * x
  35. exact hmfactor_witness
  36. rewrite hx0
  37. apply PA5
  38. have hN0 : ~(x1 = 0)
  39. intro hx10
  40. apply hn0
  41. trans g * x1
  42. exact hnfactor_witness
  43. rewrite hx10
  44. apply PA5
  45. have hcop : forall hmi_divisor_main_cofactors. (exists hmi_left_factor_main_cofactors. x = hmi_divisor_main_cofactors * hmi_left_factor_main_cofactors) -> (exists hmi_right_factor_main_cofactors. x1 = hmi_divisor_main_cofactors * hmi_right_factor_main_cofactors) -> hmi_divisor_main_cofactors = 1
  46. specialize is_gcd_quotients_coprime_nonzero g
  47. specialize is_gcd_quotients_coprime_nonzero m
  48. specialize is_gcd_quotients_coprime_nonzero n
  49. specialize is_gcd_quotients_coprime_nonzero x
  50. specialize is_gcd_quotients_coprime_nonzero x1
  51. apply is_gcd_quotients_coprime_nonzero
  52. exact hgcd
  53. exact hg0
  54. exact hmfactor_witness
  55. exact hnfactor_witness
  56. have hrem : exists A B r. ((a = g * A + r /\ b = g * B + r) /\ exists h. h + S r = g)
  57. specialize mod_eq_common_remainder_decomposition g
  58. specialize mod_eq_common_remainder_decomposition a
  59. specialize mod_eq_common_remainder_decomposition b
  60. apply mod_eq_common_remainder_decomposition
  61. exact hg0
  62. exact hcompat
  63. cases hrem
  64. cases hrem_witness
  65. cases hrem_witness_witness
  66. cases hrem_witness_witness_witness
  67. cases hrem_witness_witness_witness_left
  68. specialize crt_scaled_common_remainder_lift g
  69. specialize crt_scaled_common_remainder_lift m
  70. specialize crt_scaled_common_remainder_lift n
  71. specialize crt_scaled_common_remainder_lift a
  72. specialize crt_scaled_common_remainder_lift b
  73. specialize crt_scaled_common_remainder_lift x
  74. specialize crt_scaled_common_remainder_lift x1
  75. specialize crt_scaled_common_remainder_lift x2
  76. specialize crt_scaled_common_remainder_lift x3
  77. specialize crt_scaled_common_remainder_lift x4
  78. apply crt_scaled_common_remainder_lift
  79. exact hmfactor_witness
  80. exact hnfactor_witness
  81. exact hrem_witness_witness_witness_left_left
  82. exact hrem_witness_witness_witness_left_right
  83. exact hM0
  84. exact hN0
  85. exact hcop
generalized_binary_crt_sufficient_zero_left · unchanged support, not a new admission
forall g n a b. ((((exists hage_left_factor_zero_left_gcd. 0 = g * hage_left_factor_zero_left_gcd) /\ (exists hage_right_factor_zero_left_gcd. n = g * hage_right_factor_zero_left_gcd)) /\ forall hage_divisor_zero_left_gcd. (exists hage_common_left_zero_left_gcd. 0 = hage_divisor_zero_left_gcd * hage_common_left_zero_left_gcd) -> (exists hage_common_right_zero_left_gcd. n = hage_divisor_zero_left_gcd * hage_common_right_zero_left_gcd) -> exists hage_greatest_factor_zero_left_gcd. g = hage_divisor_zero_left_gcd * hage_greatest_factor_zero_left_gcd)) -> (exists hgcrt_mod_left_zero_left_compatibility hgcrt_mod_right_zero_left_compatibility. a + g * hgcrt_mod_left_zero_left_compatibility = b + g * hgcrt_mod_right_zero_left_compatibility) -> exists x. (((exists hgcrt_mod_left_zero_left_solution_left hgcrt_mod_right_zero_left_solution_left. x + 0 * hgcrt_mod_left_zero_left_solution_left = a + 0 * hgcrt_mod_right_zero_left_solution_left) /\ (exists hgcrt_mod_left_zero_left_solution_right hgcrt_mod_right_zero_left_solution_right. x + n * hgcrt_mod_left_zero_left_solution_right = b + n * hgcrt_mod_right_zero_left_solution_right)))
  1. intro g
  2. intro n
  3. intro a
  4. intro b
  5. intro hg
  6. intro hab
  7. have hsym : (((exists hage_left_factor_zero_left_gcd_swapped. n = g * hage_left_factor_zero_left_gcd_swapped) /\ (exists hage_right_factor_zero_left_gcd_swapped. 0 = g * hage_right_factor_zero_left_gcd_swapped)) /\ forall hage_divisor_zero_left_gcd_swapped. (exists hage_common_left_zero_left_gcd_swapped. n = hage_divisor_zero_left_gcd_swapped * hage_common_left_zero_left_gcd_swapped) -> (exists hage_common_right_zero_left_gcd_swapped. 0 = hage_divisor_zero_left_gcd_swapped * hage_common_right_zero_left_gcd_swapped) -> exists hage_greatest_factor_zero_left_gcd_swapped. g = hage_divisor_zero_left_gcd_swapped * hage_greatest_factor_zero_left_gcd_swapped)
  8. specialize is_gcd_symm g
  9. specialize is_gcd_symm 0
  10. specialize is_gcd_symm n
  11. apply is_gcd_symm
  12. exact hg
  13. have hn : (((exists hage_left_factor_zero_left_gcd_base. n = n * hage_left_factor_zero_left_gcd_base) /\ (exists hage_right_factor_zero_left_gcd_base. 0 = n * hage_right_factor_zero_left_gcd_base)) /\ forall hage_divisor_zero_left_gcd_base. (exists hage_common_left_zero_left_gcd_base. n = hage_divisor_zero_left_gcd_base * hage_common_left_zero_left_gcd_base) -> (exists hage_common_right_zero_left_gcd_base. 0 = hage_divisor_zero_left_gcd_base * hage_common_right_zero_left_gcd_base) -> exists hage_greatest_factor_zero_left_gcd_base. n = hage_divisor_zero_left_gcd_base * hage_greatest_factor_zero_left_gcd_base)
  14. specialize is_gcd_zero_right n
  15. exact is_gcd_zero_right
  16. have hgn : g = n
  17. specialize is_gcd_unique g
  18. specialize is_gcd_unique n
  19. specialize is_gcd_unique n
  20. specialize is_gcd_unique 0
  21. apply is_gcd_unique
  22. exact hsym
  23. exact hn
  24. rewrite hgn at hab
  25. rewrite hgn at hab
  26. exists a
  27. split
  28. specialize mod_eq_refl 0
  29. specialize mod_eq_refl a
  30. exact mod_eq_refl
  31. exact hab
generalized_binary_crt_sufficient_zero_right · unchanged support, not a new admission
forall g m a b. ((((exists hage_left_factor_zero_right_gcd. m = g * hage_left_factor_zero_right_gcd) /\ (exists hage_right_factor_zero_right_gcd. 0 = g * hage_right_factor_zero_right_gcd)) /\ forall hage_divisor_zero_right_gcd. (exists hage_common_left_zero_right_gcd. m = hage_divisor_zero_right_gcd * hage_common_left_zero_right_gcd) -> (exists hage_common_right_zero_right_gcd. 0 = hage_divisor_zero_right_gcd * hage_common_right_zero_right_gcd) -> exists hage_greatest_factor_zero_right_gcd. g = hage_divisor_zero_right_gcd * hage_greatest_factor_zero_right_gcd)) -> (exists hgcrt_mod_left_zero_right_compatibility hgcrt_mod_right_zero_right_compatibility. a + g * hgcrt_mod_left_zero_right_compatibility = b + g * hgcrt_mod_right_zero_right_compatibility) -> exists x. (((exists hgcrt_mod_left_zero_right_solution_left hgcrt_mod_right_zero_right_solution_left. x + m * hgcrt_mod_left_zero_right_solution_left = a + m * hgcrt_mod_right_zero_right_solution_left) /\ (exists hgcrt_mod_left_zero_right_solution_right hgcrt_mod_right_zero_right_solution_right. x + 0 * hgcrt_mod_left_zero_right_solution_right = b + 0 * hgcrt_mod_right_zero_right_solution_right)))
  1. intro g
  2. intro m
  3. intro a
  4. intro b
  5. intro hg
  6. intro hab
  7. have hm : (((exists hage_left_factor_zero_right_gcd_base. m = m * hage_left_factor_zero_right_gcd_base) /\ (exists hage_right_factor_zero_right_gcd_base. 0 = m * hage_right_factor_zero_right_gcd_base)) /\ forall hage_divisor_zero_right_gcd_base. (exists hage_common_left_zero_right_gcd_base. m = hage_divisor_zero_right_gcd_base * hage_common_left_zero_right_gcd_base) -> (exists hage_common_right_zero_right_gcd_base. 0 = hage_divisor_zero_right_gcd_base * hage_common_right_zero_right_gcd_base) -> exists hage_greatest_factor_zero_right_gcd_base. m = hage_divisor_zero_right_gcd_base * hage_greatest_factor_zero_right_gcd_base)
  8. specialize is_gcd_zero_right m
  9. exact is_gcd_zero_right
  10. have hgm : g = m
  11. specialize is_gcd_unique g
  12. specialize is_gcd_unique m
  13. specialize is_gcd_unique m
  14. specialize is_gcd_unique 0
  15. apply is_gcd_unique
  16. exact hg
  17. exact hm
  18. rewrite hgm at hab
  19. rewrite hgm at hab
  20. exists b
  21. split
  22. specialize mod_eq_symm m
  23. specialize mod_eq_symm a
  24. specialize mod_eq_symm b
  25. apply mod_eq_symm
  26. exact hab
  27. specialize mod_eq_refl 0
  28. specialize mod_eq_refl b
  29. exact mod_eq_refl
generalized_binary_crt_sufficient · unchanged support, not a new admission
forall g m n a b. ((((exists hag_left_factor_total_sufficiency_gcd. m = g * hag_left_factor_total_sufficiency_gcd) /\ (exists hag_right_factor_total_sufficiency_gcd. n = g * hag_right_factor_total_sufficiency_gcd)) /\ forall hag_divisor_total_sufficiency_gcd. (exists hag_common_left_total_sufficiency_gcd. m = hag_divisor_total_sufficiency_gcd * hag_common_left_total_sufficiency_gcd) -> (exists hag_common_right_total_sufficiency_gcd. n = hag_divisor_total_sufficiency_gcd * hag_common_right_total_sufficiency_gcd) -> exists hag_greatest_factor_total_sufficiency_gcd. g = hag_divisor_total_sufficiency_gcd * hag_greatest_factor_total_sufficiency_gcd)) -> (exists hgcrt_mod_left_total_sufficiency_compatibility hgcrt_mod_right_total_sufficiency_compatibility. a + g * hgcrt_mod_left_total_sufficiency_compatibility = b + g * hgcrt_mod_right_total_sufficiency_compatibility) -> exists x. (((exists hgcrt_mod_left_total_sufficiency_solution_left hgcrt_mod_right_total_sufficiency_solution_left. x + m * hgcrt_mod_left_total_sufficiency_solution_left = a + m * hgcrt_mod_right_total_sufficiency_solution_left) /\ (exists hgcrt_mod_left_total_sufficiency_solution_right hgcrt_mod_right_total_sufficiency_solution_right. x + n * hgcrt_mod_left_total_sufficiency_solution_right = b + n * hgcrt_mod_right_total_sufficiency_solution_right)))
  1. intro g
  2. intro m
  3. intro n
  4. intro a
  5. intro b
  6. intro hg
  7. intro hab
  8. have hmzero : m = 0 \/ ~(m = 0)
  9. specialize eq_decidable m
  10. specialize eq_decidable 0
  11. exact eq_decidable
  12. cases hmzero
  13. rewrite hmzero_left at hg
  14. rewrite hmzero_left at hg
  15. rewrite hmzero_left
  16. rewrite hmzero_left
  17. specialize generalized_binary_crt_sufficient_zero_left g
  18. specialize generalized_binary_crt_sufficient_zero_left n
  19. specialize generalized_binary_crt_sufficient_zero_left a
  20. specialize generalized_binary_crt_sufficient_zero_left b
  21. apply generalized_binary_crt_sufficient_zero_left
  22. exact hg
  23. exact hab
  24. have hnzero : n = 0 \/ ~(n = 0)
  25. specialize eq_decidable n
  26. specialize eq_decidable 0
  27. exact eq_decidable
  28. cases hnzero
  29. rewrite hnzero_left at hg
  30. rewrite hnzero_left at hg
  31. rewrite hnzero_left
  32. rewrite hnzero_left
  33. specialize generalized_binary_crt_sufficient_zero_right g
  34. specialize generalized_binary_crt_sufficient_zero_right m
  35. specialize generalized_binary_crt_sufficient_zero_right a
  36. specialize generalized_binary_crt_sufficient_zero_right b
  37. apply generalized_binary_crt_sufficient_zero_right
  38. exact hg
  39. exact hab
  40. specialize generalized_binary_crt_sufficient_nonzero g
  41. specialize generalized_binary_crt_sufficient_nonzero m
  42. specialize generalized_binary_crt_sufficient_nonzero n
  43. specialize generalized_binary_crt_sufficient_nonzero a
  44. specialize generalized_binary_crt_sufficient_nonzero b
  45. apply generalized_binary_crt_sufficient_nonzero
  46. exact hmzero_right
  47. exact hnzero_right
  48. exact hg
  49. exact hab
beta_product_pointwise_scale_mod · unchanged support, not a new admission
forall m a b c z d l P Q A. (forall fsp_index_pointwise fsp_source_pointwise fsp_target_pointwise. (exists fsp_gap_pointwise. fsp_gap_pointwise + S fsp_index_pointwise = l) -> (((exists fsp_source_height_pointwise. fsp_source_height_pointwise + S (fsp_source_pointwise) = S ((S (fsp_index_pointwise)) * c)) /\ exists fsp_source_quotient_pointwise. b = fsp_source_quotient_pointwise * S ((S (fsp_index_pointwise)) * c) + (fsp_source_pointwise))) -> (((exists fsp_target_height_pointwise. fsp_target_height_pointwise + S (fsp_target_pointwise) = S ((S (fsp_index_pointwise)) * d)) /\ exists fsp_target_quotient_pointwise. z = fsp_target_quotient_pointwise * S ((S (fsp_index_pointwise)) * d) + (fsp_target_pointwise))) -> (exists fsp_mod_left_pointwise fsp_mod_right_pointwise. a * fsp_source_pointwise + m * fsp_mod_left_pointwise = fsp_target_pointwise + m * fsp_mod_right_pointwise)) -> (exists ff_u_source ff_v_source. ((((exists ff_h_source_start. ff_h_source_start + S (1) = S ((S (0)) * ff_v_source)) /\ exists ff_q_source_start. ff_u_source = ff_q_source_start * S ((S (0)) * ff_v_source) + (1))) /\ ((((exists ff_h_source_terminal. ff_h_source_terminal + S (P) = S ((S (l)) * ff_v_source)) /\ exists ff_q_source_terminal. ff_u_source = ff_q_source_terminal * S ((S (l)) * ff_v_source) + (P))) /\ forall ff_i_source. (exists ff_lt_source_bound. ff_lt_source_bound + S ff_i_source = l) -> exists ff_p_source ff_r_source ff_s_source. ((((exists ff_h_source_factor. ff_h_source_factor + S (ff_p_source) = S ((S (ff_i_source)) * c)) /\ exists ff_q_source_factor. b = ff_q_source_factor * S ((S (ff_i_source)) * c) + (ff_p_source))) /\ ((((exists ff_h_source_partial. ff_h_source_partial + S (ff_r_source) = S ((S (ff_i_source)) * ff_v_source)) /\ exists ff_q_source_partial. ff_u_source = ff_q_source_partial * S ((S (ff_i_source)) * ff_v_source) + (ff_r_source))) /\ ((((exists ff_h_source_successor. ff_h_source_successor + S (ff_s_source) = S ((S (S ff_i_source)) * ff_v_source)) /\ exists ff_q_source_successor. ff_u_source = ff_q_source_successor * S ((S (S ff_i_source)) * ff_v_source) + (ff_s_source))) /\ ff_s_source = ff_r_source * ff_p_source)))))) -> (exists ff_u_target ff_v_target. ((((exists ff_h_target_start. ff_h_target_start + S (1) = S ((S (0)) * ff_v_target)) /\ exists ff_q_target_start. ff_u_target = ff_q_target_start * S ((S (0)) * ff_v_target) + (1))) /\ ((((exists ff_h_target_terminal. ff_h_target_terminal + S (Q) = S ((S (l)) * ff_v_target)) /\ exists ff_q_target_terminal. ff_u_target = ff_q_target_terminal * S ((S (l)) * ff_v_target) + (Q))) /\ forall ff_i_target. (exists ff_lt_target_bound. ff_lt_target_bound + S ff_i_target = l) -> exists ff_p_target ff_r_target ff_s_target. ((((exists ff_h_target_factor. ff_h_target_factor + S (ff_p_target) = S ((S (ff_i_target)) * d)) /\ exists ff_q_target_factor. z = ff_q_target_factor * S ((S (ff_i_target)) * d) + (ff_p_target))) /\ ((((exists ff_h_target_partial. ff_h_target_partial + S (ff_r_target) = S ((S (ff_i_target)) * ff_v_target)) /\ exists ff_q_target_partial. ff_u_target = ff_q_target_partial * S ((S (ff_i_target)) * ff_v_target) + (ff_r_target))) /\ ((((exists ff_h_target_successor. ff_h_target_successor + S (ff_s_target) = S ((S (S ff_i_target)) * ff_v_target)) /\ exists ff_q_target_successor. ff_u_target = ff_q_target_successor * S ((S (S ff_i_target)) * ff_v_target) + (ff_s_target))) /\ ff_s_target = ff_r_target * ff_p_target)))))) -> (exists ff_b_scale_power ff_c_scale_power. ((forall ff_i_scale_power_repeat. (exists ff_lt_scale_power_repeat_bound. ff_lt_scale_power_repeat_bound + S ff_i_scale_power_repeat = l) -> (((exists ff_h_scale_power_repeat_decoded. ff_h_scale_power_repeat_decoded + S (a) = S ((S (ff_i_scale_power_repeat)) * ff_c_scale_power)) /\ exists ff_q_scale_power_repeat_decoded. ff_b_scale_power = ff_q_scale_power_repeat_decoded * S ((S (ff_i_scale_power_repeat)) * ff_c_scale_power) + (a)))) /\ (exists ff_u_scale_power_product ff_v_scale_power_product. ((((exists ff_h_scale_power_product_start. ff_h_scale_power_product_start + S (1) = S ((S (0)) * ff_v_scale_power_product)) /\ exists ff_q_scale_power_product_start. ff_u_scale_power_product = ff_q_scale_power_product_start * S ((S (0)) * ff_v_scale_power_product) + (1))) /\ ((((exists ff_h_scale_power_product_terminal. ff_h_scale_power_product_terminal + S (A) = S ((S (l)) * ff_v_scale_power_product)) /\ exists ff_q_scale_power_product_terminal. ff_u_scale_power_product = ff_q_scale_power_product_terminal * S ((S (l)) * ff_v_scale_power_product) + (A))) /\ forall ff_i_scale_power_product. (exists ff_lt_scale_power_product_bound. ff_lt_scale_power_product_bound + S ff_i_scale_power_product = l) -> exists ff_p_scale_power_product ff_r_scale_power_product ff_s_scale_power_product. ((((exists ff_h_scale_power_product_factor. ff_h_scale_power_product_factor + S (ff_p_scale_power_product) = S ((S (ff_i_scale_power_product)) * ff_c_scale_power)) /\ exists ff_q_scale_power_product_factor. ff_b_scale_power = ff_q_scale_power_product_factor * S ((S (ff_i_scale_power_product)) * ff_c_scale_power) + (ff_p_scale_power_product))) /\ ((((exists ff_h_scale_power_product_partial. ff_h_scale_power_product_partial + S (ff_r_scale_power_product) = S ((S (ff_i_scale_power_product)) * ff_v_scale_power_product)) /\ exists ff_q_scale_power_product_partial. ff_u_scale_power_product = ff_q_scale_power_product_partial * S ((S (ff_i_scale_power_product)) * ff_v_scale_power_product) + (ff_r_scale_power_product))) /\ ((((exists ff_h_scale_power_product_successor. ff_h_scale_power_product_successor + S (ff_s_scale_power_product) = S ((S (S ff_i_scale_power_product)) * ff_v_scale_power_product)) /\ exists ff_q_scale_power_product_successor. ff_u_scale_power_product = ff_q_scale_power_product_successor * S ((S (S ff_i_scale_power_product)) * ff_v_scale_power_product) + (ff_s_scale_power_product))) /\ ff_s_scale_power_product = ff_r_scale_power_product * ff_p_scale_power_product)))))))) -> (exists fsp_product_mod_left_result fsp_product_mod_right_result. (A * P) + m * fsp_product_mod_left_result = Q + m * fsp_product_mod_right_result)
  1. intro m
  2. intro a
  3. intro b
  4. intro c
  5. intro z
  6. intro d
  7. induction l
  8. intro P
  9. intro Q
  10. intro A
  11. intro hpw
  12. intro hP
  13. intro hQ
  14. intro hA
  15. have hP1 : P = 1
  16. specialize beta_product_zero b
  17. specialize beta_product_zero c
  18. specialize beta_product_zero P
  19. apply beta_product_zero
  20. exact hP
  21. have hQ1 : Q = 1
  22. specialize beta_product_zero z
  23. specialize beta_product_zero d
  24. specialize beta_product_zero Q
  25. apply beta_product_zero
  26. exact hQ
  27. have hA1 : A = 1
  28. specialize pow_zero a
  29. specialize pow_zero 0
  30. specialize pow_zero A
  31. apply pow_zero
  32. refl
  33. exact hA
  34. rewrite hA1
  35. rewrite hP1
  36. rewrite hQ1
  37. have hone : 1 * 1 = 1
  38. specialize one_mul 1
  39. exact one_mul
  40. rewrite hone
  41. specialize mod_eq_refl m
  42. specialize mod_eq_refl 1
  43. exact mod_eq_refl
  44. intro P
  45. intro Q
  46. intro A
  47. intro hpw
  48. intro hP
  49. intro hQ
  50. intro hA
  51. have hPd : exists fsp_decomposition_factor_source_decomposition fsp_decomposition_prefix_source_decomposition. (((exists ff_h_source_decomposition_factor. ff_h_source_decomposition_factor + S (fsp_decomposition_factor_source_decomposition) = S ((S (l)) * c)) /\ exists ff_q_source_decomposition_factor. b = ff_q_source_decomposition_factor * S ((S (l)) * c) + (fsp_decomposition_factor_source_decomposition))) /\ ((exists ff_u_source_decomposition_prefix ff_v_source_decomposition_prefix. ((((exists ff_h_source_decomposition_prefix_start. ff_h_source_decomposition_prefix_start + S (1) = S ((S (0)) * ff_v_source_decomposition_prefix)) /\ exists ff_q_source_decomposition_prefix_start. ff_u_source_decomposition_prefix = ff_q_source_decomposition_prefix_start * S ((S (0)) * ff_v_source_decomposition_prefix) + (1))) /\ ((((exists ff_h_source_decomposition_prefix_terminal. ff_h_source_decomposition_prefix_terminal + S (fsp_decomposition_prefix_source_decomposition) = S ((S (l)) * ff_v_source_decomposition_prefix)) /\ exists ff_q_source_decomposition_prefix_terminal. ff_u_source_decomposition_prefix = ff_q_source_decomposition_prefix_terminal * S ((S (l)) * ff_v_source_decomposition_prefix) + (fsp_decomposition_prefix_source_decomposition))) /\ forall ff_i_source_decomposition_prefix. (exists ff_lt_source_decomposition_prefix_bound. ff_lt_source_decomposition_prefix_bound + S ff_i_source_decomposition_prefix = l) -> exists ff_p_source_decomposition_prefix ff_r_source_decomposition_prefix ff_s_source_decomposition_prefix. ((((exists ff_h_source_decomposition_prefix_factor. ff_h_source_decomposition_prefix_factor + S (ff_p_source_decomposition_prefix) = S ((S (ff_i_source_decomposition_prefix)) * c)) /\ exists ff_q_source_decomposition_prefix_factor. b = ff_q_source_decomposition_prefix_factor * S ((S (ff_i_source_decomposition_prefix)) * c) + (ff_p_source_decomposition_prefix))) /\ ((((exists ff_h_source_decomposition_prefix_partial. ff_h_source_decomposition_prefix_partial + S (ff_r_source_decomposition_prefix) = S ((S (ff_i_source_decomposition_prefix)) * ff_v_source_decomposition_prefix)) /\ exists ff_q_source_decomposition_prefix_partial. ff_u_source_decomposition_prefix = ff_q_source_decomposition_prefix_partial * S ((S (ff_i_source_decomposition_prefix)) * ff_v_source_decomposition_prefix) + (ff_r_source_decomposition_prefix))) /\ ((((exists ff_h_source_decomposition_prefix_successor. ff_h_source_decomposition_prefix_successor + S (ff_s_source_decomposition_prefix) = S ((S (S ff_i_source_decomposition_prefix)) * ff_v_source_decomposition_prefix)) /\ exists ff_q_source_decomposition_prefix_successor. ff_u_source_decomposition_prefix = ff_q_source_decomposition_prefix_successor * S ((S (S ff_i_source_decomposition_prefix)) * ff_v_source_decomposition_prefix) + (ff_s_source_decomposition_prefix))) /\ ff_s_source_decomposition_prefix = ff_r_source_decomposition_prefix * ff_p_source_decomposition_prefix)))))) /\ P = fsp_decomposition_prefix_source_decomposition * fsp_decomposition_factor_source_decomposition)
  52. specialize beta_product_succ_decompose b
  53. specialize beta_product_succ_decompose c
  54. specialize beta_product_succ_decompose l
  55. specialize beta_product_succ_decompose P
  56. apply beta_product_succ_decompose
  57. exact hP
  58. cases hPd
  59. cases hPd_witness
  60. cases hPd_witness_witness
  61. cases hPd_witness_witness_right
  62. have hQd : exists fsp_decomposition_factor_target_decomposition fsp_decomposition_prefix_target_decomposition. (((exists ff_h_target_decomposition_factor. ff_h_target_decomposition_factor + S (fsp_decomposition_factor_target_decomposition) = S ((S (l)) * d)) /\ exists ff_q_target_decomposition_factor. z = ff_q_target_decomposition_factor * S ((S (l)) * d) + (fsp_decomposition_factor_target_decomposition))) /\ ((exists ff_u_target_decomposition_prefix ff_v_target_decomposition_prefix. ((((exists ff_h_target_decomposition_prefix_start. ff_h_target_decomposition_prefix_start + S (1) = S ((S (0)) * ff_v_target_decomposition_prefix)) /\ exists ff_q_target_decomposition_prefix_start. ff_u_target_decomposition_prefix = ff_q_target_decomposition_prefix_start * S ((S (0)) * ff_v_target_decomposition_prefix) + (1))) /\ ((((exists ff_h_target_decomposition_prefix_terminal. ff_h_target_decomposition_prefix_terminal + S (fsp_decomposition_prefix_target_decomposition) = S ((S (l)) * ff_v_target_decomposition_prefix)) /\ exists ff_q_target_decomposition_prefix_terminal. ff_u_target_decomposition_prefix = ff_q_target_decomposition_prefix_terminal * S ((S (l)) * ff_v_target_decomposition_prefix) + (fsp_decomposition_prefix_target_decomposition))) /\ forall ff_i_target_decomposition_prefix. (exists ff_lt_target_decomposition_prefix_bound. ff_lt_target_decomposition_prefix_bound + S ff_i_target_decomposition_prefix = l) -> exists ff_p_target_decomposition_prefix ff_r_target_decomposition_prefix ff_s_target_decomposition_prefix. ((((exists ff_h_target_decomposition_prefix_factor. ff_h_target_decomposition_prefix_factor + S (ff_p_target_decomposition_prefix) = S ((S (ff_i_target_decomposition_prefix)) * d)) /\ exists ff_q_target_decomposition_prefix_factor. z = ff_q_target_decomposition_prefix_factor * S ((S (ff_i_target_decomposition_prefix)) * d) + (ff_p_target_decomposition_prefix))) /\ ((((exists ff_h_target_decomposition_prefix_partial. ff_h_target_decomposition_prefix_partial + S (ff_r_target_decomposition_prefix) = S ((S (ff_i_target_decomposition_prefix)) * ff_v_target_decomposition_prefix)) /\ exists ff_q_target_decomposition_prefix_partial. ff_u_target_decomposition_prefix = ff_q_target_decomposition_prefix_partial * S ((S (ff_i_target_decomposition_prefix)) * ff_v_target_decomposition_prefix) + (ff_r_target_decomposition_prefix))) /\ ((((exists ff_h_target_decomposition_prefix_successor. ff_h_target_decomposition_prefix_successor + S (ff_s_target_decomposition_prefix) = S ((S (S ff_i_target_decomposition_prefix)) * ff_v_target_decomposition_prefix)) /\ exists ff_q_target_decomposition_prefix_successor. ff_u_target_decomposition_prefix = ff_q_target_decomposition_prefix_successor * S ((S (S ff_i_target_decomposition_prefix)) * ff_v_target_decomposition_prefix) + (ff_s_target_decomposition_prefix))) /\ ff_s_target_decomposition_prefix = ff_r_target_decomposition_prefix * ff_p_target_decomposition_prefix)))))) /\ Q = fsp_decomposition_prefix_target_decomposition * fsp_decomposition_factor_target_decomposition)
  63. specialize beta_product_succ_decompose z
  64. specialize beta_product_succ_decompose d
  65. specialize beta_product_succ_decompose l
  66. specialize beta_product_succ_decompose Q
  67. apply beta_product_succ_decompose
  68. exact hQ
  69. cases hQd
  70. cases hQd_witness
  71. cases hQd_witness_witness
  72. cases hQd_witness_witness_right
  73. have hAd : exists fsp_power_prefix_power_decomposition. (exists ff_b_power_decomposition_relation ff_c_power_decomposition_relation. ((forall ff_i_power_decomposition_relation_repeat. (exists ff_lt_power_decomposition_relation_repeat_bound. ff_lt_power_decomposition_relation_repeat_bound + S ff_i_power_decomposition_relation_repeat = l) -> (((exists ff_h_power_decomposition_relation_repeat_decoded. ff_h_power_decomposition_relation_repeat_decoded + S (a) = S ((S (ff_i_power_decomposition_relation_repeat)) * ff_c_power_decomposition_relation)) /\ exists ff_q_power_decomposition_relation_repeat_decoded. ff_b_power_decomposition_relation = ff_q_power_decomposition_relation_repeat_decoded * S ((S (ff_i_power_decomposition_relation_repeat)) * ff_c_power_decomposition_relation) + (a)))) /\ (exists ff_u_power_decomposition_relation_product ff_v_power_decomposition_relation_product. ((((exists ff_h_power_decomposition_relation_product_start. ff_h_power_decomposition_relation_product_start + S (1) = S ((S (0)) * ff_v_power_decomposition_relation_product)) /\ exists ff_q_power_decomposition_relation_product_start. ff_u_power_decomposition_relation_product = ff_q_power_decomposition_relation_product_start * S ((S (0)) * ff_v_power_decomposition_relation_product) + (1))) /\ ((((exists ff_h_power_decomposition_relation_product_terminal. ff_h_power_decomposition_relation_product_terminal + S (fsp_power_prefix_power_decomposition) = S ((S (l)) * ff_v_power_decomposition_relation_product)) /\ exists ff_q_power_decomposition_relation_product_terminal. ff_u_power_decomposition_relation_product = ff_q_power_decomposition_relation_product_terminal * S ((S (l)) * ff_v_power_decomposition_relation_product) + (fsp_power_prefix_power_decomposition))) /\ forall ff_i_power_decomposition_relation_product. (exists ff_lt_power_decomposition_relation_product_bound. ff_lt_power_decomposition_relation_product_bound + S ff_i_power_decomposition_relation_product = l) -> exists ff_p_power_decomposition_relation_product ff_r_power_decomposition_relation_product ff_s_power_decomposition_relation_product. ((((exists ff_h_power_decomposition_relation_product_factor. ff_h_power_decomposition_relation_product_factor + S (ff_p_power_decomposition_relation_product) = S ((S (ff_i_power_decomposition_relation_product)) * ff_c_power_decomposition_relation)) /\ exists ff_q_power_decomposition_relation_product_factor. ff_b_power_decomposition_relation = ff_q_power_decomposition_relation_product_factor * S ((S (ff_i_power_decomposition_relation_product)) * ff_c_power_decomposition_relation) + (ff_p_power_decomposition_relation_product))) /\ ((((exists ff_h_power_decomposition_relation_product_partial. ff_h_power_decomposition_relation_product_partial + S (ff_r_power_decomposition_relation_product) = S ((S (ff_i_power_decomposition_relation_product)) * ff_v_power_decomposition_relation_product)) /\ exists ff_q_power_decomposition_relation_product_partial. ff_u_power_decomposition_relation_product = ff_q_power_decomposition_relation_product_partial * S ((S (ff_i_power_decomposition_relation_product)) * ff_v_power_decomposition_relation_product) + (ff_r_power_decomposition_relation_product))) /\ ((((exists ff_h_power_decomposition_relation_product_successor. ff_h_power_decomposition_relation_product_successor + S (ff_s_power_decomposition_relation_product) = S ((S (S ff_i_power_decomposition_relation_product)) * ff_v_power_decomposition_relation_product)) /\ exists ff_q_power_decomposition_relation_product_successor. ff_u_power_decomposition_relation_product = ff_q_power_decomposition_relation_product_successor * S ((S (S ff_i_power_decomposition_relation_product)) * ff_v_power_decomposition_relation_product) + (ff_s_power_decomposition_relation_product))) /\ ff_s_power_decomposition_relation_product = ff_r_power_decomposition_relation_product * ff_p_power_decomposition_relation_product)))))))) /\ A = fsp_power_prefix_power_decomposition * a
  74. specialize pow_successor_decompose a
  75. specialize pow_successor_decompose l
  76. specialize pow_successor_decompose (S l)
  77. specialize pow_successor_decompose A
  78. apply pow_successor_decompose
  79. refl
  80. exact hA
  81. cases hAd
  82. cases hAd_witness
  83. have hpw_prefix : forall fsp_index_pointwise_prefix fsp_source_pointwise_prefix fsp_target_pointwise_prefix. (exists fsp_gap_pointwise_prefix. fsp_gap_pointwise_prefix + S fsp_index_pointwise_prefix = l) -> (((exists fsp_source_height_pointwise_prefix. fsp_source_height_pointwise_prefix + S (fsp_source_pointwise_prefix) = S ((S (fsp_index_pointwise_prefix)) * c)) /\ exists fsp_source_quotient_pointwise_prefix. b = fsp_source_quotient_pointwise_prefix * S ((S (fsp_index_pointwise_prefix)) * c) + (fsp_source_pointwise_prefix))) -> (((exists fsp_target_height_pointwise_prefix. fsp_target_height_pointwise_prefix + S (fsp_target_pointwise_prefix) = S ((S (fsp_index_pointwise_prefix)) * d)) /\ exists fsp_target_quotient_pointwise_prefix. z = fsp_target_quotient_pointwise_prefix * S ((S (fsp_index_pointwise_prefix)) * d) + (fsp_target_pointwise_prefix))) -> (exists fsp_mod_left_pointwise_prefix fsp_mod_right_pointwise_prefix. a * fsp_source_pointwise_prefix + m * fsp_mod_left_pointwise_prefix = fsp_target_pointwise_prefix + m * fsp_mod_right_pointwise_prefix)
  84. intro i
  85. intro v
  86. intro w
  87. intro hi
  88. intro hv
  89. intro hw
  90. specialize hpw i
  91. specialize hpw v
  92. specialize hpw w
  93. apply hpw
  94. specialize le_succ (S i)
  95. specialize le_succ l
  96. apply le_succ
  97. exact hi
  98. exact hv
  99. exact hw
  100. have hprefix : exists u v. (x4 * x1) + m * u = x3 + m * v
  101. specialize IH x1
  102. specialize IH x3
  103. specialize IH x4
  104. apply IH
  105. exact hpw_prefix
  106. exact hPd_witness_witness_right_left
  107. exact hQd_witness_witness_right_left
  108. exact hAd_witness_left
  109. have hentry : exists u v. (a * x) + m * u = x2 + m * v
  110. specialize hpw l
  111. specialize hpw x
  112. specialize hpw x2
  113. apply hpw
  114. specialize le_refl (S l)
  115. exact le_refl
  116. exact hPd_witness_witness_left
  117. exact hQd_witness_witness_left
  118. have hfold : exists u v. ((x4 * x1) * (a * x)) + m * u = (x3 * x2) + m * v
  119. specialize mod_eq_mul m
  120. specialize mod_eq_mul (x4 * x1)
  121. specialize mod_eq_mul x3
  122. specialize mod_eq_mul (a * x)
  123. specialize mod_eq_mul x2
  124. apply mod_eq_mul
  125. exact hprefix
  126. exact hentry
  127. have hshuffle : (x4 * a) * (x1 * x) = (x4 * x1) * (a * x)
  128. simp [mul_assoc, mul_comm]
  129. rewrite hAd_witness_right
  130. rewrite hPd_witness_witness_right_right
  131. rewrite hQd_witness_witness_right_right
  132. rewrite hshuffle
  133. exact hfold
beta_product_reindex_fixed_last · unchanged support, not a new admission
forall r s b c z d n p q. (forall fpr_i_fra fpr_j_fra fpr_x_fra. (exists fpr_h_fra. fpr_h_fra + S fpr_i_fra = S n) -> (((exists ff_h_fra_map. ff_h_fra_map + S (fpr_j_fra) = S ((S (fpr_i_fra)) * s)) /\ exists ff_q_fra_map. r = ff_q_fra_map * S ((S (fpr_i_fra)) * s) + (fpr_j_fra))) -> (((exists ff_h_fra_source. ff_h_fra_source + S (fpr_x_fra) = S ((S (fpr_j_fra)) * c)) /\ exists ff_q_fra_source. b = ff_q_fra_source * S ((S (fpr_j_fra)) * c) + (fpr_x_fra))) -> (((exists ff_h_fra_target. ff_h_fra_target + S (fpr_x_fra) = S ((S (fpr_i_fra)) * d)) /\ exists ff_q_fra_target. z = ff_q_fra_target * S ((S (fpr_i_fra)) * d) + (fpr_x_fra)))) -> (((exists ff_h_frm. ff_h_frm + S (n) = S ((S (n)) * s)) /\ exists ff_q_frm. r = ff_q_frm * S ((S (n)) * s) + (n))) -> (exists ff_u_frs ff_v_frs. ((((exists ff_h_frs_start. ff_h_frs_start + S (1) = S ((S (0)) * ff_v_frs)) /\ exists ff_q_frs_start. ff_u_frs = ff_q_frs_start * S ((S (0)) * ff_v_frs) + (1))) /\ ((((exists ff_h_frs_terminal. ff_h_frs_terminal + S (p) = S ((S (S n)) * ff_v_frs)) /\ exists ff_q_frs_terminal. ff_u_frs = ff_q_frs_terminal * S ((S (S n)) * ff_v_frs) + (p))) /\ forall ff_i_frs. (exists ff_lt_frs_bound. ff_lt_frs_bound + S ff_i_frs = S n) -> exists ff_p_frs ff_r_frs ff_s_frs. ((((exists ff_h_frs_factor. ff_h_frs_factor + S (ff_p_frs) = S ((S (ff_i_frs)) * c)) /\ exists ff_q_frs_factor. b = ff_q_frs_factor * S ((S (ff_i_frs)) * c) + (ff_p_frs))) /\ ((((exists ff_h_frs_partial. ff_h_frs_partial + S (ff_r_frs) = S ((S (ff_i_frs)) * ff_v_frs)) /\ exists ff_q_frs_partial. ff_u_frs = ff_q_frs_partial * S ((S (ff_i_frs)) * ff_v_frs) + (ff_r_frs))) /\ ((((exists ff_h_frs_successor. ff_h_frs_successor + S (ff_s_frs) = S ((S (S ff_i_frs)) * ff_v_frs)) /\ exists ff_q_frs_successor. ff_u_frs = ff_q_frs_successor * S ((S (S ff_i_frs)) * ff_v_frs) + (ff_s_frs))) /\ ff_s_frs = ff_r_frs * ff_p_frs)))))) -> (exists ff_u_frt ff_v_frt. ((((exists ff_h_frt_start. ff_h_frt_start + S (1) = S ((S (0)) * ff_v_frt)) /\ exists ff_q_frt_start. ff_u_frt = ff_q_frt_start * S ((S (0)) * ff_v_frt) + (1))) /\ ((((exists ff_h_frt_terminal. ff_h_frt_terminal + S (q) = S ((S (S n)) * ff_v_frt)) /\ exists ff_q_frt_terminal. ff_u_frt = ff_q_frt_terminal * S ((S (S n)) * ff_v_frt) + (q))) /\ forall ff_i_frt. (exists ff_lt_frt_bound. ff_lt_frt_bound + S ff_i_frt = S n) -> exists ff_p_frt ff_r_frt ff_s_frt. ((((exists ff_h_frt_factor. ff_h_frt_factor + S (ff_p_frt) = S ((S (ff_i_frt)) * d)) /\ exists ff_q_frt_factor. z = ff_q_frt_factor * S ((S (ff_i_frt)) * d) + (ff_p_frt))) /\ ((((exists ff_h_frt_partial. ff_h_frt_partial + S (ff_r_frt) = S ((S (ff_i_frt)) * ff_v_frt)) /\ exists ff_q_frt_partial. ff_u_frt = ff_q_frt_partial * S ((S (ff_i_frt)) * ff_v_frt) + (ff_r_frt))) /\ ((((exists ff_h_frt_successor. ff_h_frt_successor + S (ff_s_frt) = S ((S (S ff_i_frt)) * ff_v_frt)) /\ exists ff_q_frt_successor. ff_u_frt = ff_q_frt_successor * S ((S (S ff_i_frt)) * ff_v_frt) + (ff_s_frt))) /\ ff_s_frt = ff_r_frt * ff_p_frt)))))) -> (forall u v. (exists ff_u_fru ff_v_fru. ((((exists ff_h_fru_start. ff_h_fru_start + S (1) = S ((S (0)) * ff_v_fru)) /\ exists ff_q_fru_start. ff_u_fru = ff_q_fru_start * S ((S (0)) * ff_v_fru) + (1))) /\ ((((exists ff_h_fru_terminal. ff_h_fru_terminal + S (u) = S ((S (n)) * ff_v_fru)) /\ exists ff_q_fru_terminal. ff_u_fru = ff_q_fru_terminal * S ((S (n)) * ff_v_fru) + (u))) /\ forall ff_i_fru. (exists ff_lt_fru_bound. ff_lt_fru_bound + S ff_i_fru = n) -> exists ff_p_fru ff_r_fru ff_s_fru. ((((exists ff_h_fru_factor. ff_h_fru_factor + S (ff_p_fru) = S ((S (ff_i_fru)) * c)) /\ exists ff_q_fru_factor. b = ff_q_fru_factor * S ((S (ff_i_fru)) * c) + (ff_p_fru))) /\ ((((exists ff_h_fru_partial. ff_h_fru_partial + S (ff_r_fru) = S ((S (ff_i_fru)) * ff_v_fru)) /\ exists ff_q_fru_partial. ff_u_fru = ff_q_fru_partial * S ((S (ff_i_fru)) * ff_v_fru) + (ff_r_fru))) /\ ((((exists ff_h_fru_successor. ff_h_fru_successor + S (ff_s_fru) = S ((S (S ff_i_fru)) * ff_v_fru)) /\ exists ff_q_fru_successor. ff_u_fru = ff_q_fru_successor * S ((S (S ff_i_fru)) * ff_v_fru) + (ff_s_fru))) /\ ff_s_fru = ff_r_fru * ff_p_fru)))))) -> (exists ff_u_frv ff_v_frv. ((((exists ff_h_frv_start. ff_h_frv_start + S (1) = S ((S (0)) * ff_v_frv)) /\ exists ff_q_frv_start. ff_u_frv = ff_q_frv_start * S ((S (0)) * ff_v_frv) + (1))) /\ ((((exists ff_h_frv_terminal. ff_h_frv_terminal + S (v) = S ((S (n)) * ff_v_frv)) /\ exists ff_q_frv_terminal. ff_u_frv = ff_q_frv_terminal * S ((S (n)) * ff_v_frv) + (v))) /\ forall ff_i_frv. (exists ff_lt_frv_bound. ff_lt_frv_bound + S ff_i_frv = n) -> exists ff_p_frv ff_r_frv ff_s_frv. ((((exists ff_h_frv_factor. ff_h_frv_factor + S (ff_p_frv) = S ((S (ff_i_frv)) * d)) /\ exists ff_q_frv_factor. z = ff_q_frv_factor * S ((S (ff_i_frv)) * d) + (ff_p_frv))) /\ ((((exists ff_h_frv_partial. ff_h_frv_partial + S (ff_r_frv) = S ((S (ff_i_frv)) * ff_v_frv)) /\ exists ff_q_frv_partial. ff_u_frv = ff_q_frv_partial * S ((S (ff_i_frv)) * ff_v_frv) + (ff_r_frv))) /\ ((((exists ff_h_frv_successor. ff_h_frv_successor + S (ff_s_frv) = S ((S (S ff_i_frv)) * ff_v_frv)) /\ exists ff_q_frv_successor. ff_u_frv = ff_q_frv_successor * S ((S (S ff_i_frv)) * ff_v_frv) + (ff_s_frv))) /\ ff_s_frv = ff_r_frv * ff_p_frv)))))) -> u = v) -> p = q
  1. intro r
  2. intro s
  3. intro b
  4. intro c
  5. intro z
  6. intro d
  7. intro n
  8. intro p
  9. intro q
  10. intro haligned
  11. intro hmap_last
  12. intro hsource_product
  13. intro htarget_product
  14. intro hprefix_equal
  15. have hsource_decomp : exists a u. (((exists ff_h_fixed_reindex_source_last. ff_h_fixed_reindex_source_last + S (a) = S ((S (n)) * c)) /\ exists ff_q_fixed_reindex_source_last. b = ff_q_fixed_reindex_source_last * S ((S (n)) * c) + (a))) /\ ((exists ff_u_fixed_reindex_source_prefix_witness ff_v_fixed_reindex_source_prefix_witness. ((((exists ff_h_fixed_reindex_source_prefix_witness_start. ff_h_fixed_reindex_source_prefix_witness_start + S (1) = S ((S (0)) * ff_v_fixed_reindex_source_prefix_witness)) /\ exists ff_q_fixed_reindex_source_prefix_witness_start. ff_u_fixed_reindex_source_prefix_witness = ff_q_fixed_reindex_source_prefix_witness_start * S ((S (0)) * ff_v_fixed_reindex_source_prefix_witness) + (1))) /\ ((((exists ff_h_fixed_reindex_source_prefix_witness_terminal. ff_h_fixed_reindex_source_prefix_witness_terminal + S (u) = S ((S (n)) * ff_v_fixed_reindex_source_prefix_witness)) /\ exists ff_q_fixed_reindex_source_prefix_witness_terminal. ff_u_fixed_reindex_source_prefix_witness = ff_q_fixed_reindex_source_prefix_witness_terminal * S ((S (n)) * ff_v_fixed_reindex_source_prefix_witness) + (u))) /\ forall ff_i_fixed_reindex_source_prefix_witness. (exists ff_lt_fixed_reindex_source_prefix_witness_bound. ff_lt_fixed_reindex_source_prefix_witness_bound + S ff_i_fixed_reindex_source_prefix_witness = n) -> exists ff_p_fixed_reindex_source_prefix_witness ff_r_fixed_reindex_source_prefix_witness ff_s_fixed_reindex_source_prefix_witness. ((((exists ff_h_fixed_reindex_source_prefix_witness_factor. ff_h_fixed_reindex_source_prefix_witness_factor + S (ff_p_fixed_reindex_source_prefix_witness) = S ((S (ff_i_fixed_reindex_source_prefix_witness)) * c)) /\ exists ff_q_fixed_reindex_source_prefix_witness_factor. b = ff_q_fixed_reindex_source_prefix_witness_factor * S ((S (ff_i_fixed_reindex_source_prefix_witness)) * c) + (ff_p_fixed_reindex_source_prefix_witness))) /\ ((((exists ff_h_fixed_reindex_source_prefix_witness_partial. ff_h_fixed_reindex_source_prefix_witness_partial + S (ff_r_fixed_reindex_source_prefix_witness) = S ((S (ff_i_fixed_reindex_source_prefix_witness)) * ff_v_fixed_reindex_source_prefix_witness)) /\ exists ff_q_fixed_reindex_source_prefix_witness_partial. ff_u_fixed_reindex_source_prefix_witness = ff_q_fixed_reindex_source_prefix_witness_partial * S ((S (ff_i_fixed_reindex_source_prefix_witness)) * ff_v_fixed_reindex_source_prefix_witness) + (ff_r_fixed_reindex_source_prefix_witness))) /\ ((((exists ff_h_fixed_reindex_source_prefix_witness_successor. ff_h_fixed_reindex_source_prefix_witness_successor + S (ff_s_fixed_reindex_source_prefix_witness) = S ((S (S ff_i_fixed_reindex_source_prefix_witness)) * ff_v_fixed_reindex_source_prefix_witness)) /\ exists ff_q_fixed_reindex_source_prefix_witness_successor. ff_u_fixed_reindex_source_prefix_witness = ff_q_fixed_reindex_source_prefix_witness_successor * S ((S (S ff_i_fixed_reindex_source_prefix_witness)) * ff_v_fixed_reindex_source_prefix_witness) + (ff_s_fixed_reindex_source_prefix_witness))) /\ ff_s_fixed_reindex_source_prefix_witness = ff_r_fixed_reindex_source_prefix_witness * ff_p_fixed_reindex_source_prefix_witness)))))) /\ p = u * a)
  16. specialize beta_product_succ_decompose b
  17. specialize beta_product_succ_decompose c
  18. specialize beta_product_succ_decompose n
  19. specialize beta_product_succ_decompose p
  20. apply beta_product_succ_decompose
  21. exact hsource_product
  22. have htarget_decomp : exists a v. (((exists ff_h_fixed_reindex_target_last. ff_h_fixed_reindex_target_last + S (a) = S ((S (n)) * d)) /\ exists ff_q_fixed_reindex_target_last. z = ff_q_fixed_reindex_target_last * S ((S (n)) * d) + (a))) /\ ((exists ff_u_fixed_reindex_target_prefix_witness ff_v_fixed_reindex_target_prefix_witness. ((((exists ff_h_fixed_reindex_target_prefix_witness_start. ff_h_fixed_reindex_target_prefix_witness_start + S (1) = S ((S (0)) * ff_v_fixed_reindex_target_prefix_witness)) /\ exists ff_q_fixed_reindex_target_prefix_witness_start. ff_u_fixed_reindex_target_prefix_witness = ff_q_fixed_reindex_target_prefix_witness_start * S ((S (0)) * ff_v_fixed_reindex_target_prefix_witness) + (1))) /\ ((((exists ff_h_fixed_reindex_target_prefix_witness_terminal. ff_h_fixed_reindex_target_prefix_witness_terminal + S (v) = S ((S (n)) * ff_v_fixed_reindex_target_prefix_witness)) /\ exists ff_q_fixed_reindex_target_prefix_witness_terminal. ff_u_fixed_reindex_target_prefix_witness = ff_q_fixed_reindex_target_prefix_witness_terminal * S ((S (n)) * ff_v_fixed_reindex_target_prefix_witness) + (v))) /\ forall ff_i_fixed_reindex_target_prefix_witness. (exists ff_lt_fixed_reindex_target_prefix_witness_bound. ff_lt_fixed_reindex_target_prefix_witness_bound + S ff_i_fixed_reindex_target_prefix_witness = n) -> exists ff_p_fixed_reindex_target_prefix_witness ff_r_fixed_reindex_target_prefix_witness ff_s_fixed_reindex_target_prefix_witness. ((((exists ff_h_fixed_reindex_target_prefix_witness_factor. ff_h_fixed_reindex_target_prefix_witness_factor + S (ff_p_fixed_reindex_target_prefix_witness) = S ((S (ff_i_fixed_reindex_target_prefix_witness)) * d)) /\ exists ff_q_fixed_reindex_target_prefix_witness_factor. z = ff_q_fixed_reindex_target_prefix_witness_factor * S ((S (ff_i_fixed_reindex_target_prefix_witness)) * d) + (ff_p_fixed_reindex_target_prefix_witness))) /\ ((((exists ff_h_fixed_reindex_target_prefix_witness_partial. ff_h_fixed_reindex_target_prefix_witness_partial + S (ff_r_fixed_reindex_target_prefix_witness) = S ((S (ff_i_fixed_reindex_target_prefix_witness)) * ff_v_fixed_reindex_target_prefix_witness)) /\ exists ff_q_fixed_reindex_target_prefix_witness_partial. ff_u_fixed_reindex_target_prefix_witness = ff_q_fixed_reindex_target_prefix_witness_partial * S ((S (ff_i_fixed_reindex_target_prefix_witness)) * ff_v_fixed_reindex_target_prefix_witness) + (ff_r_fixed_reindex_target_prefix_witness))) /\ ((((exists ff_h_fixed_reindex_target_prefix_witness_successor. ff_h_fixed_reindex_target_prefix_witness_successor + S (ff_s_fixed_reindex_target_prefix_witness) = S ((S (S ff_i_fixed_reindex_target_prefix_witness)) * ff_v_fixed_reindex_target_prefix_witness)) /\ exists ff_q_fixed_reindex_target_prefix_witness_successor. ff_u_fixed_reindex_target_prefix_witness = ff_q_fixed_reindex_target_prefix_witness_successor * S ((S (S ff_i_fixed_reindex_target_prefix_witness)) * ff_v_fixed_reindex_target_prefix_witness) + (ff_s_fixed_reindex_target_prefix_witness))) /\ ff_s_fixed_reindex_target_prefix_witness = ff_r_fixed_reindex_target_prefix_witness * ff_p_fixed_reindex_target_prefix_witness)))))) /\ q = v * a)
  23. specialize beta_product_succ_decompose z
  24. specialize beta_product_succ_decompose d
  25. specialize beta_product_succ_decompose n
  26. specialize beta_product_succ_decompose q
  27. apply beta_product_succ_decompose
  28. exact htarget_product
  29. cases hsource_decomp
  30. cases hsource_decomp_witness
  31. cases hsource_decomp_witness_witness
  32. cases hsource_decomp_witness_witness_right
  33. cases htarget_decomp
  34. cases htarget_decomp_witness
  35. cases htarget_decomp_witness_witness
  36. cases htarget_decomp_witness_witness_right
  37. have htarget_source_last : ((exists ff_h_fixed_target_source_last. ff_h_fixed_target_source_last + S (x) = S ((S (n)) * d)) /\ exists ff_q_fixed_target_source_last. z = ff_q_fixed_target_source_last * S ((S (n)) * d) + (x))
  38. specialize haligned n
  39. specialize haligned n
  40. specialize haligned x
  41. apply haligned
  42. specialize le_refl (S n)
  43. exact le_refl
  44. exact hmap_last
  45. exact hsource_decomp_witness_witness_left
  46. have hlast_equal : x2 = x
  47. specialize beta_at_unique z
  48. specialize beta_at_unique d
  49. specialize beta_at_unique n
  50. specialize beta_at_unique x2
  51. specialize beta_at_unique x
  52. apply beta_at_unique
  53. exact htarget_decomp_witness_witness_left
  54. exact htarget_source_last
  55. have hprefixes_equal : x1 = x3
  56. specialize hprefix_equal x1
  57. specialize hprefix_equal x3
  58. apply hprefix_equal
  59. exact hsource_decomp_witness_witness_right_left
  60. exact htarget_decomp_witness_witness_right_left
  61. rewrite hsource_decomp_witness_witness_right_right
  62. rewrite htarget_decomp_witness_witness_right_right
  63. rewrite hlast_equal
  64. rewrite hprefixes_equal
  65. refl
beta_product_permutation_invariant · unchanged support, not a new admission
forall l r s b c z d p q. (forall fp_i_reindex_bounded. (exists fp_gap_reindex_bounded_index. fp_gap_reindex_bounded_index + S fp_i_reindex_bounded = l) -> exists fp_value_reindex_bounded. ((((exists ff_h_reindex_bounded_entry. ff_h_reindex_bounded_entry + S (fp_value_reindex_bounded) = S ((S (fp_i_reindex_bounded)) * s)) /\ exists ff_q_reindex_bounded_entry. r = ff_q_reindex_bounded_entry * S ((S (fp_i_reindex_bounded)) * s) + (fp_value_reindex_bounded))) /\ (exists fp_gap_reindex_bounded_value. fp_gap_reindex_bounded_value + S fp_value_reindex_bounded = l))) -> (forall fp_i_reindex_injective fp_j_reindex_injective fp_value_reindex_injective. (exists fp_gap_reindex_injective_i. fp_gap_reindex_injective_i + S fp_i_reindex_injective = l) -> (exists fp_gap_reindex_injective_j. fp_gap_reindex_injective_j + S fp_j_reindex_injective = l) -> (((exists ff_h_reindex_injective_left. ff_h_reindex_injective_left + S (fp_value_reindex_injective) = S ((S (fp_i_reindex_injective)) * s)) /\ exists ff_q_reindex_injective_left. r = ff_q_reindex_injective_left * S ((S (fp_i_reindex_injective)) * s) + (fp_value_reindex_injective))) -> (((exists ff_h_reindex_injective_right. ff_h_reindex_injective_right + S (fp_value_reindex_injective) = S ((S (fp_j_reindex_injective)) * s)) /\ exists ff_q_reindex_injective_right. r = ff_q_reindex_injective_right * S ((S (fp_j_reindex_injective)) * s) + (fp_value_reindex_injective))) -> fp_i_reindex_injective = fp_j_reindex_injective) -> (forall fpr_i_reindex_aligned fpr_j_reindex_aligned fpr_x_reindex_aligned. (exists fpr_h_reindex_aligned. fpr_h_reindex_aligned + S fpr_i_reindex_aligned = l) -> (((exists ff_h_reindex_aligned_map. ff_h_reindex_aligned_map + S (fpr_j_reindex_aligned) = S ((S (fpr_i_reindex_aligned)) * s)) /\ exists ff_q_reindex_aligned_map. r = ff_q_reindex_aligned_map * S ((S (fpr_i_reindex_aligned)) * s) + (fpr_j_reindex_aligned))) -> (((exists ff_h_reindex_aligned_source. ff_h_reindex_aligned_source + S (fpr_x_reindex_aligned) = S ((S (fpr_j_reindex_aligned)) * c)) /\ exists ff_q_reindex_aligned_source. b = ff_q_reindex_aligned_source * S ((S (fpr_j_reindex_aligned)) * c) + (fpr_x_reindex_aligned))) -> (((exists ff_h_reindex_aligned_target. ff_h_reindex_aligned_target + S (fpr_x_reindex_aligned) = S ((S (fpr_i_reindex_aligned)) * d)) /\ exists ff_q_reindex_aligned_target. z = ff_q_reindex_aligned_target * S ((S (fpr_i_reindex_aligned)) * d) + (fpr_x_reindex_aligned)))) -> (exists ff_u_reindex_source_product ff_v_reindex_source_product. ((((exists ff_h_reindex_source_product_start. ff_h_reindex_source_product_start + S (1) = S ((S (0)) * ff_v_reindex_source_product)) /\ exists ff_q_reindex_source_product_start. ff_u_reindex_source_product = ff_q_reindex_source_product_start * S ((S (0)) * ff_v_reindex_source_product) + (1))) /\ ((((exists ff_h_reindex_source_product_terminal. ff_h_reindex_source_product_terminal + S (p) = S ((S (l)) * ff_v_reindex_source_product)) /\ exists ff_q_reindex_source_product_terminal. ff_u_reindex_source_product = ff_q_reindex_source_product_terminal * S ((S (l)) * ff_v_reindex_source_product) + (p))) /\ forall ff_i_reindex_source_product. (exists ff_lt_reindex_source_product_bound. ff_lt_reindex_source_product_bound + S ff_i_reindex_source_product = l) -> exists ff_p_reindex_source_product ff_r_reindex_source_product ff_s_reindex_source_product. ((((exists ff_h_reindex_source_product_factor. ff_h_reindex_source_product_factor + S (ff_p_reindex_source_product) = S ((S (ff_i_reindex_source_product)) * c)) /\ exists ff_q_reindex_source_product_factor. b = ff_q_reindex_source_product_factor * S ((S (ff_i_reindex_source_product)) * c) + (ff_p_reindex_source_product))) /\ ((((exists ff_h_reindex_source_product_partial. ff_h_reindex_source_product_partial + S (ff_r_reindex_source_product) = S ((S (ff_i_reindex_source_product)) * ff_v_reindex_source_product)) /\ exists ff_q_reindex_source_product_partial. ff_u_reindex_source_product = ff_q_reindex_source_product_partial * S ((S (ff_i_reindex_source_product)) * ff_v_reindex_source_product) + (ff_r_reindex_source_product))) /\ ((((exists ff_h_reindex_source_product_successor. ff_h_reindex_source_product_successor + S (ff_s_reindex_source_product) = S ((S (S ff_i_reindex_source_product)) * ff_v_reindex_source_product)) /\ exists ff_q_reindex_source_product_successor. ff_u_reindex_source_product = ff_q_reindex_source_product_successor * S ((S (S ff_i_reindex_source_product)) * ff_v_reindex_source_product) + (ff_s_reindex_source_product))) /\ ff_s_reindex_source_product = ff_r_reindex_source_product * ff_p_reindex_source_product)))))) -> (exists ff_u_reindex_target_product ff_v_reindex_target_product. ((((exists ff_h_reindex_target_product_start. ff_h_reindex_target_product_start + S (1) = S ((S (0)) * ff_v_reindex_target_product)) /\ exists ff_q_reindex_target_product_start. ff_u_reindex_target_product = ff_q_reindex_target_product_start * S ((S (0)) * ff_v_reindex_target_product) + (1))) /\ ((((exists ff_h_reindex_target_product_terminal. ff_h_reindex_target_product_terminal + S (q) = S ((S (l)) * ff_v_reindex_target_product)) /\ exists ff_q_reindex_target_product_terminal. ff_u_reindex_target_product = ff_q_reindex_target_product_terminal * S ((S (l)) * ff_v_reindex_target_product) + (q))) /\ forall ff_i_reindex_target_product. (exists ff_lt_reindex_target_product_bound. ff_lt_reindex_target_product_bound + S ff_i_reindex_target_product = l) -> exists ff_p_reindex_target_product ff_r_reindex_target_product ff_s_reindex_target_product. ((((exists ff_h_reindex_target_product_factor. ff_h_reindex_target_product_factor + S (ff_p_reindex_target_product) = S ((S (ff_i_reindex_target_product)) * d)) /\ exists ff_q_reindex_target_product_factor. z = ff_q_reindex_target_product_factor * S ((S (ff_i_reindex_target_product)) * d) + (ff_p_reindex_target_product))) /\ ((((exists ff_h_reindex_target_product_partial. ff_h_reindex_target_product_partial + S (ff_r_reindex_target_product) = S ((S (ff_i_reindex_target_product)) * ff_v_reindex_target_product)) /\ exists ff_q_reindex_target_product_partial. ff_u_reindex_target_product = ff_q_reindex_target_product_partial * S ((S (ff_i_reindex_target_product)) * ff_v_reindex_target_product) + (ff_r_reindex_target_product))) /\ ((((exists ff_h_reindex_target_product_successor. ff_h_reindex_target_product_successor + S (ff_s_reindex_target_product) = S ((S (S ff_i_reindex_target_product)) * ff_v_reindex_target_product)) /\ exists ff_q_reindex_target_product_successor. ff_u_reindex_target_product = ff_q_reindex_target_product_successor * S ((S (S ff_i_reindex_target_product)) * ff_v_reindex_target_product) + (ff_s_reindex_target_product))) /\ ff_s_reindex_target_product = ff_r_reindex_target_product * ff_p_reindex_target_product)))))) -> p = q
  1. induction l
  2. intro r
  3. intro s
  4. intro b
  5. intro c
  6. intro z
  7. intro d
  8. intro p
  9. intro q
  10. intro hbounded
  11. intro hinjective
  12. intro haligned
  13. intro hsource_product
  14. intro htarget_product
  15. have hp : p = 1
  16. specialize beta_product_zero b
  17. specialize beta_product_zero c
  18. specialize beta_product_zero p
  19. apply beta_product_zero
  20. exact hsource_product
  21. have hq : q = 1
  22. specialize beta_product_zero z
  23. specialize beta_product_zero d
  24. specialize beta_product_zero q
  25. apply beta_product_zero
  26. exact htarget_product
  27. trans 1
  28. exact hp
  29. symm
  30. exact hq
  31. intro r
  32. intro s
  33. intro b
  34. intro c
  35. intro z
  36. intro d
  37. intro p
  38. intro q
  39. intro hbounded
  40. intro hinjective
  41. intro haligned
  42. intro hsource_product
  43. intro htarget_product
  44. have hsurjective : forall fp_value_reindex_surjective_succ. (exists fp_gap_reindex_surjective_succ_value. fp_gap_reindex_surjective_succ_value + S fp_value_reindex_surjective_succ = S l) -> exists fp_i_reindex_surjective_succ. ((exists fp_gap_reindex_surjective_succ_index. fp_gap_reindex_surjective_succ_index + S fp_i_reindex_surjective_succ = S l) /\ (((exists ff_h_reindex_surjective_succ_entry. ff_h_reindex_surjective_succ_entry + S (fp_value_reindex_surjective_succ) = S ((S (fp_i_reindex_surjective_succ)) * s)) /\ exists ff_q_reindex_surjective_succ_entry. r = ff_q_reindex_surjective_succ_entry * S ((S (fp_i_reindex_surjective_succ)) * s) + (fp_value_reindex_surjective_succ))))
  45. specialize finite_bounded_injective_surjective (S l)
  46. specialize finite_bounded_injective_surjective r
  47. specialize finite_bounded_injective_surjective s
  48. apply finite_bounded_injective_surjective
  49. exact hbounded
  50. exact hinjective
  51. have hlast_bound : exists h. h + S l = S l
  52. specialize le_refl (S l)
  53. exact le_refl
  54. have hpreimage : exists k. ((exists h. h + S k = S l) /\ (((exists ff_h_reindex_map_preimage. ff_h_reindex_map_preimage + S (l) = S ((S (k)) * s)) /\ exists ff_q_reindex_map_preimage. r = ff_q_reindex_map_preimage * S ((S (k)) * s) + (l))))
  55. specialize hsurjective l
  56. apply hsurjective
  57. exact hlast_bound
  58. cases hpreimage
  59. cases hpreimage_witness
  60. have hsource_last : exists a. (((exists ff_h_reindex_source_last. ff_h_reindex_source_last + S (a) = S ((S (l)) * c)) /\ exists ff_q_reindex_source_last. b = ff_q_reindex_source_last * S ((S (l)) * c) + (a)))
  61. specialize beta_at_exists b
  62. specialize beta_at_exists c
  63. specialize beta_at_exists l
  64. exact beta_at_exists
  65. cases hsource_last
  66. have htarget_at_preimage : ((exists ff_h_reindex_target_preimage. ff_h_reindex_target_preimage + S (x1) = S ((S (x)) * d)) /\ exists ff_q_reindex_target_preimage. z = ff_q_reindex_target_preimage * S ((S (x)) * d) + (x1))
  67. specialize haligned x
  68. specialize haligned l
  69. specialize haligned x1
  70. apply haligned
  71. exact hpreimage_witness_left
  72. exact hpreimage_witness_right
  73. exact hsource_last_witness
  74. have hsplit : x = l \/ exists h. h + S x = l
  75. specialize finite_lt_succ_eq_or_lt l
  76. specialize finite_lt_succ_eq_or_lt x
  77. apply finite_lt_succ_eq_or_lt
  78. exact hpreimage_witness_left
  79. cases hsplit
  80. have hmap_last : ((exists ff_h_reindex_map_last. ff_h_reindex_map_last + S (l) = S ((S (l)) * s)) /\ exists ff_q_reindex_map_last. r = ff_q_reindex_map_last * S ((S (l)) * s) + (l))
  81. rewrite hsplit_left at hpreimage_witness_right
  82. rewrite hsplit_left at hpreimage_witness_right
  83. exact hpreimage_witness_right
  84. have hbounded_prefix : forall fp_i_reindex_bounded_prefix. (exists fp_gap_reindex_bounded_prefix_index. fp_gap_reindex_bounded_prefix_index + S fp_i_reindex_bounded_prefix = l) -> exists fp_value_reindex_bounded_prefix. ((((exists ff_h_reindex_bounded_prefix_entry. ff_h_reindex_bounded_prefix_entry + S (fp_value_reindex_bounded_prefix) = S ((S (fp_i_reindex_bounded_prefix)) * s)) /\ exists ff_q_reindex_bounded_prefix_entry. r = ff_q_reindex_bounded_prefix_entry * S ((S (fp_i_reindex_bounded_prefix)) * s) + (fp_value_reindex_bounded_prefix))) /\ (exists fp_gap_reindex_bounded_prefix_value. fp_gap_reindex_bounded_prefix_value + S fp_value_reindex_bounded_prefix = l))
  85. specialize finite_fixed_last_prefix_bounded r
  86. specialize finite_fixed_last_prefix_bounded s
  87. specialize finite_fixed_last_prefix_bounded l
  88. apply finite_fixed_last_prefix_bounded
  89. exact hbounded
  90. exact hinjective
  91. exact hmap_last
  92. have hinjective_prefix : forall fp_i_reindex_injective_prefix fp_j_reindex_injective_prefix fp_value_reindex_injective_prefix. (exists fp_gap_reindex_injective_prefix_i. fp_gap_reindex_injective_prefix_i + S fp_i_reindex_injective_prefix = l) -> (exists fp_gap_reindex_injective_prefix_j. fp_gap_reindex_injective_prefix_j + S fp_j_reindex_injective_prefix = l) -> (((exists ff_h_reindex_injective_prefix_left. ff_h_reindex_injective_prefix_left + S (fp_value_reindex_injective_prefix) = S ((S (fp_i_reindex_injective_prefix)) * s)) /\ exists ff_q_reindex_injective_prefix_left. r = ff_q_reindex_injective_prefix_left * S ((S (fp_i_reindex_injective_prefix)) * s) + (fp_value_reindex_injective_prefix))) -> (((exists ff_h_reindex_injective_prefix_right. ff_h_reindex_injective_prefix_right + S (fp_value_reindex_injective_prefix) = S ((S (fp_j_reindex_injective_prefix)) * s)) /\ exists ff_q_reindex_injective_prefix_right. r = ff_q_reindex_injective_prefix_right * S ((S (fp_j_reindex_injective_prefix)) * s) + (fp_value_reindex_injective_prefix))) -> fp_i_reindex_injective_prefix = fp_j_reindex_injective_prefix
  93. specialize finite_injective_prefix_succ r
  94. specialize finite_injective_prefix_succ s
  95. specialize finite_injective_prefix_succ l
  96. specialize finite_injective_prefix_succ (S l)
  97. apply finite_injective_prefix_succ
  98. refl
  99. exact hinjective
  100. have haligned_prefix : forall fpr_i_reindex_aligned_prefix fpr_j_reindex_aligned_prefix fpr_x_reindex_aligned_prefix. (exists fpr_h_reindex_aligned_prefix. fpr_h_reindex_aligned_prefix + S fpr_i_reindex_aligned_prefix = l) -> (((exists ff_h_reindex_aligned_prefix_map. ff_h_reindex_aligned_prefix_map + S (fpr_j_reindex_aligned_prefix) = S ((S (fpr_i_reindex_aligned_prefix)) * s)) /\ exists ff_q_reindex_aligned_prefix_map. r = ff_q_reindex_aligned_prefix_map * S ((S (fpr_i_reindex_aligned_prefix)) * s) + (fpr_j_reindex_aligned_prefix))) -> (((exists ff_h_reindex_aligned_prefix_source. ff_h_reindex_aligned_prefix_source + S (fpr_x_reindex_aligned_prefix) = S ((S (fpr_j_reindex_aligned_prefix)) * c)) /\ exists ff_q_reindex_aligned_prefix_source. b = ff_q_reindex_aligned_prefix_source * S ((S (fpr_j_reindex_aligned_prefix)) * c) + (fpr_x_reindex_aligned_prefix))) -> (((exists ff_h_reindex_aligned_prefix_target. ff_h_reindex_aligned_prefix_target + S (fpr_x_reindex_aligned_prefix) = S ((S (fpr_i_reindex_aligned_prefix)) * d)) /\ exists ff_q_reindex_aligned_prefix_target. z = ff_q_reindex_aligned_prefix_target * S ((S (fpr_i_reindex_aligned_prefix)) * d) + (fpr_x_reindex_aligned_prefix)))
  101. intro i
  102. intro j
  103. intro a
  104. intro hi
  105. intro hmap
  106. intro hsource
  107. specialize haligned i
  108. specialize haligned j
  109. specialize haligned a
  110. apply haligned
  111. specialize le_succ (S i)
  112. specialize le_succ l
  113. apply le_succ
  114. exact hi
  115. exact hmap
  116. exact hsource
  117. have hprefix_products_equal : forall u v. (exists ff_u_reindex_source_prefix_product ff_v_reindex_source_prefix_product. ((((exists ff_h_reindex_source_prefix_product_start. ff_h_reindex_source_prefix_product_start + S (1) = S ((S (0)) * ff_v_reindex_source_prefix_product)) /\ exists ff_q_reindex_source_prefix_product_start. ff_u_reindex_source_prefix_product = ff_q_reindex_source_prefix_product_start * S ((S (0)) * ff_v_reindex_source_prefix_product) + (1))) /\ ((((exists ff_h_reindex_source_prefix_product_terminal. ff_h_reindex_source_prefix_product_terminal + S (u) = S ((S (l)) * ff_v_reindex_source_prefix_product)) /\ exists ff_q_reindex_source_prefix_product_terminal. ff_u_reindex_source_prefix_product = ff_q_reindex_source_prefix_product_terminal * S ((S (l)) * ff_v_reindex_source_prefix_product) + (u))) /\ forall ff_i_reindex_source_prefix_product. (exists ff_lt_reindex_source_prefix_product_bound. ff_lt_reindex_source_prefix_product_bound + S ff_i_reindex_source_prefix_product = l) -> exists ff_p_reindex_source_prefix_product ff_r_reindex_source_prefix_product ff_s_reindex_source_prefix_product. ((((exists ff_h_reindex_source_prefix_product_factor. ff_h_reindex_source_prefix_product_factor + S (ff_p_reindex_source_prefix_product) = S ((S (ff_i_reindex_source_prefix_product)) * c)) /\ exists ff_q_reindex_source_prefix_product_factor. b = ff_q_reindex_source_prefix_product_factor * S ((S (ff_i_reindex_source_prefix_product)) * c) + (ff_p_reindex_source_prefix_product))) /\ ((((exists ff_h_reindex_source_prefix_product_partial. ff_h_reindex_source_prefix_product_partial + S (ff_r_reindex_source_prefix_product) = S ((S (ff_i_reindex_source_prefix_product)) * ff_v_reindex_source_prefix_product)) /\ exists ff_q_reindex_source_prefix_product_partial. ff_u_reindex_source_prefix_product = ff_q_reindex_source_prefix_product_partial * S ((S (ff_i_reindex_source_prefix_product)) * ff_v_reindex_source_prefix_product) + (ff_r_reindex_source_prefix_product))) /\ ((((exists ff_h_reindex_source_prefix_product_successor. ff_h_reindex_source_prefix_product_successor + S (ff_s_reindex_source_prefix_product) = S ((S (S ff_i_reindex_source_prefix_product)) * ff_v_reindex_source_prefix_product)) /\ exists ff_q_reindex_source_prefix_product_successor. ff_u_reindex_source_prefix_product = ff_q_reindex_source_prefix_product_successor * S ((S (S ff_i_reindex_source_prefix_product)) * ff_v_reindex_source_prefix_product) + (ff_s_reindex_source_prefix_product))) /\ ff_s_reindex_source_prefix_product = ff_r_reindex_source_prefix_product * ff_p_reindex_source_prefix_product)))))) -> (exists ff_u_reindex_target_prefix_product ff_v_reindex_target_prefix_product. ((((exists ff_h_reindex_target_prefix_product_start. ff_h_reindex_target_prefix_product_start + S (1) = S ((S (0)) * ff_v_reindex_target_prefix_product)) /\ exists ff_q_reindex_target_prefix_product_start. ff_u_reindex_target_prefix_product = ff_q_reindex_target_prefix_product_start * S ((S (0)) * ff_v_reindex_target_prefix_product) + (1))) /\ ((((exists ff_h_reindex_target_prefix_product_terminal. ff_h_reindex_target_prefix_product_terminal + S (v) = S ((S (l)) * ff_v_reindex_target_prefix_product)) /\ exists ff_q_reindex_target_prefix_product_terminal. ff_u_reindex_target_prefix_product = ff_q_reindex_target_prefix_product_terminal * S ((S (l)) * ff_v_reindex_target_prefix_product) + (v))) /\ forall ff_i_reindex_target_prefix_product. (exists ff_lt_reindex_target_prefix_product_bound. ff_lt_reindex_target_prefix_product_bound + S ff_i_reindex_target_prefix_product = l) -> exists ff_p_reindex_target_prefix_product ff_r_reindex_target_prefix_product ff_s_reindex_target_prefix_product. ((((exists ff_h_reindex_target_prefix_product_factor. ff_h_reindex_target_prefix_product_factor + S (ff_p_reindex_target_prefix_product) = S ((S (ff_i_reindex_target_prefix_product)) * d)) /\ exists ff_q_reindex_target_prefix_product_factor. z = ff_q_reindex_target_prefix_product_factor * S ((S (ff_i_reindex_target_prefix_product)) * d) + (ff_p_reindex_target_prefix_product))) /\ ((((exists ff_h_reindex_target_prefix_product_partial. ff_h_reindex_target_prefix_product_partial + S (ff_r_reindex_target_prefix_product) = S ((S (ff_i_reindex_target_prefix_product)) * ff_v_reindex_target_prefix_product)) /\ exists ff_q_reindex_target_prefix_product_partial. ff_u_reindex_target_prefix_product = ff_q_reindex_target_prefix_product_partial * S ((S (ff_i_reindex_target_prefix_product)) * ff_v_reindex_target_prefix_product) + (ff_r_reindex_target_prefix_product))) /\ ((((exists ff_h_reindex_target_prefix_product_successor. ff_h_reindex_target_prefix_product_successor + S (ff_s_reindex_target_prefix_product) = S ((S (S ff_i_reindex_target_prefix_product)) * ff_v_reindex_target_prefix_product)) /\ exists ff_q_reindex_target_prefix_product_successor. ff_u_reindex_target_prefix_product = ff_q_reindex_target_prefix_product_successor * S ((S (S ff_i_reindex_target_prefix_product)) * ff_v_reindex_target_prefix_product) + (ff_s_reindex_target_prefix_product))) /\ ff_s_reindex_target_prefix_product = ff_r_reindex_target_prefix_product * ff_p_reindex_target_prefix_product)))))) -> u = v
  118. intro u
  119. intro v
  120. intro hsource_prefix_product
  121. intro htarget_prefix_product
  122. specialize IH r
  123. specialize IH s
  124. specialize IH b
  125. specialize IH c
  126. specialize IH z
  127. specialize IH d
  128. specialize IH u
  129. specialize IH v
  130. apply IH
  131. exact hbounded_prefix
  132. exact hinjective_prefix
  133. exact haligned_prefix
  134. exact hsource_prefix_product
  135. exact htarget_prefix_product
  136. specialize beta_product_reindex_fixed_last r
  137. specialize beta_product_reindex_fixed_last s
  138. specialize beta_product_reindex_fixed_last b
  139. specialize beta_product_reindex_fixed_last c
  140. specialize beta_product_reindex_fixed_last z
  141. specialize beta_product_reindex_fixed_last d
  142. specialize beta_product_reindex_fixed_last l
  143. specialize beta_product_reindex_fixed_last p
  144. specialize beta_product_reindex_fixed_last q
  145. apply beta_product_reindex_fixed_last
  146. exact haligned
  147. exact hmap_last
  148. exact hsource_product
  149. exact htarget_product
  150. exact hprefix_products_equal
  151. have hmap_last_decoded : exists m. (((exists ff_h_reindex_map_decoded_last. ff_h_reindex_map_decoded_last + S (m) = S ((S (l)) * s)) /\ exists ff_q_reindex_map_decoded_last. r = ff_q_reindex_map_decoded_last * S ((S (l)) * s) + (m)))
  152. specialize beta_at_exists r
  153. specialize beta_at_exists s
  154. specialize beta_at_exists l
  155. exact beta_at_exists
  156. cases hmap_last_decoded
  157. have htarget_last_decoded : exists w. (((exists ff_h_reindex_target_decoded_last. ff_h_reindex_target_decoded_last + S (w) = S ((S (l)) * d)) /\ exists ff_q_reindex_target_decoded_last. z = ff_q_reindex_target_decoded_last * S ((S (l)) * d) + (w)))
  158. specialize beta_at_exists z
  159. specialize beta_at_exists d
  160. specialize beta_at_exists l
  161. exact beta_at_exists
  162. cases htarget_last_decoded
  163. have hmap_swap : exists rm sm. (((exists ff_h_reindex_map_swap_i. ff_h_reindex_map_swap_i + S (x2) = S ((S (x)) * sm)) /\ exists ff_q_reindex_map_swap_i. rm = ff_q_reindex_map_swap_i * S ((S (x)) * sm) + (x2))) /\ ((((exists ff_h_reindex_map_swap_last. ff_h_reindex_map_swap_last + S (l) = S ((S (l)) * sm)) /\ exists ff_q_reindex_map_swap_last. rm = ff_q_reindex_map_swap_last * S ((S (l)) * sm) + (l))) /\ forall j a. (exists h. h + S j = S l) -> ~(j = x) -> ~(j = l) -> (((exists ff_h_reindex_map_swap_old. ff_h_reindex_map_swap_old + S (a) = S ((S (j)) * s)) /\ exists ff_q_reindex_map_swap_old. r = ff_q_reindex_map_swap_old * S ((S (j)) * s) + (a))) -> (((exists ff_h_reindex_map_swap_new. ff_h_reindex_map_swap_new + S (a) = S ((S (j)) * sm)) /\ exists ff_q_reindex_map_swap_new. rm = ff_q_reindex_map_swap_new * S ((S (j)) * sm) + (a))))
  164. specialize beta_prefix_swap_last_from_entries r
  165. specialize beta_prefix_swap_last_from_entries s
  166. specialize beta_prefix_swap_last_from_entries l
  167. specialize beta_prefix_swap_last_from_entries x
  168. specialize beta_prefix_swap_last_from_entries l
  169. specialize beta_prefix_swap_last_from_entries x2
  170. apply beta_prefix_swap_last_from_entries
  171. exact hsplit_right
  172. exact hpreimage_witness_right
  173. exact hmap_last_decoded_witness
  174. cases hmap_swap
  175. cases hmap_swap_witness
  176. cases hmap_swap_witness_witness
  177. cases hmap_swap_witness_witness_right
  178. have htarget_swap : exists tz td. (((exists ff_h_reindex_target_swap_i. ff_h_reindex_target_swap_i + S (x3) = S ((S (x)) * td)) /\ exists ff_q_reindex_target_swap_i. tz = ff_q_reindex_target_swap_i * S ((S (x)) * td) + (x3))) /\ ((((exists ff_h_reindex_target_swap_last. ff_h_reindex_target_swap_last + S (x1) = S ((S (l)) * td)) /\ exists ff_q_reindex_target_swap_last. tz = ff_q_reindex_target_swap_last * S ((S (l)) * td) + (x1))) /\ forall j a. (exists h. h + S j = S l) -> ~(j = x) -> ~(j = l) -> (((exists ff_h_reindex_target_swap_old. ff_h_reindex_target_swap_old + S (a) = S ((S (j)) * d)) /\ exists ff_q_reindex_target_swap_old. z = ff_q_reindex_target_swap_old * S ((S (j)) * d) + (a))) -> (((exists ff_h_reindex_target_swap_new. ff_h_reindex_target_swap_new + S (a) = S ((S (j)) * td)) /\ exists ff_q_reindex_target_swap_new. tz = ff_q_reindex_target_swap_new * S ((S (j)) * td) + (a))))
  179. specialize beta_prefix_swap_last_from_entries z
  180. specialize beta_prefix_swap_last_from_entries d
  181. specialize beta_prefix_swap_last_from_entries l
  182. specialize beta_prefix_swap_last_from_entries x
  183. specialize beta_prefix_swap_last_from_entries x1
  184. specialize beta_prefix_swap_last_from_entries x3
  185. apply beta_prefix_swap_last_from_entries
  186. exact hsplit_right
  187. exact htarget_at_preimage
  188. exact htarget_last_decoded_witness
  189. cases htarget_swap
  190. cases htarget_swap_witness
  191. cases htarget_swap_witness_witness
  192. cases htarget_swap_witness_witness_right
  193. have hswapped_bounded : forall fp_i_reindex_swapped_bounded. (exists fp_gap_reindex_swapped_bounded_index. fp_gap_reindex_swapped_bounded_index + S fp_i_reindex_swapped_bounded = S l) -> exists fp_value_reindex_swapped_bounded. ((((exists ff_h_reindex_swapped_bounded_entry. ff_h_reindex_swapped_bounded_entry + S (fp_value_reindex_swapped_bounded) = S ((S (fp_i_reindex_swapped_bounded)) * x5)) /\ exists ff_q_reindex_swapped_bounded_entry. x4 = ff_q_reindex_swapped_bounded_entry * S ((S (fp_i_reindex_swapped_bounded)) * x5) + (fp_value_reindex_swapped_bounded))) /\ (exists fp_gap_reindex_swapped_bounded_value. fp_gap_reindex_swapped_bounded_value + S fp_value_reindex_swapped_bounded = S l))
  194. specialize finite_swap_last_bounded r
  195. specialize finite_swap_last_bounded s
  196. specialize finite_swap_last_bounded x4
  197. specialize finite_swap_last_bounded x5
  198. specialize finite_swap_last_bounded l
  199. specialize finite_swap_last_bounded (S l)
  200. specialize finite_swap_last_bounded x
  201. specialize finite_swap_last_bounded l
  202. specialize finite_swap_last_bounded x2
  203. apply finite_swap_last_bounded
  204. refl
  205. exact hsplit_right
  206. exact hbounded
  207. exact hpreimage_witness_right
  208. exact hmap_last_decoded_witness
  209. exact hmap_swap_witness_witness_left
  210. exact hmap_swap_witness_witness_right_left
  211. exact hmap_swap_witness_witness_right_right
  212. have hswapped_injective : forall fp_i_reindex_swapped_injective fp_j_reindex_swapped_injective fp_value_reindex_swapped_injective. (exists fp_gap_reindex_swapped_injective_i. fp_gap_reindex_swapped_injective_i + S fp_i_reindex_swapped_injective = S l) -> (exists fp_gap_reindex_swapped_injective_j. fp_gap_reindex_swapped_injective_j + S fp_j_reindex_swapped_injective = S l) -> (((exists ff_h_reindex_swapped_injective_left. ff_h_reindex_swapped_injective_left + S (fp_value_reindex_swapped_injective) = S ((S (fp_i_reindex_swapped_injective)) * x5)) /\ exists ff_q_reindex_swapped_injective_left. x4 = ff_q_reindex_swapped_injective_left * S ((S (fp_i_reindex_swapped_injective)) * x5) + (fp_value_reindex_swapped_injective))) -> (((exists ff_h_reindex_swapped_injective_right. ff_h_reindex_swapped_injective_right + S (fp_value_reindex_swapped_injective) = S ((S (fp_j_reindex_swapped_injective)) * x5)) /\ exists ff_q_reindex_swapped_injective_right. x4 = ff_q_reindex_swapped_injective_right * S ((S (fp_j_reindex_swapped_injective)) * x5) + (fp_value_reindex_swapped_injective))) -> fp_i_reindex_swapped_injective = fp_j_reindex_swapped_injective
  213. specialize finite_swap_last_injective r
  214. specialize finite_swap_last_injective s
  215. specialize finite_swap_last_injective x4
  216. specialize finite_swap_last_injective x5
  217. specialize finite_swap_last_injective l
  218. specialize finite_swap_last_injective (S l)
  219. specialize finite_swap_last_injective x
  220. specialize finite_swap_last_injective l
  221. specialize finite_swap_last_injective x2
  222. apply finite_swap_last_injective
  223. refl
  224. exact hsplit_right
  225. exact hinjective
  226. exact hpreimage_witness_right
  227. exact hmap_last_decoded_witness
  228. exact hmap_swap_witness_witness_left
  229. exact hmap_swap_witness_witness_right_left
  230. exact hmap_swap_witness_witness_right_right
  231. have hswapped_target_product_exists : exists t. (exists ff_u_reindex_swapped_target_exists ff_v_reindex_swapped_target_exists. ((((exists ff_h_reindex_swapped_target_exists_start. ff_h_reindex_swapped_target_exists_start + S (1) = S ((S (0)) * ff_v_reindex_swapped_target_exists)) /\ exists ff_q_reindex_swapped_target_exists_start. ff_u_reindex_swapped_target_exists = ff_q_reindex_swapped_target_exists_start * S ((S (0)) * ff_v_reindex_swapped_target_exists) + (1))) /\ ((((exists ff_h_reindex_swapped_target_exists_terminal. ff_h_reindex_swapped_target_exists_terminal + S (t) = S ((S (S l)) * ff_v_reindex_swapped_target_exists)) /\ exists ff_q_reindex_swapped_target_exists_terminal. ff_u_reindex_swapped_target_exists = ff_q_reindex_swapped_target_exists_terminal * S ((S (S l)) * ff_v_reindex_swapped_target_exists) + (t))) /\ forall ff_i_reindex_swapped_target_exists. (exists ff_lt_reindex_swapped_target_exists_bound. ff_lt_reindex_swapped_target_exists_bound + S ff_i_reindex_swapped_target_exists = S l) -> exists ff_p_reindex_swapped_target_exists ff_r_reindex_swapped_target_exists ff_s_reindex_swapped_target_exists. ((((exists ff_h_reindex_swapped_target_exists_factor. ff_h_reindex_swapped_target_exists_factor + S (ff_p_reindex_swapped_target_exists) = S ((S (ff_i_reindex_swapped_target_exists)) * x7)) /\ exists ff_q_reindex_swapped_target_exists_factor. x6 = ff_q_reindex_swapped_target_exists_factor * S ((S (ff_i_reindex_swapped_target_exists)) * x7) + (ff_p_reindex_swapped_target_exists))) /\ ((((exists ff_h_reindex_swapped_target_exists_partial. ff_h_reindex_swapped_target_exists_partial + S (ff_r_reindex_swapped_target_exists) = S ((S (ff_i_reindex_swapped_target_exists)) * ff_v_reindex_swapped_target_exists)) /\ exists ff_q_reindex_swapped_target_exists_partial. ff_u_reindex_swapped_target_exists = ff_q_reindex_swapped_target_exists_partial * S ((S (ff_i_reindex_swapped_target_exists)) * ff_v_reindex_swapped_target_exists) + (ff_r_reindex_swapped_target_exists))) /\ ((((exists ff_h_reindex_swapped_target_exists_successor. ff_h_reindex_swapped_target_exists_successor + S (ff_s_reindex_swapped_target_exists) = S ((S (S ff_i_reindex_swapped_target_exists)) * ff_v_reindex_swapped_target_exists)) /\ exists ff_q_reindex_swapped_target_exists_successor. ff_u_reindex_swapped_target_exists = ff_q_reindex_swapped_target_exists_successor * S ((S (S ff_i_reindex_swapped_target_exists)) * ff_v_reindex_swapped_target_exists) + (ff_s_reindex_swapped_target_exists))) /\ ff_s_reindex_swapped_target_exists = ff_r_reindex_swapped_target_exists * ff_p_reindex_swapped_target_exists))))))
  232. specialize beta_product_exists x6
  233. specialize beta_product_exists x7
  234. specialize beta_product_exists (S l)
  235. exact beta_product_exists
  236. cases hswapped_target_product_exists
  237. have htarget_product_swap : q = x8
  238. specialize beta_product_swap_last_invariant z
  239. specialize beta_product_swap_last_invariant d
  240. specialize beta_product_swap_last_invariant x6
  241. specialize beta_product_swap_last_invariant x7
  242. specialize beta_product_swap_last_invariant l
  243. specialize beta_product_swap_last_invariant x
  244. specialize beta_product_swap_last_invariant x1
  245. specialize beta_product_swap_last_invariant x3
  246. specialize beta_product_swap_last_invariant q
  247. specialize beta_product_swap_last_invariant x8
  248. apply beta_product_swap_last_invariant
  249. exact hsplit_right
  250. exact htarget_at_preimage
  251. exact htarget_last_decoded_witness
  252. exact htarget_swap_witness_witness_left
  253. exact htarget_swap_witness_witness_right_left
  254. exact htarget_swap_witness_witness_right_right
  255. exact htarget_product
  256. exact hswapped_target_product_exists_witness
  257. have hsource_at_map_last : ((exists ff_h_reindex_source_at_map_last. ff_h_reindex_source_at_map_last + S (x3) = S ((S (x2)) * c)) /\ exists ff_q_reindex_source_at_map_last. b = ff_q_reindex_source_at_map_last * S ((S (x2)) * c) + (x3))
  258. specialize beta_at_exists b
  259. specialize beta_at_exists c
  260. specialize beta_at_exists x2
  261. cases beta_at_exists
  262. have htarget_from_map_last : ((exists ff_h_reindex_target_from_map_last. ff_h_reindex_target_from_map_last + S (x9) = S ((S (l)) * d)) /\ exists ff_q_reindex_target_from_map_last. z = ff_q_reindex_target_from_map_last * S ((S (l)) * d) + (x9))
  263. specialize haligned l
  264. specialize haligned x2
  265. specialize haligned x9
  266. apply haligned
  267. exact hlast_bound
  268. exact hmap_last_decoded_witness
  269. exact beta_at_exists_witness
  270. have hmap_last_value : x9 = x3
  271. specialize beta_at_unique z
  272. specialize beta_at_unique d
  273. specialize beta_at_unique l
  274. specialize beta_at_unique x9
  275. specialize beta_at_unique x3
  276. apply beta_at_unique
  277. exact htarget_from_map_last
  278. exact htarget_last_decoded_witness
  279. rewrite hmap_last_value at beta_at_exists_witness
  280. rewrite hmap_last_value at beta_at_exists_witness
  281. exact beta_at_exists_witness
  282. have hswapped_aligned : forall fpr_i_reindex_swapped_aligned fpr_j_reindex_swapped_aligned fpr_x_reindex_swapped_aligned. (exists fpr_h_reindex_swapped_aligned. fpr_h_reindex_swapped_aligned + S fpr_i_reindex_swapped_aligned = S l) -> (((exists ff_h_reindex_swapped_aligned_map. ff_h_reindex_swapped_aligned_map + S (fpr_j_reindex_swapped_aligned) = S ((S (fpr_i_reindex_swapped_aligned)) * x5)) /\ exists ff_q_reindex_swapped_aligned_map. x4 = ff_q_reindex_swapped_aligned_map * S ((S (fpr_i_reindex_swapped_aligned)) * x5) + (fpr_j_reindex_swapped_aligned))) -> (((exists ff_h_reindex_swapped_aligned_source. ff_h_reindex_swapped_aligned_source + S (fpr_x_reindex_swapped_aligned) = S ((S (fpr_j_reindex_swapped_aligned)) * c)) /\ exists ff_q_reindex_swapped_aligned_source. b = ff_q_reindex_swapped_aligned_source * S ((S (fpr_j_reindex_swapped_aligned)) * c) + (fpr_x_reindex_swapped_aligned))) -> (((exists ff_h_reindex_swapped_aligned_target. ff_h_reindex_swapped_aligned_target + S (fpr_x_reindex_swapped_aligned) = S ((S (fpr_i_reindex_swapped_aligned)) * x7)) /\ exists ff_q_reindex_swapped_aligned_target. x6 = ff_q_reindex_swapped_aligned_target * S ((S (fpr_i_reindex_swapped_aligned)) * x7) + (fpr_x_reindex_swapped_aligned)))
  283. specialize beta_reindex_alignment_swap_last r
  284. specialize beta_reindex_alignment_swap_last s
  285. specialize beta_reindex_alignment_swap_last x4
  286. specialize beta_reindex_alignment_swap_last x5
  287. specialize beta_reindex_alignment_swap_last b
  288. specialize beta_reindex_alignment_swap_last c
  289. specialize beta_reindex_alignment_swap_last z
  290. specialize beta_reindex_alignment_swap_last d
  291. specialize beta_reindex_alignment_swap_last x6
  292. specialize beta_reindex_alignment_swap_last x7
  293. specialize beta_reindex_alignment_swap_last l
  294. specialize beta_reindex_alignment_swap_last x
  295. specialize beta_reindex_alignment_swap_last x2
  296. specialize beta_reindex_alignment_swap_last x1
  297. specialize beta_reindex_alignment_swap_last x3
  298. apply beta_reindex_alignment_swap_last
  299. exact hmap_swap_witness_witness_left
  300. exact hmap_swap_witness_witness_right_left
  301. exact hmap_swap_witness_witness_right_right
  302. exact hsource_at_map_last
  303. exact hsource_last_witness
  304. exact htarget_swap_witness_witness_left
  305. exact htarget_swap_witness_witness_right_left
  306. exact htarget_swap_witness_witness_right_right
  307. exact haligned
  308. have hswapped_bounded_prefix : forall fp_i_reindex_swapped_bounded_prefix. (exists fp_gap_reindex_swapped_bounded_prefix_index. fp_gap_reindex_swapped_bounded_prefix_index + S fp_i_reindex_swapped_bounded_prefix = l) -> exists fp_value_reindex_swapped_bounded_prefix. ((((exists ff_h_reindex_swapped_bounded_prefix_entry. ff_h_reindex_swapped_bounded_prefix_entry + S (fp_value_reindex_swapped_bounded_prefix) = S ((S (fp_i_reindex_swapped_bounded_prefix)) * x5)) /\ exists ff_q_reindex_swapped_bounded_prefix_entry. x4 = ff_q_reindex_swapped_bounded_prefix_entry * S ((S (fp_i_reindex_swapped_bounded_prefix)) * x5) + (fp_value_reindex_swapped_bounded_prefix))) /\ (exists fp_gap_reindex_swapped_bounded_prefix_value. fp_gap_reindex_swapped_bounded_prefix_value + S fp_value_reindex_swapped_bounded_prefix = l))
  309. specialize finite_fixed_last_prefix_bounded x4
  310. specialize finite_fixed_last_prefix_bounded x5
  311. specialize finite_fixed_last_prefix_bounded l
  312. apply finite_fixed_last_prefix_bounded
  313. exact hswapped_bounded
  314. exact hswapped_injective
  315. exact hmap_swap_witness_witness_right_left
  316. have hswapped_injective_prefix : forall fp_i_reindex_swapped_injective_prefix fp_j_reindex_swapped_injective_prefix fp_value_reindex_swapped_injective_prefix. (exists fp_gap_reindex_swapped_injective_prefix_i. fp_gap_reindex_swapped_injective_prefix_i + S fp_i_reindex_swapped_injective_prefix = l) -> (exists fp_gap_reindex_swapped_injective_prefix_j. fp_gap_reindex_swapped_injective_prefix_j + S fp_j_reindex_swapped_injective_prefix = l) -> (((exists ff_h_reindex_swapped_injective_prefix_left. ff_h_reindex_swapped_injective_prefix_left + S (fp_value_reindex_swapped_injective_prefix) = S ((S (fp_i_reindex_swapped_injective_prefix)) * x5)) /\ exists ff_q_reindex_swapped_injective_prefix_left. x4 = ff_q_reindex_swapped_injective_prefix_left * S ((S (fp_i_reindex_swapped_injective_prefix)) * x5) + (fp_value_reindex_swapped_injective_prefix))) -> (((exists ff_h_reindex_swapped_injective_prefix_right. ff_h_reindex_swapped_injective_prefix_right + S (fp_value_reindex_swapped_injective_prefix) = S ((S (fp_j_reindex_swapped_injective_prefix)) * x5)) /\ exists ff_q_reindex_swapped_injective_prefix_right. x4 = ff_q_reindex_swapped_injective_prefix_right * S ((S (fp_j_reindex_swapped_injective_prefix)) * x5) + (fp_value_reindex_swapped_injective_prefix))) -> fp_i_reindex_swapped_injective_prefix = fp_j_reindex_swapped_injective_prefix
  317. specialize finite_injective_prefix_succ x4
  318. specialize finite_injective_prefix_succ x5
  319. specialize finite_injective_prefix_succ l
  320. specialize finite_injective_prefix_succ (S l)
  321. apply finite_injective_prefix_succ
  322. refl
  323. exact hswapped_injective
  324. have hswapped_aligned_prefix : forall fpr_i_reindex_swapped_aligned_prefix fpr_j_reindex_swapped_aligned_prefix fpr_x_reindex_swapped_aligned_prefix. (exists fpr_h_reindex_swapped_aligned_prefix. fpr_h_reindex_swapped_aligned_prefix + S fpr_i_reindex_swapped_aligned_prefix = l) -> (((exists ff_h_reindex_swapped_aligned_prefix_map. ff_h_reindex_swapped_aligned_prefix_map + S (fpr_j_reindex_swapped_aligned_prefix) = S ((S (fpr_i_reindex_swapped_aligned_prefix)) * x5)) /\ exists ff_q_reindex_swapped_aligned_prefix_map. x4 = ff_q_reindex_swapped_aligned_prefix_map * S ((S (fpr_i_reindex_swapped_aligned_prefix)) * x5) + (fpr_j_reindex_swapped_aligned_prefix))) -> (((exists ff_h_reindex_swapped_aligned_prefix_source. ff_h_reindex_swapped_aligned_prefix_source + S (fpr_x_reindex_swapped_aligned_prefix) = S ((S (fpr_j_reindex_swapped_aligned_prefix)) * c)) /\ exists ff_q_reindex_swapped_aligned_prefix_source. b = ff_q_reindex_swapped_aligned_prefix_source * S ((S (fpr_j_reindex_swapped_aligned_prefix)) * c) + (fpr_x_reindex_swapped_aligned_prefix))) -> (((exists ff_h_reindex_swapped_aligned_prefix_target. ff_h_reindex_swapped_aligned_prefix_target + S (fpr_x_reindex_swapped_aligned_prefix) = S ((S (fpr_i_reindex_swapped_aligned_prefix)) * x7)) /\ exists ff_q_reindex_swapped_aligned_prefix_target. x6 = ff_q_reindex_swapped_aligned_prefix_target * S ((S (fpr_i_reindex_swapped_aligned_prefix)) * x7) + (fpr_x_reindex_swapped_aligned_prefix)))
  325. intro i
  326. intro j
  327. intro a
  328. intro hi
  329. intro hmap
  330. intro hsource
  331. specialize hswapped_aligned i
  332. specialize hswapped_aligned j
  333. specialize hswapped_aligned a
  334. apply hswapped_aligned
  335. specialize le_succ (S i)
  336. specialize le_succ l
  337. apply le_succ
  338. exact hi
  339. exact hmap
  340. exact hsource
  341. have hswapped_prefix_products_equal : forall u v. (exists ff_u_reindex_source_prefix_product ff_v_reindex_source_prefix_product. ((((exists ff_h_reindex_source_prefix_product_start. ff_h_reindex_source_prefix_product_start + S (1) = S ((S (0)) * ff_v_reindex_source_prefix_product)) /\ exists ff_q_reindex_source_prefix_product_start. ff_u_reindex_source_prefix_product = ff_q_reindex_source_prefix_product_start * S ((S (0)) * ff_v_reindex_source_prefix_product) + (1))) /\ ((((exists ff_h_reindex_source_prefix_product_terminal. ff_h_reindex_source_prefix_product_terminal + S (u) = S ((S (l)) * ff_v_reindex_source_prefix_product)) /\ exists ff_q_reindex_source_prefix_product_terminal. ff_u_reindex_source_prefix_product = ff_q_reindex_source_prefix_product_terminal * S ((S (l)) * ff_v_reindex_source_prefix_product) + (u))) /\ forall ff_i_reindex_source_prefix_product. (exists ff_lt_reindex_source_prefix_product_bound. ff_lt_reindex_source_prefix_product_bound + S ff_i_reindex_source_prefix_product = l) -> exists ff_p_reindex_source_prefix_product ff_r_reindex_source_prefix_product ff_s_reindex_source_prefix_product. ((((exists ff_h_reindex_source_prefix_product_factor. ff_h_reindex_source_prefix_product_factor + S (ff_p_reindex_source_prefix_product) = S ((S (ff_i_reindex_source_prefix_product)) * c)) /\ exists ff_q_reindex_source_prefix_product_factor. b = ff_q_reindex_source_prefix_product_factor * S ((S (ff_i_reindex_source_prefix_product)) * c) + (ff_p_reindex_source_prefix_product))) /\ ((((exists ff_h_reindex_source_prefix_product_partial. ff_h_reindex_source_prefix_product_partial + S (ff_r_reindex_source_prefix_product) = S ((S (ff_i_reindex_source_prefix_product)) * ff_v_reindex_source_prefix_product)) /\ exists ff_q_reindex_source_prefix_product_partial. ff_u_reindex_source_prefix_product = ff_q_reindex_source_prefix_product_partial * S ((S (ff_i_reindex_source_prefix_product)) * ff_v_reindex_source_prefix_product) + (ff_r_reindex_source_prefix_product))) /\ ((((exists ff_h_reindex_source_prefix_product_successor. ff_h_reindex_source_prefix_product_successor + S (ff_s_reindex_source_prefix_product) = S ((S (S ff_i_reindex_source_prefix_product)) * ff_v_reindex_source_prefix_product)) /\ exists ff_q_reindex_source_prefix_product_successor. ff_u_reindex_source_prefix_product = ff_q_reindex_source_prefix_product_successor * S ((S (S ff_i_reindex_source_prefix_product)) * ff_v_reindex_source_prefix_product) + (ff_s_reindex_source_prefix_product))) /\ ff_s_reindex_source_prefix_product = ff_r_reindex_source_prefix_product * ff_p_reindex_source_prefix_product)))))) -> (exists ff_u_reindex_swapped_target_prefix_product ff_v_reindex_swapped_target_prefix_product. ((((exists ff_h_reindex_swapped_target_prefix_product_start. ff_h_reindex_swapped_target_prefix_product_start + S (1) = S ((S (0)) * ff_v_reindex_swapped_target_prefix_product)) /\ exists ff_q_reindex_swapped_target_prefix_product_start. ff_u_reindex_swapped_target_prefix_product = ff_q_reindex_swapped_target_prefix_product_start * S ((S (0)) * ff_v_reindex_swapped_target_prefix_product) + (1))) /\ ((((exists ff_h_reindex_swapped_target_prefix_product_terminal. ff_h_reindex_swapped_target_prefix_product_terminal + S (v) = S ((S (l)) * ff_v_reindex_swapped_target_prefix_product)) /\ exists ff_q_reindex_swapped_target_prefix_product_terminal. ff_u_reindex_swapped_target_prefix_product = ff_q_reindex_swapped_target_prefix_product_terminal * S ((S (l)) * ff_v_reindex_swapped_target_prefix_product) + (v))) /\ forall ff_i_reindex_swapped_target_prefix_product. (exists ff_lt_reindex_swapped_target_prefix_product_bound. ff_lt_reindex_swapped_target_prefix_product_bound + S ff_i_reindex_swapped_target_prefix_product = l) -> exists ff_p_reindex_swapped_target_prefix_product ff_r_reindex_swapped_target_prefix_product ff_s_reindex_swapped_target_prefix_product. ((((exists ff_h_reindex_swapped_target_prefix_product_factor. ff_h_reindex_swapped_target_prefix_product_factor + S (ff_p_reindex_swapped_target_prefix_product) = S ((S (ff_i_reindex_swapped_target_prefix_product)) * x7)) /\ exists ff_q_reindex_swapped_target_prefix_product_factor. x6 = ff_q_reindex_swapped_target_prefix_product_factor * S ((S (ff_i_reindex_swapped_target_prefix_product)) * x7) + (ff_p_reindex_swapped_target_prefix_product))) /\ ((((exists ff_h_reindex_swapped_target_prefix_product_partial. ff_h_reindex_swapped_target_prefix_product_partial + S (ff_r_reindex_swapped_target_prefix_product) = S ((S (ff_i_reindex_swapped_target_prefix_product)) * ff_v_reindex_swapped_target_prefix_product)) /\ exists ff_q_reindex_swapped_target_prefix_product_partial. ff_u_reindex_swapped_target_prefix_product = ff_q_reindex_swapped_target_prefix_product_partial * S ((S (ff_i_reindex_swapped_target_prefix_product)) * ff_v_reindex_swapped_target_prefix_product) + (ff_r_reindex_swapped_target_prefix_product))) /\ ((((exists ff_h_reindex_swapped_target_prefix_product_successor. ff_h_reindex_swapped_target_prefix_product_successor + S (ff_s_reindex_swapped_target_prefix_product) = S ((S (S ff_i_reindex_swapped_target_prefix_product)) * ff_v_reindex_swapped_target_prefix_product)) /\ exists ff_q_reindex_swapped_target_prefix_product_successor. ff_u_reindex_swapped_target_prefix_product = ff_q_reindex_swapped_target_prefix_product_successor * S ((S (S ff_i_reindex_swapped_target_prefix_product)) * ff_v_reindex_swapped_target_prefix_product) + (ff_s_reindex_swapped_target_prefix_product))) /\ ff_s_reindex_swapped_target_prefix_product = ff_r_reindex_swapped_target_prefix_product * ff_p_reindex_swapped_target_prefix_product)))))) -> u = v
  342. intro u
  343. intro v
  344. intro hsource_prefix_product
  345. intro htarget_prefix_product
  346. specialize IH x4
  347. specialize IH x5
  348. specialize IH b
  349. specialize IH c
  350. specialize IH x6
  351. specialize IH x7
  352. specialize IH u
  353. specialize IH v
  354. apply IH
  355. exact hswapped_bounded_prefix
  356. exact hswapped_injective_prefix
  357. exact hswapped_aligned_prefix
  358. exact hsource_prefix_product
  359. exact htarget_prefix_product
  360. have hproduct_swapped : p = x8
  361. specialize beta_product_reindex_fixed_last x4
  362. specialize beta_product_reindex_fixed_last x5
  363. specialize beta_product_reindex_fixed_last b
  364. specialize beta_product_reindex_fixed_last c
  365. specialize beta_product_reindex_fixed_last x6
  366. specialize beta_product_reindex_fixed_last x7
  367. specialize beta_product_reindex_fixed_last l
  368. specialize beta_product_reindex_fixed_last p
  369. specialize beta_product_reindex_fixed_last x8
  370. apply beta_product_reindex_fixed_last
  371. exact hswapped_aligned
  372. exact hmap_swap_witness_witness_right_left
  373. exact hsource_product
  374. exact hswapped_target_product_exists_witness
  375. exact hswapped_prefix_products_equal
  376. trans x8
  377. exact hproduct_swapped
  378. symm
  379. exact htarget_product_swap
beta_product_pointwise_coprime · unchanged support, not a new admission
forall m b c l z. (forall frp_index_pointwise frp_factor_pointwise. (exists frp_gap_pointwise_bound. frp_gap_pointwise_bound + S frp_index_pointwise = l) -> (((exists ff_h_frp_pointwise_decoded. ff_h_frp_pointwise_decoded + S (frp_factor_pointwise) = S ((S (frp_index_pointwise)) * c)) /\ exists ff_q_frp_pointwise_decoded. b = ff_q_frp_pointwise_decoded * S ((S (frp_index_pointwise)) * c) + (frp_factor_pointwise))) -> (forall frp_divisor_pointwise_coprime. (exists frp_left_factor_pointwise_coprime. frp_factor_pointwise = frp_divisor_pointwise_coprime * frp_left_factor_pointwise_coprime) -> (exists frp_right_factor_pointwise_coprime. m = frp_divisor_pointwise_coprime * frp_right_factor_pointwise_coprime) -> frp_divisor_pointwise_coprime = 1)) -> (exists ff_u_pointwise_product ff_v_pointwise_product. ((((exists ff_h_pointwise_product_start. ff_h_pointwise_product_start + S (1) = S ((S (0)) * ff_v_pointwise_product)) /\ exists ff_q_pointwise_product_start. ff_u_pointwise_product = ff_q_pointwise_product_start * S ((S (0)) * ff_v_pointwise_product) + (1))) /\ ((((exists ff_h_pointwise_product_terminal. ff_h_pointwise_product_terminal + S (z) = S ((S (l)) * ff_v_pointwise_product)) /\ exists ff_q_pointwise_product_terminal. ff_u_pointwise_product = ff_q_pointwise_product_terminal * S ((S (l)) * ff_v_pointwise_product) + (z))) /\ forall ff_i_pointwise_product. (exists ff_lt_pointwise_product_bound. ff_lt_pointwise_product_bound + S ff_i_pointwise_product = l) -> exists ff_p_pointwise_product ff_r_pointwise_product ff_s_pointwise_product. ((((exists ff_h_pointwise_product_factor. ff_h_pointwise_product_factor + S (ff_p_pointwise_product) = S ((S (ff_i_pointwise_product)) * c)) /\ exists ff_q_pointwise_product_factor. b = ff_q_pointwise_product_factor * S ((S (ff_i_pointwise_product)) * c) + (ff_p_pointwise_product))) /\ ((((exists ff_h_pointwise_product_partial. ff_h_pointwise_product_partial + S (ff_r_pointwise_product) = S ((S (ff_i_pointwise_product)) * ff_v_pointwise_product)) /\ exists ff_q_pointwise_product_partial. ff_u_pointwise_product = ff_q_pointwise_product_partial * S ((S (ff_i_pointwise_product)) * ff_v_pointwise_product) + (ff_r_pointwise_product))) /\ ((((exists ff_h_pointwise_product_successor. ff_h_pointwise_product_successor + S (ff_s_pointwise_product) = S ((S (S ff_i_pointwise_product)) * ff_v_pointwise_product)) /\ exists ff_q_pointwise_product_successor. ff_u_pointwise_product = ff_q_pointwise_product_successor * S ((S (S ff_i_pointwise_product)) * ff_v_pointwise_product) + (ff_s_pointwise_product))) /\ ff_s_pointwise_product = ff_r_pointwise_product * ff_p_pointwise_product)))))) -> (forall frp_divisor_pointwise_result. (exists frp_left_factor_pointwise_result. z = frp_divisor_pointwise_result * frp_left_factor_pointwise_result) -> (exists frp_right_factor_pointwise_result. m = frp_divisor_pointwise_result * frp_right_factor_pointwise_result) -> frp_divisor_pointwise_result = 1)
  1. intro m
  2. intro b
  3. intro c
  4. induction l
  5. intro z
  6. intro hpw
  7. intro hproduct
  8. have hz : z = 1
  9. specialize beta_product_zero b
  10. specialize beta_product_zero c
  11. specialize beta_product_zero z
  12. apply beta_product_zero
  13. exact hproduct
  14. rewrite hz
  15. specialize coprime_one_left m
  16. exact coprime_one_left
  17. intro z
  18. intro hpw
  19. intro hproduct
  20. have hdecomp : exists p r. (((exists ff_h_frp_final_factor. ff_h_frp_final_factor + S (p) = S ((S (l)) * c)) /\ exists ff_q_frp_final_factor. b = ff_q_frp_final_factor * S ((S (l)) * c) + (p))) /\ ((exists ff_u_pointwise_prefix_product ff_v_pointwise_prefix_product. ((((exists ff_h_pointwise_prefix_product_start. ff_h_pointwise_prefix_product_start + S (1) = S ((S (0)) * ff_v_pointwise_prefix_product)) /\ exists ff_q_pointwise_prefix_product_start. ff_u_pointwise_prefix_product = ff_q_pointwise_prefix_product_start * S ((S (0)) * ff_v_pointwise_prefix_product) + (1))) /\ ((((exists ff_h_pointwise_prefix_product_terminal. ff_h_pointwise_prefix_product_terminal + S (r) = S ((S (l)) * ff_v_pointwise_prefix_product)) /\ exists ff_q_pointwise_prefix_product_terminal. ff_u_pointwise_prefix_product = ff_q_pointwise_prefix_product_terminal * S ((S (l)) * ff_v_pointwise_prefix_product) + (r))) /\ forall ff_i_pointwise_prefix_product. (exists ff_lt_pointwise_prefix_product_bound. ff_lt_pointwise_prefix_product_bound + S ff_i_pointwise_prefix_product = l) -> exists ff_p_pointwise_prefix_product ff_r_pointwise_prefix_product ff_s_pointwise_prefix_product. ((((exists ff_h_pointwise_prefix_product_factor. ff_h_pointwise_prefix_product_factor + S (ff_p_pointwise_prefix_product) = S ((S (ff_i_pointwise_prefix_product)) * c)) /\ exists ff_q_pointwise_prefix_product_factor. b = ff_q_pointwise_prefix_product_factor * S ((S (ff_i_pointwise_prefix_product)) * c) + (ff_p_pointwise_prefix_product))) /\ ((((exists ff_h_pointwise_prefix_product_partial. ff_h_pointwise_prefix_product_partial + S (ff_r_pointwise_prefix_product) = S ((S (ff_i_pointwise_prefix_product)) * ff_v_pointwise_prefix_product)) /\ exists ff_q_pointwise_prefix_product_partial. ff_u_pointwise_prefix_product = ff_q_pointwise_prefix_product_partial * S ((S (ff_i_pointwise_prefix_product)) * ff_v_pointwise_prefix_product) + (ff_r_pointwise_prefix_product))) /\ ((((exists ff_h_pointwise_prefix_product_successor. ff_h_pointwise_prefix_product_successor + S (ff_s_pointwise_prefix_product) = S ((S (S ff_i_pointwise_prefix_product)) * ff_v_pointwise_prefix_product)) /\ exists ff_q_pointwise_prefix_product_successor. ff_u_pointwise_prefix_product = ff_q_pointwise_prefix_product_successor * S ((S (S ff_i_pointwise_prefix_product)) * ff_v_pointwise_prefix_product) + (ff_s_pointwise_prefix_product))) /\ ff_s_pointwise_prefix_product = ff_r_pointwise_prefix_product * ff_p_pointwise_prefix_product)))))) /\ z = r * p)
  21. specialize beta_product_succ_decompose b
  22. specialize beta_product_succ_decompose c
  23. specialize beta_product_succ_decompose l
  24. specialize beta_product_succ_decompose z
  25. apply beta_product_succ_decompose
  26. exact hproduct
  27. cases hdecomp
  28. cases hdecomp_witness
  29. cases hdecomp_witness_witness
  30. cases hdecomp_witness_witness_right
  31. have hpw_prefix : forall frp_index_pointwise_prefix frp_factor_pointwise_prefix. (exists frp_gap_pointwise_prefix_bound. frp_gap_pointwise_prefix_bound + S frp_index_pointwise_prefix = l) -> (((exists ff_h_frp_pointwise_prefix_decoded. ff_h_frp_pointwise_prefix_decoded + S (frp_factor_pointwise_prefix) = S ((S (frp_index_pointwise_prefix)) * c)) /\ exists ff_q_frp_pointwise_prefix_decoded. b = ff_q_frp_pointwise_prefix_decoded * S ((S (frp_index_pointwise_prefix)) * c) + (frp_factor_pointwise_prefix))) -> (forall frp_divisor_pointwise_prefix_coprime. (exists frp_left_factor_pointwise_prefix_coprime. frp_factor_pointwise_prefix = frp_divisor_pointwise_prefix_coprime * frp_left_factor_pointwise_prefix_coprime) -> (exists frp_right_factor_pointwise_prefix_coprime. m = frp_divisor_pointwise_prefix_coprime * frp_right_factor_pointwise_prefix_coprime) -> frp_divisor_pointwise_prefix_coprime = 1)
  32. intro i
  33. intro x2
  34. intro hi
  35. intro hx2
  36. specialize hpw i
  37. specialize hpw x2
  38. apply hpw
  39. specialize le_succ (S i)
  40. specialize le_succ l
  41. apply le_succ
  42. exact hi
  43. exact hx2
  44. have hprefix : forall frp_divisor_prefix_result. (exists frp_left_factor_prefix_result. x1 = frp_divisor_prefix_result * frp_left_factor_prefix_result) -> (exists frp_right_factor_prefix_result. m = frp_divisor_prefix_result * frp_right_factor_prefix_result) -> frp_divisor_prefix_result = 1
  45. specialize IH x1
  46. apply IH
  47. exact hpw_prefix
  48. exact hdecomp_witness_witness_right_left
  49. have hfactor : forall frp_divisor_last_factor. (exists frp_left_factor_last_factor. x = frp_divisor_last_factor * frp_left_factor_last_factor) -> (exists frp_right_factor_last_factor. m = frp_divisor_last_factor * frp_right_factor_last_factor) -> frp_divisor_last_factor = 1
  50. specialize hpw l
  51. specialize hpw x
  52. apply hpw
  53. specialize le_refl (S l)
  54. exact le_refl
  55. exact hdecomp_witness_witness_left
  56. rewrite hdecomp_witness_witness_right_right
  57. specialize coprime_mul_left x1
  58. specialize coprime_mul_left x
  59. specialize coprime_mul_left m
  60. apply coprime_mul_left
  61. exact hprefix
  62. exact hfactor
prime_mul_index_map_exists_up_to · unchanged support, not a new admission
forall l n p a. (exists frm_weak_gap_index_map_length. frm_weak_gap_index_map_length + l = n) -> p = S n -> ((~(p = 1) /\ forall frm_prime_left_index_map_prime frm_prime_right_index_map_prime. p = frm_prime_left_index_map_prime * frm_prime_right_index_map_prime -> frm_prime_left_index_map_prime = 1 \/ frm_prime_right_index_map_prime = 1)) -> (~(exists frm_factor_index_map_multiplier. a = p * frm_factor_index_map_multiplier)) -> exists r s. (forall frm_index_result. (exists frm_gap_result_index_bound. frm_gap_result_index_bound + S frm_index_result = l) -> (exists frm_residue_result_result. (exists frm_gap_result_result_residue_bound. frm_gap_result_result_residue_bound + S frm_residue_result_result = n) /\ ((((exists ff_h_frm_result_result_decoded. ff_h_frm_result_result_decoded + S (frm_residue_result_result) = S ((S (frm_index_result)) * s)) /\ exists ff_q_frm_result_result_decoded. r = ff_q_frm_result_result_decoded * S ((S (frm_index_result)) * s) + (frm_residue_result_result))) /\ (exists frm_mod_left_result_result_congruence frm_mod_right_result_result_congruence. a * S frm_index_result + p * frm_mod_left_result_result_congruence = S frm_residue_result_result + p * frm_mod_right_result_result_congruence))))
  1. induction l
  2. intro n
  3. intro p
  4. intro a
  5. intro hln
  6. intro hpn
  7. intro hp
  8. intro hnotdiv
  9. exists 0
  10. exists 0
  11. intro i
  12. intro hi
  13. exfalso
  14. cases hi
  15. have hsi : S i = 0
  16. specialize add_eq_zero_right x
  17. specialize add_eq_zero_right (S i)
  18. apply add_eq_zero_right
  19. exact hi_witness
  20. specialize succ_ne_zero i
  21. apply succ_ne_zero
  22. exact hsi
  23. intro n
  24. intro p
  25. intro a
  26. intro hln
  27. intro hpn
  28. intro hp
  29. intro hnotdiv
  30. have hln_prev : exists h. h + l = n
  31. specialize lt_to_le l
  32. specialize lt_to_le n
  33. apply lt_to_le
  34. exact hln
  35. have hprev : exists r s. (forall frm_index_previous. (exists frm_gap_previous_index_bound. frm_gap_previous_index_bound + S frm_index_previous = l) -> (exists frm_residue_previous_result. (exists frm_gap_previous_result_residue_bound. frm_gap_previous_result_residue_bound + S frm_residue_previous_result = n) /\ ((((exists ff_h_frm_previous_result_decoded. ff_h_frm_previous_result_decoded + S (frm_residue_previous_result) = S ((S (frm_index_previous)) * s)) /\ exists ff_q_frm_previous_result_decoded. r = ff_q_frm_previous_result_decoded * S ((S (frm_index_previous)) * s) + (frm_residue_previous_result))) /\ (exists frm_mod_left_previous_result_congruence frm_mod_right_previous_result_congruence. a * S frm_index_previous + p * frm_mod_left_previous_result_congruence = S frm_residue_previous_result + p * frm_mod_right_previous_result_congruence))))
  36. specialize IH n
  37. specialize IH p
  38. specialize IH a
  39. apply IH
  40. exact hln_prev
  41. exact hpn
  42. exact hp
  43. exact hnotdiv
  44. cases hprev
  45. cases hprev_witness
  46. have hslp : exists h. h + S (S l) = p
  47. rewrite hpn
  48. specialize succ_le_succ (S l)
  49. specialize succ_le_succ n
  50. apply succ_le_succ
  51. exact hln
  52. have hp0 : ~(p = 0)
  53. intro hpzero
  54. specialize prime_nonzero p
  55. apply prime_nonzero
  56. exact hp
  57. exact hpzero
  58. have hdiv : exists q rem. a * S l = p * q + rem /\ exists h. h + S rem = p
  59. specialize division_remainder_exists p
  60. specialize division_remainder_exists (a * S l)
  61. apply division_remainder_exists
  62. exact hp0
  63. cases hdiv
  64. cases hdiv_witness
  65. cases hdiv_witness_witness
  66. have hrem0 : ~(x3 = 0)
  67. intro hremzero
  68. have hmultiple : exists k. a * S l = p * k
  69. exists x2
  70. trans p * x2 + x3
  71. exact hdiv_witness_witness_left
  72. rewrite hremzero
  73. apply PA3
  74. have hfactor : (exists u. a = p * u) \/ exists v. S l = p * v
  75. specialize euclid_prime_dvd_product p
  76. specialize euclid_prime_dvd_product a
  77. specialize euclid_prime_dvd_product (S l)
  78. apply euclid_prime_dvd_product
  79. exact hp
  80. exact hmultiple
  81. cases hfactor
  82. apply hnotdiv
  83. exact hfactor_left
  84. have hsl0 : ~(S l = 0)
  85. specialize succ_ne_zero l
  86. exact succ_ne_zero
  87. have hple : exists k. k + p = S l
  88. specialize divisor_le_nonzero p
  89. specialize divisor_le_nonzero (S l)
  90. apply divisor_le_nonzero
  91. exact hsl0
  92. exact hfactor_right
  93. specialize lt_not_le (S l)
  94. specialize lt_not_le p
  95. apply lt_not_le
  96. exact hslp
  97. exact hple
  98. have hrem_succ : exists j. x3 = S j
  99. specialize nonzero_is_succ x3
  100. apply nonzero_is_succ
  101. exact hrem0
  102. cases hrem_succ
  103. have hjn : exists h. h + S x4 = n
  104. specialize le_of_succ_le_succ (S x4)
  105. specialize le_of_succ_le_succ n
  106. apply le_of_succ_le_succ
  107. rewrite <- hrem_succ_witness
  108. rewrite <- hpn
  109. exact hdiv_witness_witness_right
  110. have hdecomp : a * S l = x2 * p + x3
  111. trans p * x2 + x3
  112. exact hdiv_witness_witness_left
  113. congr
  114. apply mul_comm
  115. refl
  116. have hmodrem : exists u v. a * S l + p * u = x3 + p * v
  117. specialize remainder_decomposition_to_mod_eq p
  118. specialize remainder_decomposition_to_mod_eq (a * S l)
  119. specialize remainder_decomposition_to_mod_eq x2
  120. specialize remainder_decomposition_to_mod_eq x3
  121. apply remainder_decomposition_to_mod_eq
  122. exact hdecomp
  123. have hmod : exists u v. a * S l + p * u = S x4 + p * v
  124. rewrite <- hrem_succ_witness
  125. exact hmodrem
  126. specialize beta_prefix_extend l
  127. specialize beta_prefix_extend x
  128. specialize beta_prefix_extend x1
  129. specialize beta_prefix_extend x4
  130. cases beta_prefix_extend
  131. cases beta_prefix_extend_witness
  132. cases beta_prefix_extend_witness_witness
  133. exists x5
  134. exists x6
  135. intro i
  136. intro hi
  137. have hsplit : i = l \/ exists h. h + S i = l
  138. specialize finite_lt_succ_eq_or_lt l
  139. specialize finite_lt_succ_eq_or_lt i
  140. apply finite_lt_succ_eq_or_lt
  141. exact hi
  142. cases hsplit
  143. exists x4
  144. split
  145. exact hjn
  146. split
  147. rewrite hsplit_left
  148. rewrite hsplit_left
  149. exact beta_prefix_extend_witness_witness_left
  150. rewrite hsplit_left
  151. exact hmod
  152. have hold : (exists frm_residue_previous_at_i. (exists frm_gap_previous_at_i_residue_bound. frm_gap_previous_at_i_residue_bound + S frm_residue_previous_at_i = n) /\ ((((exists ff_h_frm_previous_at_i_decoded. ff_h_frm_previous_at_i_decoded + S (frm_residue_previous_at_i) = S ((S (i)) * x1)) /\ exists ff_q_frm_previous_at_i_decoded. x = ff_q_frm_previous_at_i_decoded * S ((S (i)) * x1) + (frm_residue_previous_at_i))) /\ (exists frm_mod_left_previous_at_i_congruence frm_mod_right_previous_at_i_congruence. a * S i + p * frm_mod_left_previous_at_i_congruence = S frm_residue_previous_at_i + p * frm_mod_right_previous_at_i_congruence)))
  153. specialize hprev_witness_witness i
  154. apply hprev_witness_witness
  155. exact hsplit_right
  156. cases hold
  157. cases hold_witness
  158. cases hold_witness_right
  159. exists x7
  160. split
  161. exact hold_witness_left
  162. split
  163. specialize beta_prefix_extend_witness_witness_right i
  164. specialize beta_prefix_extend_witness_witness_right x7
  165. apply beta_prefix_extend_witness_witness_right
  166. exact hsplit_right
  167. exact hold_witness_right_left
  168. exact hold_witness_right_right
beta_successor_lift_exists · unchanged support, not a new admission
forall r s l. exists z d. forall i j. (exists frm_gap_successor_lift_bound. frm_gap_successor_lift_bound + S i = l) -> (((exists ff_h_frm_successor_lift_source. ff_h_frm_successor_lift_source + S (j) = S ((S (i)) * s)) /\ exists ff_q_frm_successor_lift_source. r = ff_q_frm_successor_lift_source * S ((S (i)) * s) + (j))) -> (((exists frm_height_successor_lift_target. frm_height_successor_lift_target + S (S j) = S ((S (i)) * d)) /\ exists frm_quotient_successor_lift_target. z = frm_quotient_successor_lift_target * S ((S (i)) * d) + (S j)))
  1. intro r
  2. intro s
  3. induction l
  4. exists 0
  5. exists 0
  6. intro i
  7. intro j
  8. intro hi
  9. intro hsource
  10. exfalso
  11. cases hi
  12. have hsi : S i = 0
  13. specialize add_eq_zero_right x
  14. specialize add_eq_zero_right (S i)
  15. apply add_eq_zero_right
  16. exact hi_witness
  17. specialize succ_ne_zero i
  18. apply succ_ne_zero
  19. exact hsi
  20. cases IH
  21. cases IH_witness
  22. specialize beta_at_exists r
  23. specialize beta_at_exists s
  24. specialize beta_at_exists l
  25. cases beta_at_exists
  26. specialize beta_prefix_extend l
  27. specialize beta_prefix_extend x
  28. specialize beta_prefix_extend x1
  29. specialize beta_prefix_extend (S x2)
  30. cases beta_prefix_extend
  31. cases beta_prefix_extend_witness
  32. cases beta_prefix_extend_witness_witness
  33. exists x3
  34. exists x4
  35. intro i
  36. intro j
  37. intro hi
  38. intro hsource
  39. have hsplit : i = l \/ exists h. h + S i = l
  40. specialize finite_lt_succ_eq_or_lt l
  41. specialize finite_lt_succ_eq_or_lt i
  42. apply finite_lt_succ_eq_or_lt
  43. exact hi
  44. cases hsplit
  45. have hjx : j = x2
  46. specialize beta_at_unique r
  47. specialize beta_at_unique s
  48. specialize beta_at_unique l
  49. specialize beta_at_unique j
  50. specialize beta_at_unique x2
  51. apply beta_at_unique
  52. rewrite hsplit_left at hsource
  53. rewrite hsplit_left at hsource
  54. exact hsource
  55. exact beta_at_exists_witness
  56. rewrite hsplit_left
  57. rewrite hsplit_left
  58. rewrite hjx
  59. rewrite hjx
  60. exact beta_prefix_extend_witness_witness_left
  61. specialize beta_prefix_extend_witness_witness_right i
  62. specialize beta_prefix_extend_witness_witness_right (S j)
  63. apply beta_prefix_extend_witness_witness_right
  64. exact hsplit_right
  65. specialize IH_witness_witness i
  66. specialize IH_witness_witness j
  67. apply IH_witness_witness
  68. exact hsplit_right
  69. exact hsource
fermat_index_map_bounded · unchanged support, not a new admission
forall r s n p a. (forall frm_index_bounded_map. (exists frm_gap_bounded_map_index_bound. frm_gap_bounded_map_index_bound + S frm_index_bounded_map = n) -> (exists frm_residue_bounded_map_result. (exists frm_gap_bounded_map_result_residue_bound. frm_gap_bounded_map_result_residue_bound + S frm_residue_bounded_map_result = n) /\ ((((exists ff_h_frm_bounded_map_result_decoded. ff_h_frm_bounded_map_result_decoded + S (frm_residue_bounded_map_result) = S ((S (frm_index_bounded_map)) * s)) /\ exists ff_q_frm_bounded_map_result_decoded. r = ff_q_frm_bounded_map_result_decoded * S ((S (frm_index_bounded_map)) * s) + (frm_residue_bounded_map_result))) /\ (exists frm_mod_left_bounded_map_result_congruence frm_mod_right_bounded_map_result_congruence. a * S frm_index_bounded_map + p * frm_mod_left_bounded_map_result_congruence = S frm_residue_bounded_map_result + p * frm_mod_right_bounded_map_result_congruence)))) -> (forall fp_i_bounded_result. (exists fp_gap_bounded_result_index. fp_gap_bounded_result_index + S fp_i_bounded_result = n) -> exists fp_value_bounded_result. ((((exists ff_h_bounded_result_entry. ff_h_bounded_result_entry + S (fp_value_bounded_result) = S ((S (fp_i_bounded_result)) * s)) /\ exists ff_q_bounded_result_entry. r = ff_q_bounded_result_entry * S ((S (fp_i_bounded_result)) * s) + (fp_value_bounded_result))) /\ (exists fp_gap_bounded_result_value. fp_gap_bounded_result_value + S fp_value_bounded_result = n)))
  1. intro r
  2. intro s
  3. intro n
  4. intro p
  5. intro a
  6. intro hmap
  7. intro i
  8. intro hi
  9. have hentry : exists frm_residue_bounded_at_i. (exists frm_gap_bounded_at_i_residue_bound. frm_gap_bounded_at_i_residue_bound + S frm_residue_bounded_at_i = n) /\ ((((exists ff_h_frm_bounded_at_i_decoded. ff_h_frm_bounded_at_i_decoded + S (frm_residue_bounded_at_i) = S ((S (i)) * s)) /\ exists ff_q_frm_bounded_at_i_decoded. r = ff_q_frm_bounded_at_i_decoded * S ((S (i)) * s) + (frm_residue_bounded_at_i))) /\ (exists frm_mod_left_bounded_at_i_congruence frm_mod_right_bounded_at_i_congruence. a * S i + p * frm_mod_left_bounded_at_i_congruence = S frm_residue_bounded_at_i + p * frm_mod_right_bounded_at_i_congruence))
  10. specialize hmap i
  11. apply hmap
  12. exact hi
  13. cases hentry
  14. cases hentry_witness
  15. cases hentry_witness_right
  16. exists x
  17. split
  18. exact hentry_witness_right_left
  19. exact hentry_witness_left
prime_mul_index_map_injective · unchanged support, not a new admission
forall p n a r s. p = S n -> ((~(p = 1) /\ forall frm_prime_left_injective_prime frm_prime_right_injective_prime. p = frm_prime_left_injective_prime * frm_prime_right_injective_prime -> frm_prime_left_injective_prime = 1 \/ frm_prime_right_injective_prime = 1)) -> (~(exists frm_factor_injective_multiplier. a = p * frm_factor_injective_multiplier)) -> (forall frm_index_injective_map. (exists frm_gap_injective_map_index_bound. frm_gap_injective_map_index_bound + S frm_index_injective_map = n) -> (exists frm_residue_injective_map_result. (exists frm_gap_injective_map_result_residue_bound. frm_gap_injective_map_result_residue_bound + S frm_residue_injective_map_result = n) /\ ((((exists ff_h_frm_injective_map_result_decoded. ff_h_frm_injective_map_result_decoded + S (frm_residue_injective_map_result) = S ((S (frm_index_injective_map)) * s)) /\ exists ff_q_frm_injective_map_result_decoded. r = ff_q_frm_injective_map_result_decoded * S ((S (frm_index_injective_map)) * s) + (frm_residue_injective_map_result))) /\ (exists frm_mod_left_injective_map_result_congruence frm_mod_right_injective_map_result_congruence. a * S frm_index_injective_map + p * frm_mod_left_injective_map_result_congruence = S frm_residue_injective_map_result + p * frm_mod_right_injective_map_result_congruence)))) -> (forall fp_i_injective_result fp_j_injective_result fp_value_injective_result. (exists fp_gap_injective_result_i. fp_gap_injective_result_i + S fp_i_injective_result = n) -> (exists fp_gap_injective_result_j. fp_gap_injective_result_j + S fp_j_injective_result = n) -> (((exists ff_h_injective_result_left. ff_h_injective_result_left + S (fp_value_injective_result) = S ((S (fp_i_injective_result)) * s)) /\ exists ff_q_injective_result_left. r = ff_q_injective_result_left * S ((S (fp_i_injective_result)) * s) + (fp_value_injective_result))) -> (((exists ff_h_injective_result_right. ff_h_injective_result_right + S (fp_value_injective_result) = S ((S (fp_j_injective_result)) * s)) /\ exists ff_q_injective_result_right. r = ff_q_injective_result_right * S ((S (fp_j_injective_result)) * s) + (fp_value_injective_result))) -> fp_i_injective_result = fp_j_injective_result)
  1. intro p
  2. intro n
  3. intro a
  4. intro r
  5. intro s
  6. intro hpn
  7. intro hp
  8. intro hnotdiv
  9. intro hmap
  10. intro i
  11. intro k
  12. intro value
  13. intro hi
  14. intro hk
  15. intro hri
  16. intro hrk
  17. have hmi : exists frm_residue_injective_i. (exists frm_gap_injective_i_residue_bound. frm_gap_injective_i_residue_bound + S frm_residue_injective_i = n) /\ ((((exists ff_h_frm_injective_i_decoded. ff_h_frm_injective_i_decoded + S (frm_residue_injective_i) = S ((S (i)) * s)) /\ exists ff_q_frm_injective_i_decoded. r = ff_q_frm_injective_i_decoded * S ((S (i)) * s) + (frm_residue_injective_i))) /\ (exists frm_mod_left_injective_i_congruence frm_mod_right_injective_i_congruence. a * S i + p * frm_mod_left_injective_i_congruence = S frm_residue_injective_i + p * frm_mod_right_injective_i_congruence))
  18. specialize hmap i
  19. apply hmap
  20. exact hi
  21. cases hmi
  22. cases hmi_witness
  23. cases hmi_witness_right
  24. have hmk : exists frm_residue_injective_k. (exists frm_gap_injective_k_residue_bound. frm_gap_injective_k_residue_bound + S frm_residue_injective_k = n) /\ ((((exists ff_h_frm_injective_k_decoded. ff_h_frm_injective_k_decoded + S (frm_residue_injective_k) = S ((S (k)) * s)) /\ exists ff_q_frm_injective_k_decoded. r = ff_q_frm_injective_k_decoded * S ((S (k)) * s) + (frm_residue_injective_k))) /\ (exists frm_mod_left_injective_k_congruence frm_mod_right_injective_k_congruence. a * S k + p * frm_mod_left_injective_k_congruence = S frm_residue_injective_k + p * frm_mod_right_injective_k_congruence))
  25. specialize hmap k
  26. apply hmap
  27. exact hk
  28. cases hmk
  29. cases hmk_witness
  30. cases hmk_witness_right
  31. have hvalue_i : value = x
  32. specialize beta_at_unique r
  33. specialize beta_at_unique s
  34. specialize beta_at_unique i
  35. specialize beta_at_unique value
  36. specialize beta_at_unique x
  37. apply beta_at_unique
  38. exact hri
  39. exact hmi_witness_right_left
  40. have hvalue_k : value = x1
  41. specialize beta_at_unique r
  42. specialize beta_at_unique s
  43. specialize beta_at_unique k
  44. specialize beta_at_unique value
  45. specialize beta_at_unique x1
  46. apply beta_at_unique
  47. exact hrk
  48. exact hmk_witness_right_left
  49. rewrite <- hvalue_i at hmi_witness_right_right
  50. rewrite <- hvalue_k at hmk_witness_right_right
  51. have hreverse : exists frr_reverse_left_injective_reverse frr_reverse_right_injective_reverse. S value + p * frr_reverse_left_injective_reverse = a * S k + p * frr_reverse_right_injective_reverse
  52. specialize mod_eq_symm p
  53. specialize mod_eq_symm (a * S k)
  54. specialize mod_eq_symm (S value)
  55. apply mod_eq_symm
  56. exact hmk_witness_right_right
  57. have hscaled : exists frr_scaled_left_injective_scaled frr_scaled_right_injective_scaled. a * S i + p * frr_scaled_left_injective_scaled = a * S k + p * frr_scaled_right_injective_scaled
  58. specialize mod_eq_trans p
  59. specialize mod_eq_trans (a * S i)
  60. specialize mod_eq_trans (S value)
  61. specialize mod_eq_trans (a * S k)
  62. apply mod_eq_trans
  63. exact hmi_witness_right_right
  64. exact hreverse
  65. have hcancel : exists frr_cancel_left_injective_canceled frr_cancel_right_injective_canceled. S i + p * frr_cancel_left_injective_canceled = S k + p * frr_cancel_right_injective_canceled
  66. specialize prime_mod_cancel p
  67. specialize prime_mod_cancel a
  68. specialize prime_mod_cancel (S i)
  69. specialize prime_mod_cancel (S k)
  70. apply prime_mod_cancel
  71. exact hp
  72. exact hnotdiv
  73. exact hscaled
  74. have hibound : exists frr_successor_bound_injective_i_bound. frr_successor_bound_injective_i_bound + S (S i) = p
  75. rewrite hpn
  76. specialize succ_le_succ (S i)
  77. specialize succ_le_succ n
  78. apply succ_le_succ
  79. exact hi
  80. have hkbound : exists frr_successor_bound_injective_k_bound. frr_successor_bound_injective_k_bound + S (S k) = p
  81. rewrite hpn
  82. specialize succ_le_succ (S k)
  83. specialize succ_le_succ n
  84. apply succ_le_succ
  85. exact hk
  86. have hsucc : S i = S k
  87. specialize mod_eq_bounded_unique p
  88. specialize mod_eq_bounded_unique (S i)
  89. specialize mod_eq_bounded_unique (S k)
  90. apply mod_eq_bounded_unique
  91. exact hibound
  92. exact hkbound
  93. exact hcancel
  94. specialize succ_injective i
  95. specialize succ_injective k
  96. apply succ_injective
  97. exact hsucc
beta_range_one_entry_eq_succ · unchanged support, not a new admission
forall b c l i x. (forall ff_i_frp_range_entry. (exists ff_lt_frp_range_entry_bound. ff_lt_frp_range_entry_bound + S ff_i_frp_range_entry = l) -> (((exists ff_h_frp_range_entry_decoded. ff_h_frp_range_entry_decoded + S (1 + ff_i_frp_range_entry) = S ((S (ff_i_frp_range_entry)) * c)) /\ exists ff_q_frp_range_entry_decoded. b = ff_q_frp_range_entry_decoded * S ((S (ff_i_frp_range_entry)) * c) + (1 + ff_i_frp_range_entry)))) -> (exists frp_gap_entry_bound. frp_gap_entry_bound + S i = l) -> (((exists ff_h_frp_entry. ff_h_frp_entry + S (x) = S ((S (i)) * c)) /\ exists ff_q_frp_entry. b = ff_q_frp_entry * S ((S (i)) * c) + (x))) -> x = S i
  1. intro b
  2. intro c
  3. intro l
  4. intro i
  5. intro x
  6. intro hrange
  7. intro hi
  8. intro hx
  9. have hraw : x = 1 + i
  10. specialize beta_range_entry_eq b
  11. specialize beta_range_entry_eq c
  12. specialize beta_range_entry_eq 1
  13. specialize beta_range_entry_eq l
  14. specialize beta_range_entry_eq i
  15. specialize beta_range_entry_eq x
  16. apply beta_range_entry_eq
  17. exact hrange
  18. exact hi
  19. exact hx
  20. have hone : 1 + i = S i
  21. trans S (0 + i)
  22. specialize add_succ_left 0
  23. specialize add_succ_left i
  24. exact add_succ_left
  25. congr
  26. specialize zero_add i
  27. exact zero_add
  28. trans 1 + i
  29. exact hraw
  30. exact hone
beta_successor_range_reindex_aligned · unchanged support, not a new admission
forall r s b c z d n. (forall fp_i_aligned_bounded. (exists fp_gap_aligned_bounded_index. fp_gap_aligned_bounded_index + S fp_i_aligned_bounded = n) -> exists fp_value_aligned_bounded. ((((exists ff_h_aligned_bounded_entry. ff_h_aligned_bounded_entry + S (fp_value_aligned_bounded) = S ((S (fp_i_aligned_bounded)) * s)) /\ exists ff_q_aligned_bounded_entry. r = ff_q_aligned_bounded_entry * S ((S (fp_i_aligned_bounded)) * s) + (fp_value_aligned_bounded))) /\ (exists fp_gap_aligned_bounded_value. fp_gap_aligned_bounded_value + S fp_value_aligned_bounded = n))) -> (forall ff_i_frp_range_aligned_range. (exists ff_lt_frp_range_aligned_range_bound. ff_lt_frp_range_aligned_range_bound + S ff_i_frp_range_aligned_range = n) -> (((exists ff_h_frp_range_aligned_range_decoded. ff_h_frp_range_aligned_range_decoded + S (1 + ff_i_frp_range_aligned_range) = S ((S (ff_i_frp_range_aligned_range)) * c)) /\ exists ff_q_frp_range_aligned_range_decoded. b = ff_q_frp_range_aligned_range_decoded * S ((S (ff_i_frp_range_aligned_range)) * c) + (1 + ff_i_frp_range_aligned_range)))) -> (forall frr_index_aligned_lift frr_value_aligned_lift. (exists frr_gap_aligned_lift. frr_gap_aligned_lift + S frr_index_aligned_lift = n) -> (((exists ff_h_frr_aligned_lift_source. ff_h_frr_aligned_lift_source + S (frr_value_aligned_lift) = S ((S (frr_index_aligned_lift)) * s)) /\ exists ff_q_frr_aligned_lift_source. r = ff_q_frr_aligned_lift_source * S ((S (frr_index_aligned_lift)) * s) + (frr_value_aligned_lift))) -> (((exists frm_height_frr_aligned_lift_target. frm_height_frr_aligned_lift_target + S (S frr_value_aligned_lift) = S ((S (frr_index_aligned_lift)) * d)) /\ exists frm_quotient_frr_aligned_lift_target. z = frm_quotient_frr_aligned_lift_target * S ((S (frr_index_aligned_lift)) * d) + (S frr_value_aligned_lift)))) -> (forall fpr_i_aligned_result fpr_j_aligned_result fpr_x_aligned_result. (exists fpr_h_aligned_result. fpr_h_aligned_result + S fpr_i_aligned_result = n) -> (((exists ff_h_aligned_result_map. ff_h_aligned_result_map + S (fpr_j_aligned_result) = S ((S (fpr_i_aligned_result)) * s)) /\ exists ff_q_aligned_result_map. r = ff_q_aligned_result_map * S ((S (fpr_i_aligned_result)) * s) + (fpr_j_aligned_result))) -> (((exists ff_h_aligned_result_source. ff_h_aligned_result_source + S (fpr_x_aligned_result) = S ((S (fpr_j_aligned_result)) * c)) /\ exists ff_q_aligned_result_source. b = ff_q_aligned_result_source * S ((S (fpr_j_aligned_result)) * c) + (fpr_x_aligned_result))) -> (((exists ff_h_aligned_result_target. ff_h_aligned_result_target + S (fpr_x_aligned_result) = S ((S (fpr_i_aligned_result)) * d)) /\ exists ff_q_aligned_result_target. z = ff_q_aligned_result_target * S ((S (fpr_i_aligned_result)) * d) + (fpr_x_aligned_result))))
  1. intro r
  2. intro s
  3. intro b
  4. intro c
  5. intro z
  6. intro d
  7. intro n
  8. intro hbounded
  9. intro hrange
  10. intro hlift
  11. intro i
  12. intro j
  13. intro value
  14. intro hi
  15. intro hmap
  16. intro hsource
  17. have hbounded_i : exists frr_value_aligned_entry. (((exists ff_h_frr_aligned_entry_entry. ff_h_frr_aligned_entry_entry + S (frr_value_aligned_entry) = S ((S (i)) * s)) /\ exists ff_q_frr_aligned_entry_entry. r = ff_q_frr_aligned_entry_entry * S ((S (i)) * s) + (frr_value_aligned_entry))) /\ (exists frr_gap_aligned_entry. frr_gap_aligned_entry + S frr_value_aligned_entry = n)
  18. specialize hbounded i
  19. apply hbounded
  20. exact hi
  21. cases hbounded_i
  22. cases hbounded_i_witness
  23. have hjx : j = x
  24. specialize beta_at_unique r
  25. specialize beta_at_unique s
  26. specialize beta_at_unique i
  27. specialize beta_at_unique j
  28. specialize beta_at_unique x
  29. apply beta_at_unique
  30. exact hmap
  31. exact hbounded_i_witness_left
  32. have hjbound : exists frr_gap_aligned_j_bound. frr_gap_aligned_j_bound + S j = n
  33. rewrite hjx
  34. exact hbounded_i_witness_right
  35. have hvalue : value = S j
  36. specialize beta_range_one_entry_eq_succ b
  37. specialize beta_range_one_entry_eq_succ c
  38. specialize beta_range_one_entry_eq_succ n
  39. specialize beta_range_one_entry_eq_succ j
  40. specialize beta_range_one_entry_eq_succ value
  41. apply beta_range_one_entry_eq_succ
  42. exact hrange
  43. exact hjbound
  44. exact hsource
  45. have htarget_succ : ((exists frm_height_aligned_target. frm_height_aligned_target + S (S j) = S ((S (i)) * d)) /\ exists frm_quotient_aligned_target. z = frm_quotient_aligned_target * S ((S (i)) * d) + (S j))
  46. specialize hlift i
  47. specialize hlift j
  48. apply hlift
  49. exact hi
  50. exact hmap
  51. rewrite hvalue
  52. rewrite hvalue
  53. exact htarget_succ
beta_successor_range_scale_mod · unchanged support, not a new admission
forall p n a r s b c z d. (forall frm_index_scale_map. (exists frm_gap_scale_map_index_bound. frm_gap_scale_map_index_bound + S frm_index_scale_map = n) -> (exists frm_residue_scale_map_result. (exists frm_gap_scale_map_result_residue_bound. frm_gap_scale_map_result_residue_bound + S frm_residue_scale_map_result = n) /\ ((((exists ff_h_frm_scale_map_result_decoded. ff_h_frm_scale_map_result_decoded + S (frm_residue_scale_map_result) = S ((S (frm_index_scale_map)) * s)) /\ exists ff_q_frm_scale_map_result_decoded. r = ff_q_frm_scale_map_result_decoded * S ((S (frm_index_scale_map)) * s) + (frm_residue_scale_map_result))) /\ (exists frm_mod_left_scale_map_result_congruence frm_mod_right_scale_map_result_congruence. a * S frm_index_scale_map + p * frm_mod_left_scale_map_result_congruence = S frm_residue_scale_map_result + p * frm_mod_right_scale_map_result_congruence)))) -> (forall ff_i_frp_range_scale_range. (exists ff_lt_frp_range_scale_range_bound. ff_lt_frp_range_scale_range_bound + S ff_i_frp_range_scale_range = n) -> (((exists ff_h_frp_range_scale_range_decoded. ff_h_frp_range_scale_range_decoded + S (1 + ff_i_frp_range_scale_range) = S ((S (ff_i_frp_range_scale_range)) * c)) /\ exists ff_q_frp_range_scale_range_decoded. b = ff_q_frp_range_scale_range_decoded * S ((S (ff_i_frp_range_scale_range)) * c) + (1 + ff_i_frp_range_scale_range)))) -> (forall frr_index_scale_lift frr_value_scale_lift. (exists frr_gap_scale_lift. frr_gap_scale_lift + S frr_index_scale_lift = n) -> (((exists ff_h_frr_scale_lift_source. ff_h_frr_scale_lift_source + S (frr_value_scale_lift) = S ((S (frr_index_scale_lift)) * s)) /\ exists ff_q_frr_scale_lift_source. r = ff_q_frr_scale_lift_source * S ((S (frr_index_scale_lift)) * s) + (frr_value_scale_lift))) -> (((exists frm_height_frr_scale_lift_target. frm_height_frr_scale_lift_target + S (S frr_value_scale_lift) = S ((S (frr_index_scale_lift)) * d)) /\ exists frm_quotient_frr_scale_lift_target. z = frm_quotient_frr_scale_lift_target * S ((S (frr_index_scale_lift)) * d) + (S frr_value_scale_lift)))) -> (forall fsp_index_scale_result fsp_source_scale_result fsp_target_scale_result. (exists fsp_gap_scale_result. fsp_gap_scale_result + S fsp_index_scale_result = n) -> (((exists fsp_source_height_scale_result. fsp_source_height_scale_result + S (fsp_source_scale_result) = S ((S (fsp_index_scale_result)) * c)) /\ exists fsp_source_quotient_scale_result. b = fsp_source_quotient_scale_result * S ((S (fsp_index_scale_result)) * c) + (fsp_source_scale_result))) -> (((exists fsp_target_height_scale_result. fsp_target_height_scale_result + S (fsp_target_scale_result) = S ((S (fsp_index_scale_result)) * d)) /\ exists fsp_target_quotient_scale_result. z = fsp_target_quotient_scale_result * S ((S (fsp_index_scale_result)) * d) + (fsp_target_scale_result))) -> (exists fsp_mod_left_scale_result fsp_mod_right_scale_result. a * fsp_source_scale_result + p * fsp_mod_left_scale_result = fsp_target_scale_result + p * fsp_mod_right_scale_result))
  1. intro p
  2. intro n
  3. intro a
  4. intro r
  5. intro s
  6. intro b
  7. intro c
  8. intro z
  9. intro d
  10. intro hmap
  11. intro hrange
  12. intro hlift
  13. intro i
  14. intro source
  15. intro target
  16. intro hi
  17. intro hsource
  18. intro htarget
  19. have hmi : exists frm_residue_scale_at_i. (exists frm_gap_scale_at_i_residue_bound. frm_gap_scale_at_i_residue_bound + S frm_residue_scale_at_i = n) /\ ((((exists ff_h_frm_scale_at_i_decoded. ff_h_frm_scale_at_i_decoded + S (frm_residue_scale_at_i) = S ((S (i)) * s)) /\ exists ff_q_frm_scale_at_i_decoded. r = ff_q_frm_scale_at_i_decoded * S ((S (i)) * s) + (frm_residue_scale_at_i))) /\ (exists frm_mod_left_scale_at_i_congruence frm_mod_right_scale_at_i_congruence. a * S i + p * frm_mod_left_scale_at_i_congruence = S frm_residue_scale_at_i + p * frm_mod_right_scale_at_i_congruence))
  20. specialize hmap i
  21. apply hmap
  22. exact hi
  23. cases hmi
  24. cases hmi_witness
  25. cases hmi_witness_right
  26. have hsource_value : source = S i
  27. specialize beta_range_one_entry_eq_succ b
  28. specialize beta_range_one_entry_eq_succ c
  29. specialize beta_range_one_entry_eq_succ n
  30. specialize beta_range_one_entry_eq_succ i
  31. specialize beta_range_one_entry_eq_succ source
  32. apply beta_range_one_entry_eq_succ
  33. exact hrange
  34. exact hi
  35. exact hsource
  36. have htarget_succ : ((exists frm_height_scale_target. frm_height_scale_target + S (S x) = S ((S (i)) * d)) /\ exists frm_quotient_scale_target. z = frm_quotient_scale_target * S ((S (i)) * d) + (S x))
  37. specialize hlift i
  38. specialize hlift x
  39. apply hlift
  40. exact hi
  41. exact hmi_witness_right_left
  42. have htarget_value : target = S x
  43. specialize beta_at_unique z
  44. specialize beta_at_unique d
  45. specialize beta_at_unique i
  46. specialize beta_at_unique target
  47. specialize beta_at_unique (S x)
  48. apply beta_at_unique
  49. exact htarget
  50. exact htarget_succ
  51. rewrite hsource_value
  52. rewrite htarget_value
  53. exact hmi_witness_right_right
prime_mul_residue_reindex_exists · unchanged support, not a new admission
forall p n a b c. p = S n -> ((~(p = 1) /\ forall frm_prime_left_package_prime frm_prime_right_package_prime. p = frm_prime_left_package_prime * frm_prime_right_package_prime -> frm_prime_left_package_prime = 1 \/ frm_prime_right_package_prime = 1)) -> (~(exists frm_factor_package_multiplier. a = p * frm_factor_package_multiplier)) -> (forall ff_i_frp_range_package_range. (exists ff_lt_frp_range_package_range_bound. ff_lt_frp_range_package_range_bound + S ff_i_frp_range_package_range = n) -> (((exists ff_h_frp_range_package_range_decoded. ff_h_frp_range_package_range_decoded + S (1 + ff_i_frp_range_package_range) = S ((S (ff_i_frp_range_package_range)) * c)) /\ exists ff_q_frp_range_package_range_decoded. b = ff_q_frp_range_package_range_decoded * S ((S (ff_i_frp_range_package_range)) * c) + (1 + ff_i_frp_range_package_range)))) -> exists r s z d. (forall fp_i_package_result_bounded. (exists fp_gap_package_result_bounded_index. fp_gap_package_result_bounded_index + S fp_i_package_result_bounded = n) -> exists fp_value_package_result_bounded. ((((exists ff_h_package_result_bounded_entry. ff_h_package_result_bounded_entry + S (fp_value_package_result_bounded) = S ((S (fp_i_package_result_bounded)) * s)) /\ exists ff_q_package_result_bounded_entry. r = ff_q_package_result_bounded_entry * S ((S (fp_i_package_result_bounded)) * s) + (fp_value_package_result_bounded))) /\ (exists fp_gap_package_result_bounded_value. fp_gap_package_result_bounded_value + S fp_value_package_result_bounded = n))) /\ ((forall fp_i_package_result_injective fp_j_package_result_injective fp_value_package_result_injective. (exists fp_gap_package_result_injective_i. fp_gap_package_result_injective_i + S fp_i_package_result_injective = n) -> (exists fp_gap_package_result_injective_j. fp_gap_package_result_injective_j + S fp_j_package_result_injective = n) -> (((exists ff_h_package_result_injective_left. ff_h_package_result_injective_left + S (fp_value_package_result_injective) = S ((S (fp_i_package_result_injective)) * s)) /\ exists ff_q_package_result_injective_left. r = ff_q_package_result_injective_left * S ((S (fp_i_package_result_injective)) * s) + (fp_value_package_result_injective))) -> (((exists ff_h_package_result_injective_right. ff_h_package_result_injective_right + S (fp_value_package_result_injective) = S ((S (fp_j_package_result_injective)) * s)) /\ exists ff_q_package_result_injective_right. r = ff_q_package_result_injective_right * S ((S (fp_j_package_result_injective)) * s) + (fp_value_package_result_injective))) -> fp_i_package_result_injective = fp_j_package_result_injective) /\ ((forall fpr_i_package_result_aligned fpr_j_package_result_aligned fpr_x_package_result_aligned. (exists fpr_h_package_result_aligned. fpr_h_package_result_aligned + S fpr_i_package_result_aligned = n) -> (((exists ff_h_package_result_aligned_map. ff_h_package_result_aligned_map + S (fpr_j_package_result_aligned) = S ((S (fpr_i_package_result_aligned)) * s)) /\ exists ff_q_package_result_aligned_map. r = ff_q_package_result_aligned_map * S ((S (fpr_i_package_result_aligned)) * s) + (fpr_j_package_result_aligned))) -> (((exists ff_h_package_result_aligned_source. ff_h_package_result_aligned_source + S (fpr_x_package_result_aligned) = S ((S (fpr_j_package_result_aligned)) * c)) /\ exists ff_q_package_result_aligned_source. b = ff_q_package_result_aligned_source * S ((S (fpr_j_package_result_aligned)) * c) + (fpr_x_package_result_aligned))) -> (((exists ff_h_package_result_aligned_target. ff_h_package_result_aligned_target + S (fpr_x_package_result_aligned) = S ((S (fpr_i_package_result_aligned)) * d)) /\ exists ff_q_package_result_aligned_target. z = ff_q_package_result_aligned_target * S ((S (fpr_i_package_result_aligned)) * d) + (fpr_x_package_result_aligned)))) /\ (forall fsp_index_package_result_scale fsp_source_package_result_scale fsp_target_package_result_scale. (exists fsp_gap_package_result_scale. fsp_gap_package_result_scale + S fsp_index_package_result_scale = n) -> (((exists fsp_source_height_package_result_scale. fsp_source_height_package_result_scale + S (fsp_source_package_result_scale) = S ((S (fsp_index_package_result_scale)) * c)) /\ exists fsp_source_quotient_package_result_scale. b = fsp_source_quotient_package_result_scale * S ((S (fsp_index_package_result_scale)) * c) + (fsp_source_package_result_scale))) -> (((exists fsp_target_height_package_result_scale. fsp_target_height_package_result_scale + S (fsp_target_package_result_scale) = S ((S (fsp_index_package_result_scale)) * d)) /\ exists fsp_target_quotient_package_result_scale. z = fsp_target_quotient_package_result_scale * S ((S (fsp_index_package_result_scale)) * d) + (fsp_target_package_result_scale))) -> (exists fsp_mod_left_package_result_scale fsp_mod_right_package_result_scale. a * fsp_source_package_result_scale + p * fsp_mod_left_package_result_scale = fsp_target_package_result_scale + p * fsp_mod_right_package_result_scale))))
  1. intro p
  2. intro n
  3. intro a
  4. intro b
  5. intro c
  6. intro hpn
  7. intro hp
  8. intro hnotdiv
  9. intro hrange
  10. have hmaps : exists r s. (forall frm_index_package_map. (exists frm_gap_package_map_index_bound. frm_gap_package_map_index_bound + S frm_index_package_map = n) -> (exists frm_residue_package_map_result. (exists frm_gap_package_map_result_residue_bound. frm_gap_package_map_result_residue_bound + S frm_residue_package_map_result = n) /\ ((((exists ff_h_frm_package_map_result_decoded. ff_h_frm_package_map_result_decoded + S (frm_residue_package_map_result) = S ((S (frm_index_package_map)) * s)) /\ exists ff_q_frm_package_map_result_decoded. r = ff_q_frm_package_map_result_decoded * S ((S (frm_index_package_map)) * s) + (frm_residue_package_map_result))) /\ (exists frm_mod_left_package_map_result_congruence frm_mod_right_package_map_result_congruence. a * S frm_index_package_map + p * frm_mod_left_package_map_result_congruence = S frm_residue_package_map_result + p * frm_mod_right_package_map_result_congruence))))
  11. specialize prime_mul_index_map_exists_up_to n
  12. specialize prime_mul_index_map_exists_up_to n
  13. specialize prime_mul_index_map_exists_up_to p
  14. specialize prime_mul_index_map_exists_up_to a
  15. apply prime_mul_index_map_exists_up_to
  16. specialize le_refl n
  17. exact le_refl
  18. exact hpn
  19. exact hp
  20. exact hnotdiv
  21. cases hmaps
  22. cases hmaps_witness
  23. have hlifts : exists z d. (forall frr_index_package_lift frr_value_package_lift. (exists frr_gap_package_lift. frr_gap_package_lift + S frr_index_package_lift = n) -> (((exists ff_h_frr_package_lift_source. ff_h_frr_package_lift_source + S (frr_value_package_lift) = S ((S (frr_index_package_lift)) * x1)) /\ exists ff_q_frr_package_lift_source. x = ff_q_frr_package_lift_source * S ((S (frr_index_package_lift)) * x1) + (frr_value_package_lift))) -> (((exists frm_height_frr_package_lift_target. frm_height_frr_package_lift_target + S (S frr_value_package_lift) = S ((S (frr_index_package_lift)) * d)) /\ exists frm_quotient_frr_package_lift_target. z = frm_quotient_frr_package_lift_target * S ((S (frr_index_package_lift)) * d) + (S frr_value_package_lift))))
  24. specialize beta_successor_lift_exists x
  25. specialize beta_successor_lift_exists x1
  26. specialize beta_successor_lift_exists n
  27. exact beta_successor_lift_exists
  28. cases hlifts
  29. cases hlifts_witness
  30. have hbounded : forall fp_i_package_bounded. (exists fp_gap_package_bounded_index. fp_gap_package_bounded_index + S fp_i_package_bounded = n) -> exists fp_value_package_bounded. ((((exists ff_h_package_bounded_entry. ff_h_package_bounded_entry + S (fp_value_package_bounded) = S ((S (fp_i_package_bounded)) * x1)) /\ exists ff_q_package_bounded_entry. x = ff_q_package_bounded_entry * S ((S (fp_i_package_bounded)) * x1) + (fp_value_package_bounded))) /\ (exists fp_gap_package_bounded_value. fp_gap_package_bounded_value + S fp_value_package_bounded = n))
  31. specialize fermat_index_map_bounded x
  32. specialize fermat_index_map_bounded x1
  33. specialize fermat_index_map_bounded n
  34. specialize fermat_index_map_bounded p
  35. specialize fermat_index_map_bounded a
  36. apply fermat_index_map_bounded
  37. exact hmaps_witness_witness
  38. have hinjective : forall fp_i_package_injective fp_j_package_injective fp_value_package_injective. (exists fp_gap_package_injective_i. fp_gap_package_injective_i + S fp_i_package_injective = n) -> (exists fp_gap_package_injective_j. fp_gap_package_injective_j + S fp_j_package_injective = n) -> (((exists ff_h_package_injective_left. ff_h_package_injective_left + S (fp_value_package_injective) = S ((S (fp_i_package_injective)) * x1)) /\ exists ff_q_package_injective_left. x = ff_q_package_injective_left * S ((S (fp_i_package_injective)) * x1) + (fp_value_package_injective))) -> (((exists ff_h_package_injective_right. ff_h_package_injective_right + S (fp_value_package_injective) = S ((S (fp_j_package_injective)) * x1)) /\ exists ff_q_package_injective_right. x = ff_q_package_injective_right * S ((S (fp_j_package_injective)) * x1) + (fp_value_package_injective))) -> fp_i_package_injective = fp_j_package_injective
  39. specialize prime_mul_index_map_injective p
  40. specialize prime_mul_index_map_injective n
  41. specialize prime_mul_index_map_injective a
  42. specialize prime_mul_index_map_injective x
  43. specialize prime_mul_index_map_injective x1
  44. apply prime_mul_index_map_injective
  45. exact hpn
  46. exact hp
  47. exact hnotdiv
  48. exact hmaps_witness_witness
  49. have haligned : forall fpr_i_package_aligned fpr_j_package_aligned fpr_x_package_aligned. (exists fpr_h_package_aligned. fpr_h_package_aligned + S fpr_i_package_aligned = n) -> (((exists ff_h_package_aligned_map. ff_h_package_aligned_map + S (fpr_j_package_aligned) = S ((S (fpr_i_package_aligned)) * x1)) /\ exists ff_q_package_aligned_map. x = ff_q_package_aligned_map * S ((S (fpr_i_package_aligned)) * x1) + (fpr_j_package_aligned))) -> (((exists ff_h_package_aligned_source. ff_h_package_aligned_source + S (fpr_x_package_aligned) = S ((S (fpr_j_package_aligned)) * c)) /\ exists ff_q_package_aligned_source. b = ff_q_package_aligned_source * S ((S (fpr_j_package_aligned)) * c) + (fpr_x_package_aligned))) -> (((exists ff_h_package_aligned_target. ff_h_package_aligned_target + S (fpr_x_package_aligned) = S ((S (fpr_i_package_aligned)) * x3)) /\ exists ff_q_package_aligned_target. x2 = ff_q_package_aligned_target * S ((S (fpr_i_package_aligned)) * x3) + (fpr_x_package_aligned)))
  50. specialize beta_successor_range_reindex_aligned x
  51. specialize beta_successor_range_reindex_aligned x1
  52. specialize beta_successor_range_reindex_aligned b
  53. specialize beta_successor_range_reindex_aligned c
  54. specialize beta_successor_range_reindex_aligned x2
  55. specialize beta_successor_range_reindex_aligned x3
  56. specialize beta_successor_range_reindex_aligned n
  57. apply beta_successor_range_reindex_aligned
  58. exact hbounded
  59. exact hrange
  60. exact hlifts_witness_witness
  61. have hscale : forall fsp_index_package_scale fsp_source_package_scale fsp_target_package_scale. (exists fsp_gap_package_scale. fsp_gap_package_scale + S fsp_index_package_scale = n) -> (((exists fsp_source_height_package_scale. fsp_source_height_package_scale + S (fsp_source_package_scale) = S ((S (fsp_index_package_scale)) * c)) /\ exists fsp_source_quotient_package_scale. b = fsp_source_quotient_package_scale * S ((S (fsp_index_package_scale)) * c) + (fsp_source_package_scale))) -> (((exists fsp_target_height_package_scale. fsp_target_height_package_scale + S (fsp_target_package_scale) = S ((S (fsp_index_package_scale)) * x3)) /\ exists fsp_target_quotient_package_scale. x2 = fsp_target_quotient_package_scale * S ((S (fsp_index_package_scale)) * x3) + (fsp_target_package_scale))) -> (exists fsp_mod_left_package_scale fsp_mod_right_package_scale. a * fsp_source_package_scale + p * fsp_mod_left_package_scale = fsp_target_package_scale + p * fsp_mod_right_package_scale)
  62. specialize beta_successor_range_scale_mod p
  63. specialize beta_successor_range_scale_mod n
  64. specialize beta_successor_range_scale_mod a
  65. specialize beta_successor_range_scale_mod x
  66. specialize beta_successor_range_scale_mod x1
  67. specialize beta_successor_range_scale_mod b
  68. specialize beta_successor_range_scale_mod c
  69. specialize beta_successor_range_scale_mod x2
  70. specialize beta_successor_range_scale_mod x3
  71. apply beta_successor_range_scale_mod
  72. exact hmaps_witness_witness
  73. exact hrange
  74. exact hlifts_witness_witness
  75. exists x
  76. exists x1
  77. exists x2
  78. exists x3
  79. split
  80. exact hbounded
  81. split
  82. exact hinjective
  83. split
  84. exact haligned
  85. exact hscale
prime_mul_residue_product_balance · unchanged support, not a new admission
forall p n a b c F A. p = S n -> ((~(p = 1) /\ forall frm_prime_left_balance_prime frm_prime_right_balance_prime. p = frm_prime_left_balance_prime * frm_prime_right_balance_prime -> frm_prime_left_balance_prime = 1 \/ frm_prime_right_balance_prime = 1)) -> (~(exists frm_factor_balance_multiplier. a = p * frm_factor_balance_multiplier)) -> (forall ff_i_frp_range_balance_range. (exists ff_lt_frp_range_balance_range_bound. ff_lt_frp_range_balance_range_bound + S ff_i_frp_range_balance_range = n) -> (((exists ff_h_frp_range_balance_range_decoded. ff_h_frp_range_balance_range_decoded + S (1 + ff_i_frp_range_balance_range) = S ((S (ff_i_frp_range_balance_range)) * c)) /\ exists ff_q_frp_range_balance_range_decoded. b = ff_q_frp_range_balance_range_decoded * S ((S (ff_i_frp_range_balance_range)) * c) + (1 + ff_i_frp_range_balance_range)))) -> (exists ff_u_balance_source ff_v_balance_source. ((((exists ff_h_balance_source_start. ff_h_balance_source_start + S (1) = S ((S (0)) * ff_v_balance_source)) /\ exists ff_q_balance_source_start. ff_u_balance_source = ff_q_balance_source_start * S ((S (0)) * ff_v_balance_source) + (1))) /\ ((((exists ff_h_balance_source_terminal. ff_h_balance_source_terminal + S (F) = S ((S (n)) * ff_v_balance_source)) /\ exists ff_q_balance_source_terminal. ff_u_balance_source = ff_q_balance_source_terminal * S ((S (n)) * ff_v_balance_source) + (F))) /\ forall ff_i_balance_source. (exists ff_lt_balance_source_bound. ff_lt_balance_source_bound + S ff_i_balance_source = n) -> exists ff_p_balance_source ff_r_balance_source ff_s_balance_source. ((((exists ff_h_balance_source_factor. ff_h_balance_source_factor + S (ff_p_balance_source) = S ((S (ff_i_balance_source)) * c)) /\ exists ff_q_balance_source_factor. b = ff_q_balance_source_factor * S ((S (ff_i_balance_source)) * c) + (ff_p_balance_source))) /\ ((((exists ff_h_balance_source_partial. ff_h_balance_source_partial + S (ff_r_balance_source) = S ((S (ff_i_balance_source)) * ff_v_balance_source)) /\ exists ff_q_balance_source_partial. ff_u_balance_source = ff_q_balance_source_partial * S ((S (ff_i_balance_source)) * ff_v_balance_source) + (ff_r_balance_source))) /\ ((((exists ff_h_balance_source_successor. ff_h_balance_source_successor + S (ff_s_balance_source) = S ((S (S ff_i_balance_source)) * ff_v_balance_source)) /\ exists ff_q_balance_source_successor. ff_u_balance_source = ff_q_balance_source_successor * S ((S (S ff_i_balance_source)) * ff_v_balance_source) + (ff_s_balance_source))) /\ ff_s_balance_source = ff_r_balance_source * ff_p_balance_source)))))) -> (exists ff_b_balance_power ff_c_balance_power. ((forall ff_i_balance_power_repeat. (exists ff_lt_balance_power_repeat_bound. ff_lt_balance_power_repeat_bound + S ff_i_balance_power_repeat = n) -> (((exists ff_h_balance_power_repeat_decoded. ff_h_balance_power_repeat_decoded + S (a) = S ((S (ff_i_balance_power_repeat)) * ff_c_balance_power)) /\ exists ff_q_balance_power_repeat_decoded. ff_b_balance_power = ff_q_balance_power_repeat_decoded * S ((S (ff_i_balance_power_repeat)) * ff_c_balance_power) + (a)))) /\ (exists ff_u_balance_power_product ff_v_balance_power_product. ((((exists ff_h_balance_power_product_start. ff_h_balance_power_product_start + S (1) = S ((S (0)) * ff_v_balance_power_product)) /\ exists ff_q_balance_power_product_start. ff_u_balance_power_product = ff_q_balance_power_product_start * S ((S (0)) * ff_v_balance_power_product) + (1))) /\ ((((exists ff_h_balance_power_product_terminal. ff_h_balance_power_product_terminal + S (A) = S ((S (n)) * ff_v_balance_power_product)) /\ exists ff_q_balance_power_product_terminal. ff_u_balance_power_product = ff_q_balance_power_product_terminal * S ((S (n)) * ff_v_balance_power_product) + (A))) /\ forall ff_i_balance_power_product. (exists ff_lt_balance_power_product_bound. ff_lt_balance_power_product_bound + S ff_i_balance_power_product = n) -> exists ff_p_balance_power_product ff_r_balance_power_product ff_s_balance_power_product. ((((exists ff_h_balance_power_product_factor. ff_h_balance_power_product_factor + S (ff_p_balance_power_product) = S ((S (ff_i_balance_power_product)) * ff_c_balance_power)) /\ exists ff_q_balance_power_product_factor. ff_b_balance_power = ff_q_balance_power_product_factor * S ((S (ff_i_balance_power_product)) * ff_c_balance_power) + (ff_p_balance_power_product))) /\ ((((exists ff_h_balance_power_product_partial. ff_h_balance_power_product_partial + S (ff_r_balance_power_product) = S ((S (ff_i_balance_power_product)) * ff_v_balance_power_product)) /\ exists ff_q_balance_power_product_partial. ff_u_balance_power_product = ff_q_balance_power_product_partial * S ((S (ff_i_balance_power_product)) * ff_v_balance_power_product) + (ff_r_balance_power_product))) /\ ((((exists ff_h_balance_power_product_successor. ff_h_balance_power_product_successor + S (ff_s_balance_power_product) = S ((S (S ff_i_balance_power_product)) * ff_v_balance_power_product)) /\ exists ff_q_balance_power_product_successor. ff_u_balance_power_product = ff_q_balance_power_product_successor * S ((S (S ff_i_balance_power_product)) * ff_v_balance_power_product) + (ff_s_balance_power_product))) /\ ff_s_balance_power_product = ff_r_balance_power_product * ff_p_balance_power_product)))))))) -> (exists fsp_product_mod_left_balance_result fsp_product_mod_right_balance_result. (A * F) + p * fsp_product_mod_left_balance_result = F + p * fsp_product_mod_right_balance_result)
  1. intro p
  2. intro n
  3. intro a
  4. intro b
  5. intro c
  6. intro F
  7. intro A
  8. intro hpn
  9. intro hp
  10. intro hnotdiv
  11. intro hrange
  12. intro hF
  13. intro hA
  14. have hreindex : exists fpb_map_code_balance_reindex fpb_map_scale_balance_reindex fpb_target_code_balance_reindex fpb_target_scale_balance_reindex. ((forall fp_i_fpb_balance_reindex_data_bounded. (exists fp_gap_fpb_balance_reindex_data_bounded_index. fp_gap_fpb_balance_reindex_data_bounded_index + S fp_i_fpb_balance_reindex_data_bounded = n) -> exists fp_value_fpb_balance_reindex_data_bounded. ((((exists ff_h_fpb_balance_reindex_data_bounded_entry. ff_h_fpb_balance_reindex_data_bounded_entry + S (fp_value_fpb_balance_reindex_data_bounded) = S ((S (fp_i_fpb_balance_reindex_data_bounded)) * fpb_map_scale_balance_reindex)) /\ exists ff_q_fpb_balance_reindex_data_bounded_entry. fpb_map_code_balance_reindex = ff_q_fpb_balance_reindex_data_bounded_entry * S ((S (fp_i_fpb_balance_reindex_data_bounded)) * fpb_map_scale_balance_reindex) + (fp_value_fpb_balance_reindex_data_bounded))) /\ (exists fp_gap_fpb_balance_reindex_data_bounded_value. fp_gap_fpb_balance_reindex_data_bounded_value + S fp_value_fpb_balance_reindex_data_bounded = n))) /\ ((forall fp_i_fpb_balance_reindex_data_injective fp_j_fpb_balance_reindex_data_injective fp_value_fpb_balance_reindex_data_injective. (exists fp_gap_fpb_balance_reindex_data_injective_i. fp_gap_fpb_balance_reindex_data_injective_i + S fp_i_fpb_balance_reindex_data_injective = n) -> (exists fp_gap_fpb_balance_reindex_data_injective_j. fp_gap_fpb_balance_reindex_data_injective_j + S fp_j_fpb_balance_reindex_data_injective = n) -> (((exists ff_h_fpb_balance_reindex_data_injective_left. ff_h_fpb_balance_reindex_data_injective_left + S (fp_value_fpb_balance_reindex_data_injective) = S ((S (fp_i_fpb_balance_reindex_data_injective)) * fpb_map_scale_balance_reindex)) /\ exists ff_q_fpb_balance_reindex_data_injective_left. fpb_map_code_balance_reindex = ff_q_fpb_balance_reindex_data_injective_left * S ((S (fp_i_fpb_balance_reindex_data_injective)) * fpb_map_scale_balance_reindex) + (fp_value_fpb_balance_reindex_data_injective))) -> (((exists ff_h_fpb_balance_reindex_data_injective_right. ff_h_fpb_balance_reindex_data_injective_right + S (fp_value_fpb_balance_reindex_data_injective) = S ((S (fp_j_fpb_balance_reindex_data_injective)) * fpb_map_scale_balance_reindex)) /\ exists ff_q_fpb_balance_reindex_data_injective_right. fpb_map_code_balance_reindex = ff_q_fpb_balance_reindex_data_injective_right * S ((S (fp_j_fpb_balance_reindex_data_injective)) * fpb_map_scale_balance_reindex) + (fp_value_fpb_balance_reindex_data_injective))) -> fp_i_fpb_balance_reindex_data_injective = fp_j_fpb_balance_reindex_data_injective) /\ ((forall fpr_i_fpb_balance_reindex_data_aligned fpr_j_fpb_balance_reindex_data_aligned fpr_x_fpb_balance_reindex_data_aligned. (exists fpr_h_fpb_balance_reindex_data_aligned. fpr_h_fpb_balance_reindex_data_aligned + S fpr_i_fpb_balance_reindex_data_aligned = n) -> (((exists ff_h_fpb_balance_reindex_data_aligned_map. ff_h_fpb_balance_reindex_data_aligned_map + S (fpr_j_fpb_balance_reindex_data_aligned) = S ((S (fpr_i_fpb_balance_reindex_data_aligned)) * fpb_map_scale_balance_reindex)) /\ exists ff_q_fpb_balance_reindex_data_aligned_map. fpb_map_code_balance_reindex = ff_q_fpb_balance_reindex_data_aligned_map * S ((S (fpr_i_fpb_balance_reindex_data_aligned)) * fpb_map_scale_balance_reindex) + (fpr_j_fpb_balance_reindex_data_aligned))) -> (((exists ff_h_fpb_balance_reindex_data_aligned_source. ff_h_fpb_balance_reindex_data_aligned_source + S (fpr_x_fpb_balance_reindex_data_aligned) = S ((S (fpr_j_fpb_balance_reindex_data_aligned)) * c)) /\ exists ff_q_fpb_balance_reindex_data_aligned_source. b = ff_q_fpb_balance_reindex_data_aligned_source * S ((S (fpr_j_fpb_balance_reindex_data_aligned)) * c) + (fpr_x_fpb_balance_reindex_data_aligned))) -> (((exists ff_h_fpb_balance_reindex_data_aligned_target. ff_h_fpb_balance_reindex_data_aligned_target + S (fpr_x_fpb_balance_reindex_data_aligned) = S ((S (fpr_i_fpb_balance_reindex_data_aligned)) * fpb_target_scale_balance_reindex)) /\ exists ff_q_fpb_balance_reindex_data_aligned_target. fpb_target_code_balance_reindex = ff_q_fpb_balance_reindex_data_aligned_target * S ((S (fpr_i_fpb_balance_reindex_data_aligned)) * fpb_target_scale_balance_reindex) + (fpr_x_fpb_balance_reindex_data_aligned)))) /\ (forall fsp_index_fpb_balance_reindex_data_scaled fsp_source_fpb_balance_reindex_data_scaled fsp_target_fpb_balance_reindex_data_scaled. (exists fsp_gap_fpb_balance_reindex_data_scaled. fsp_gap_fpb_balance_reindex_data_scaled + S fsp_index_fpb_balance_reindex_data_scaled = n) -> (((exists fsp_source_height_fpb_balance_reindex_data_scaled. fsp_source_height_fpb_balance_reindex_data_scaled + S (fsp_source_fpb_balance_reindex_data_scaled) = S ((S (fsp_index_fpb_balance_reindex_data_scaled)) * c)) /\ exists fsp_source_quotient_fpb_balance_reindex_data_scaled. b = fsp_source_quotient_fpb_balance_reindex_data_scaled * S ((S (fsp_index_fpb_balance_reindex_data_scaled)) * c) + (fsp_source_fpb_balance_reindex_data_scaled))) -> (((exists fsp_target_height_fpb_balance_reindex_data_scaled. fsp_target_height_fpb_balance_reindex_data_scaled + S (fsp_target_fpb_balance_reindex_data_scaled) = S ((S (fsp_index_fpb_balance_reindex_data_scaled)) * fpb_target_scale_balance_reindex)) /\ exists fsp_target_quotient_fpb_balance_reindex_data_scaled. fpb_target_code_balance_reindex = fsp_target_quotient_fpb_balance_reindex_data_scaled * S ((S (fsp_index_fpb_balance_reindex_data_scaled)) * fpb_target_scale_balance_reindex) + (fsp_target_fpb_balance_reindex_data_scaled))) -> (exists fsp_mod_left_fpb_balance_reindex_data_scaled fsp_mod_right_fpb_balance_reindex_data_scaled. a * fsp_source_fpb_balance_reindex_data_scaled + p * fsp_mod_left_fpb_balance_reindex_data_scaled = fsp_target_fpb_balance_reindex_data_scaled + p * fsp_mod_right_fpb_balance_reindex_data_scaled)))))
  15. specialize prime_mul_residue_reindex_exists p
  16. specialize prime_mul_residue_reindex_exists n
  17. specialize prime_mul_residue_reindex_exists a
  18. specialize prime_mul_residue_reindex_exists b
  19. specialize prime_mul_residue_reindex_exists c
  20. apply prime_mul_residue_reindex_exists
  21. exact hpn
  22. exact hp
  23. exact hnotdiv
  24. exact hrange
  25. cases hreindex
  26. cases hreindex_witness
  27. cases hreindex_witness_witness
  28. cases hreindex_witness_witness_witness
  29. cases hreindex_witness_witness_witness_witness
  30. cases hreindex_witness_witness_witness_witness_right
  31. cases hreindex_witness_witness_witness_witness_right_right
  32. have htarget_product_exists : exists Q. (exists ff_u_balance_target_exists ff_v_balance_target_exists. ((((exists ff_h_balance_target_exists_start. ff_h_balance_target_exists_start + S (1) = S ((S (0)) * ff_v_balance_target_exists)) /\ exists ff_q_balance_target_exists_start. ff_u_balance_target_exists = ff_q_balance_target_exists_start * S ((S (0)) * ff_v_balance_target_exists) + (1))) /\ ((((exists ff_h_balance_target_exists_terminal. ff_h_balance_target_exists_terminal + S (Q) = S ((S (n)) * ff_v_balance_target_exists)) /\ exists ff_q_balance_target_exists_terminal. ff_u_balance_target_exists = ff_q_balance_target_exists_terminal * S ((S (n)) * ff_v_balance_target_exists) + (Q))) /\ forall ff_i_balance_target_exists. (exists ff_lt_balance_target_exists_bound. ff_lt_balance_target_exists_bound + S ff_i_balance_target_exists = n) -> exists ff_p_balance_target_exists ff_r_balance_target_exists ff_s_balance_target_exists. ((((exists ff_h_balance_target_exists_factor. ff_h_balance_target_exists_factor + S (ff_p_balance_target_exists) = S ((S (ff_i_balance_target_exists)) * x3)) /\ exists ff_q_balance_target_exists_factor. x2 = ff_q_balance_target_exists_factor * S ((S (ff_i_balance_target_exists)) * x3) + (ff_p_balance_target_exists))) /\ ((((exists ff_h_balance_target_exists_partial. ff_h_balance_target_exists_partial + S (ff_r_balance_target_exists) = S ((S (ff_i_balance_target_exists)) * ff_v_balance_target_exists)) /\ exists ff_q_balance_target_exists_partial. ff_u_balance_target_exists = ff_q_balance_target_exists_partial * S ((S (ff_i_balance_target_exists)) * ff_v_balance_target_exists) + (ff_r_balance_target_exists))) /\ ((((exists ff_h_balance_target_exists_successor. ff_h_balance_target_exists_successor + S (ff_s_balance_target_exists) = S ((S (S ff_i_balance_target_exists)) * ff_v_balance_target_exists)) /\ exists ff_q_balance_target_exists_successor. ff_u_balance_target_exists = ff_q_balance_target_exists_successor * S ((S (S ff_i_balance_target_exists)) * ff_v_balance_target_exists) + (ff_s_balance_target_exists))) /\ ff_s_balance_target_exists = ff_r_balance_target_exists * ff_p_balance_target_exists))))))
  33. specialize beta_product_exists x2
  34. specialize beta_product_exists x3
  35. specialize beta_product_exists n
  36. exact beta_product_exists
  37. cases htarget_product_exists
  38. have hFQ : F = x4
  39. specialize beta_product_permutation_invariant n
  40. specialize beta_product_permutation_invariant x
  41. specialize beta_product_permutation_invariant x1
  42. specialize beta_product_permutation_invariant b
  43. specialize beta_product_permutation_invariant c
  44. specialize beta_product_permutation_invariant x2
  45. specialize beta_product_permutation_invariant x3
  46. specialize beta_product_permutation_invariant F
  47. specialize beta_product_permutation_invariant x4
  48. apply beta_product_permutation_invariant
  49. exact hreindex_witness_witness_witness_witness_left
  50. exact hreindex_witness_witness_witness_witness_right_left
  51. exact hreindex_witness_witness_witness_witness_right_right_left
  52. exact hF
  53. exact htarget_product_exists_witness
  54. have hscale : exists fsp_product_mod_left_balance_scaled_product fsp_product_mod_right_balance_scaled_product. (A * F) + p * fsp_product_mod_left_balance_scaled_product = x4 + p * fsp_product_mod_right_balance_scaled_product
  55. specialize beta_product_pointwise_scale_mod p
  56. specialize beta_product_pointwise_scale_mod a
  57. specialize beta_product_pointwise_scale_mod b
  58. specialize beta_product_pointwise_scale_mod c
  59. specialize beta_product_pointwise_scale_mod x2
  60. specialize beta_product_pointwise_scale_mod x3
  61. specialize beta_product_pointwise_scale_mod n
  62. specialize beta_product_pointwise_scale_mod F
  63. specialize beta_product_pointwise_scale_mod x4
  64. specialize beta_product_pointwise_scale_mod A
  65. apply beta_product_pointwise_scale_mod
  66. exact hreindex_witness_witness_witness_witness_right_right_right
  67. exact hF
  68. exact htarget_product_exists_witness
  69. exact hA
  70. rewrite <- hFQ at hscale
  71. exact hscale
prime_range_product_coprime · unchanged support, not a new admission
forall p n b c F. p = S n -> ((~(p = 1) /\ forall frp_prime_left_prime_p frp_prime_right_prime_p. p = frp_prime_left_prime_p * frp_prime_right_prime_p -> frp_prime_left_prime_p = 1 \/ frp_prime_right_prime_p = 1)) -> (forall ff_i_frp_range_prime_range. (exists ff_lt_frp_range_prime_range_bound. ff_lt_frp_range_prime_range_bound + S ff_i_frp_range_prime_range = n) -> (((exists ff_h_frp_range_prime_range_decoded. ff_h_frp_range_prime_range_decoded + S (1 + ff_i_frp_range_prime_range) = S ((S (ff_i_frp_range_prime_range)) * c)) /\ exists ff_q_frp_range_prime_range_decoded. b = ff_q_frp_range_prime_range_decoded * S ((S (ff_i_frp_range_prime_range)) * c) + (1 + ff_i_frp_range_prime_range)))) -> (exists ff_u_prime_product ff_v_prime_product. ((((exists ff_h_prime_product_start. ff_h_prime_product_start + S (1) = S ((S (0)) * ff_v_prime_product)) /\ exists ff_q_prime_product_start. ff_u_prime_product = ff_q_prime_product_start * S ((S (0)) * ff_v_prime_product) + (1))) /\ ((((exists ff_h_prime_product_terminal. ff_h_prime_product_terminal + S (F) = S ((S (n)) * ff_v_prime_product)) /\ exists ff_q_prime_product_terminal. ff_u_prime_product = ff_q_prime_product_terminal * S ((S (n)) * ff_v_prime_product) + (F))) /\ forall ff_i_prime_product. (exists ff_lt_prime_product_bound. ff_lt_prime_product_bound + S ff_i_prime_product = n) -> exists ff_p_prime_product ff_r_prime_product ff_s_prime_product. ((((exists ff_h_prime_product_factor. ff_h_prime_product_factor + S (ff_p_prime_product) = S ((S (ff_i_prime_product)) * c)) /\ exists ff_q_prime_product_factor. b = ff_q_prime_product_factor * S ((S (ff_i_prime_product)) * c) + (ff_p_prime_product))) /\ ((((exists ff_h_prime_product_partial. ff_h_prime_product_partial + S (ff_r_prime_product) = S ((S (ff_i_prime_product)) * ff_v_prime_product)) /\ exists ff_q_prime_product_partial. ff_u_prime_product = ff_q_prime_product_partial * S ((S (ff_i_prime_product)) * ff_v_prime_product) + (ff_r_prime_product))) /\ ((((exists ff_h_prime_product_successor. ff_h_prime_product_successor + S (ff_s_prime_product) = S ((S (S ff_i_prime_product)) * ff_v_prime_product)) /\ exists ff_q_prime_product_successor. ff_u_prime_product = ff_q_prime_product_successor * S ((S (S ff_i_prime_product)) * ff_v_prime_product) + (ff_s_prime_product))) /\ ff_s_prime_product = ff_r_prime_product * ff_p_prime_product)))))) -> (forall frp_divisor_prime_product_result. (exists frp_left_factor_prime_product_result. F = frp_divisor_prime_product_result * frp_left_factor_prime_product_result) -> (exists frp_right_factor_prime_product_result. p = frp_divisor_prime_product_result * frp_right_factor_prime_product_result) -> frp_divisor_prime_product_result = 1)
  1. intro p
  2. intro n
  3. intro b
  4. intro c
  5. intro F
  6. intro hpn
  7. intro hp
  8. intro hrange
  9. intro hproduct
  10. have hpointwise : forall frp_index_prime_pointwise frp_factor_prime_pointwise. (exists frp_gap_prime_pointwise_bound. frp_gap_prime_pointwise_bound + S frp_index_prime_pointwise = n) -> (((exists ff_h_frp_prime_pointwise_decoded. ff_h_frp_prime_pointwise_decoded + S (frp_factor_prime_pointwise) = S ((S (frp_index_prime_pointwise)) * c)) /\ exists ff_q_frp_prime_pointwise_decoded. b = ff_q_frp_prime_pointwise_decoded * S ((S (frp_index_prime_pointwise)) * c) + (frp_factor_prime_pointwise))) -> (forall frp_divisor_prime_pointwise_coprime. (exists frp_left_factor_prime_pointwise_coprime. frp_factor_prime_pointwise = frp_divisor_prime_pointwise_coprime * frp_left_factor_prime_pointwise_coprime) -> (exists frp_right_factor_prime_pointwise_coprime. p = frp_divisor_prime_pointwise_coprime * frp_right_factor_prime_pointwise_coprime) -> frp_divisor_prime_pointwise_coprime = 1)
  11. intro i
  12. intro x
  13. intro hi
  14. intro hx
  15. have hvalue : x = S i
  16. specialize beta_range_one_entry_eq_succ b
  17. specialize beta_range_one_entry_eq_succ c
  18. specialize beta_range_one_entry_eq_succ n
  19. specialize beta_range_one_entry_eq_succ i
  20. specialize beta_range_one_entry_eq_succ x
  21. apply beta_range_one_entry_eq_succ
  22. exact hrange
  23. exact hi
  24. exact hx
  25. have hx0 : ~(x = 0)
  26. intro hxzero
  27. specialize succ_ne_zero i
  28. apply succ_ne_zero
  29. trans x
  30. symm
  31. exact hvalue
  32. exact hxzero
  33. have hxltp : exists h. h + S x = p
  34. rewrite hvalue
  35. rewrite hpn
  36. specialize succ_le_succ (S i)
  37. specialize succ_le_succ n
  38. apply succ_le_succ
  39. exact hi
  40. have hnotdiv : ~(exists k. x = p * k)
  41. intro hdiv
  42. have hle : exists k. k + p = x
  43. specialize divisor_le_nonzero p
  44. specialize divisor_le_nonzero x
  45. apply divisor_le_nonzero
  46. exact hx0
  47. exact hdiv
  48. specialize lt_not_le x
  49. specialize lt_not_le p
  50. apply lt_not_le
  51. exact hxltp
  52. exact hle
  53. have hpx : forall frp_divisor_prime_factor. (exists frp_left_factor_prime_factor. p = frp_divisor_prime_factor * frp_left_factor_prime_factor) -> (exists frp_right_factor_prime_factor. x = frp_divisor_prime_factor * frp_right_factor_prime_factor) -> frp_divisor_prime_factor = 1
  54. specialize prime_not_divides_coprime p
  55. specialize prime_not_divides_coprime x
  56. apply prime_not_divides_coprime
  57. exact hp
  58. exact hnotdiv
  59. specialize coprime_symm p
  60. specialize coprime_symm x
  61. apply coprime_symm
  62. exact hpx
  63. specialize beta_product_pointwise_coprime p
  64. specialize beta_product_pointwise_coprime b
  65. specialize beta_product_pointwise_coprime c
  66. specialize beta_product_pointwise_coprime n
  67. specialize beta_product_pointwise_coprime F
  68. apply beta_product_pointwise_coprime
  69. exact hpointwise
  70. exact hproduct
fermat_predecessor_exponent_mod_one · unchanged support, not a new admission
forall p n a A. p = S n -> ((~(p = 1) /\ forall frm_prime_left_predecessor_prime frm_prime_right_predecessor_prime. p = frm_prime_left_predecessor_prime * frm_prime_right_predecessor_prime -> frm_prime_left_predecessor_prime = 1 \/ frm_prime_right_predecessor_prime = 1)) -> (~(exists frm_factor_predecessor_multiplier. a = p * frm_factor_predecessor_multiplier)) -> (exists ff_b_predecessor_power ff_c_predecessor_power. ((forall ff_i_predecessor_power_repeat. (exists ff_lt_predecessor_power_repeat_bound. ff_lt_predecessor_power_repeat_bound + S ff_i_predecessor_power_repeat = n) -> (((exists ff_h_predecessor_power_repeat_decoded. ff_h_predecessor_power_repeat_decoded + S (a) = S ((S (ff_i_predecessor_power_repeat)) * ff_c_predecessor_power)) /\ exists ff_q_predecessor_power_repeat_decoded. ff_b_predecessor_power = ff_q_predecessor_power_repeat_decoded * S ((S (ff_i_predecessor_power_repeat)) * ff_c_predecessor_power) + (a)))) /\ (exists ff_u_predecessor_power_product ff_v_predecessor_power_product. ((((exists ff_h_predecessor_power_product_start. ff_h_predecessor_power_product_start + S (1) = S ((S (0)) * ff_v_predecessor_power_product)) /\ exists ff_q_predecessor_power_product_start. ff_u_predecessor_power_product = ff_q_predecessor_power_product_start * S ((S (0)) * ff_v_predecessor_power_product) + (1))) /\ ((((exists ff_h_predecessor_power_product_terminal. ff_h_predecessor_power_product_terminal + S (A) = S ((S (n)) * ff_v_predecessor_power_product)) /\ exists ff_q_predecessor_power_product_terminal. ff_u_predecessor_power_product = ff_q_predecessor_power_product_terminal * S ((S (n)) * ff_v_predecessor_power_product) + (A))) /\ forall ff_i_predecessor_power_product. (exists ff_lt_predecessor_power_product_bound. ff_lt_predecessor_power_product_bound + S ff_i_predecessor_power_product = n) -> exists ff_p_predecessor_power_product ff_r_predecessor_power_product ff_s_predecessor_power_product. ((((exists ff_h_predecessor_power_product_factor. ff_h_predecessor_power_product_factor + S (ff_p_predecessor_power_product) = S ((S (ff_i_predecessor_power_product)) * ff_c_predecessor_power)) /\ exists ff_q_predecessor_power_product_factor. ff_b_predecessor_power = ff_q_predecessor_power_product_factor * S ((S (ff_i_predecessor_power_product)) * ff_c_predecessor_power) + (ff_p_predecessor_power_product))) /\ ((((exists ff_h_predecessor_power_product_partial. ff_h_predecessor_power_product_partial + S (ff_r_predecessor_power_product) = S ((S (ff_i_predecessor_power_product)) * ff_v_predecessor_power_product)) /\ exists ff_q_predecessor_power_product_partial. ff_u_predecessor_power_product = ff_q_predecessor_power_product_partial * S ((S (ff_i_predecessor_power_product)) * ff_v_predecessor_power_product) + (ff_r_predecessor_power_product))) /\ ((((exists ff_h_predecessor_power_product_successor. ff_h_predecessor_power_product_successor + S (ff_s_predecessor_power_product) = S ((S (S ff_i_predecessor_power_product)) * ff_v_predecessor_power_product)) /\ exists ff_q_predecessor_power_product_successor. ff_u_predecessor_power_product = ff_q_predecessor_power_product_successor * S ((S (S ff_i_predecessor_power_product)) * ff_v_predecessor_power_product) + (ff_s_predecessor_power_product))) /\ ff_s_predecessor_power_product = ff_r_predecessor_power_product * ff_p_predecessor_power_product)))))))) -> (exists fep_mod_left_predecessor_result fep_mod_right_predecessor_result. A + p * fep_mod_left_predecessor_result = 1 + p * fep_mod_right_predecessor_result)
  1. intro p
  2. intro n
  3. intro a
  4. intro A
  5. intro hpn
  6. intro hp
  7. intro hnotdiv
  8. intro hA
  9. specialize factorial_exists n
  10. cases factorial_exists
  11. cases factorial_exists_witness
  12. cases factorial_exists_witness_witness
  13. cases factorial_exists_witness_witness_witness
  14. have hbalance : exists fsp_product_mod_left_predecessor_balance fsp_product_mod_right_predecessor_balance. (A * x) + p * fsp_product_mod_left_predecessor_balance = x + p * fsp_product_mod_right_predecessor_balance
  15. specialize prime_mul_residue_product_balance p
  16. specialize prime_mul_residue_product_balance n
  17. specialize prime_mul_residue_product_balance a
  18. specialize prime_mul_residue_product_balance x1
  19. specialize prime_mul_residue_product_balance x2
  20. specialize prime_mul_residue_product_balance x
  21. specialize prime_mul_residue_product_balance A
  22. apply prime_mul_residue_product_balance
  23. exact hpn
  24. exact hp
  25. exact hnotdiv
  26. exact factorial_exists_witness_witness_witness_left
  27. exact factorial_exists_witness_witness_witness_right
  28. exact hA
  29. have hcop : forall frp_divisor_predecessor_coprime. (exists frp_left_factor_predecessor_coprime. x = frp_divisor_predecessor_coprime * frp_left_factor_predecessor_coprime) -> (exists frp_right_factor_predecessor_coprime. p = frp_divisor_predecessor_coprime * frp_right_factor_predecessor_coprime) -> frp_divisor_predecessor_coprime = 1
  30. specialize prime_range_product_coprime p
  31. specialize prime_range_product_coprime n
  32. specialize prime_range_product_coprime x1
  33. specialize prime_range_product_coprime x2
  34. specialize prime_range_product_coprime x
  35. apply prime_range_product_coprime
  36. exact hpn
  37. exact hp
  38. exact factorial_exists_witness_witness_witness_left
  39. exact factorial_exists_witness_witness_witness_right
  40. have hp0 : ~(p = 0)
  41. intro hpzero
  42. specialize prime_nonzero p
  43. apply prime_nonzero
  44. exact hp
  45. exact hpzero
  46. have hscaled : exists fep_product_mod_left_predecessor_normalized fep_product_mod_right_predecessor_normalized. (x * A) + p * fep_product_mod_left_predecessor_normalized = (x * 1) + p * fep_product_mod_right_predecessor_normalized
  47. cases hbalance
  48. cases hbalance_witness
  49. exists x3
  50. exists x4
  51. trans (A * x) + p * x3
  52. congr
  53. apply mul_comm
  54. refl
  55. trans x + p * x4
  56. exact hbalance_witness_witness
  57. congr
  58. symm
  59. apply mul_one
  60. refl
  61. specialize mod_eq_cancel_coprime p
  62. specialize mod_eq_cancel_coprime x
  63. specialize mod_eq_cancel_coprime A
  64. specialize mod_eq_cancel_coprime 1
  65. apply mod_eq_cancel_coprime
  66. exact hp0
  67. exact hcop
  68. exact hscaled
mod_eq_unscale_nonzero · unchanged support, not a new admission
forall k m a b. ~(k = 0) -> (exists hgcrt_mod_left_unscale_source hgcrt_mod_right_unscale_source. (k * a) + (k * m) * hgcrt_mod_left_unscale_source = (k * b) + (k * m) * hgcrt_mod_right_unscale_source) -> (exists hgcrt_mod_left_unscale_result hgcrt_mod_right_unscale_result. a + m * hgcrt_mod_left_unscale_result = b + m * hgcrt_mod_right_unscale_result)
  1. intro k
  2. intro m
  3. intro a
  4. intro b
  5. intro hk
  6. intro h
  7. cases h
  8. cases h_witness
  9. have hscaled : k * (a + m * x) = k * (b + m * x1)
  10. trans k * a + k * (m * x)
  11. apply mul_add
  12. trans k * a + (k * m) * x
  13. congr
  14. refl
  15. symm
  16. apply mul_assoc
  17. trans k * b + (k * m) * x1
  18. exact h_witness_witness
  19. trans k * b + k * (m * x1)
  20. congr
  21. refl
  22. apply mul_assoc
  23. symm
  24. apply mul_add
  25. have hab : a + m * x = b + m * x1
  26. specialize mul_left_cancel_nonzero k
  27. specialize mul_left_cancel_nonzero (a + m * x)
  28. specialize mul_left_cancel_nonzero (b + m * x1)
  29. apply mul_left_cancel_nonzero
  30. exact hk
  31. exact hscaled
  32. exists x
  33. exists x1
  34. exact hab
linear_congruence_zero_residue_divides · unchanged support, not a new admission
forall d n. (exists hgcrt_mod_left_linear_zero_residue hgcrt_mod_right_linear_zero_residue. n + d * hgcrt_mod_left_linear_zero_residue = 0 + d * hgcrt_mod_right_linear_zero_residue) -> (exists linear_quotient_zero_result. (n) = (d) * linear_quotient_zero_result)
  1. intro d
  2. intro n
  3. intro hmod
  4. cases hmod
  5. cases hmod_witness
  6. specialize factor_difference d
  7. specialize factor_difference x1
  8. specialize factor_difference x
  9. specialize factor_difference n
  10. apply factor_difference
  11. trans 0 + d * x1
  12. symm
  13. apply zero_add
  14. trans n + d * x
  15. symm
  16. exact hmod_witness_witness
  17. apply add_comm
linear_congruence_gcd_divisibility_constructs_solution · unchanged support, not a new admission
forall a m b g. ((((exists hag_left_factor_linear_sufficiency. a = g * hag_left_factor_linear_sufficiency) /\ (exists hag_right_factor_linear_sufficiency. m = g * hag_right_factor_linear_sufficiency)) /\ forall hag_divisor_linear_sufficiency. (exists hag_common_left_linear_sufficiency. a = hag_divisor_linear_sufficiency * hag_common_left_linear_sufficiency) -> (exists hag_common_right_linear_sufficiency. m = hag_divisor_linear_sufficiency * hag_common_right_linear_sufficiency) -> exists hag_greatest_factor_linear_sufficiency. g = hag_divisor_linear_sufficiency * hag_greatest_factor_linear_sufficiency)) -> (exists linear_quotient_sufficiency. (b) = (g) * linear_quotient_sufficiency) -> exists x. (exists hgcrt_mod_left_linear_sufficiency_result hgcrt_mod_right_linear_sufficiency_result. (a * x) + m * hgcrt_mod_left_linear_sufficiency_result = b + m * hgcrt_mod_right_linear_sufficiency_result)
  1. intro a
  2. intro m
  3. intro b
  4. intro g
  5. intro hgcd
  6. intro hdivides
  7. have hreverse : exists hgcrt_mod_left_linear_sufficiency_reverse hgcrt_mod_right_linear_sufficiency_reverse. b + g * hgcrt_mod_left_linear_sufficiency_reverse = 0 + g * hgcrt_mod_right_linear_sufficiency_reverse
  8. specialize dvd_to_mod_zero g
  9. specialize dvd_to_mod_zero b
  10. apply dvd_to_mod_zero
  11. exact hdivides
  12. have hcompatibility : exists hgcrt_mod_left_linear_sufficiency_compatibility hgcrt_mod_right_linear_sufficiency_compatibility. 0 + g * hgcrt_mod_left_linear_sufficiency_compatibility = b + g * hgcrt_mod_right_linear_sufficiency_compatibility
  13. specialize mod_eq_symm g
  14. specialize mod_eq_symm b
  15. specialize mod_eq_symm 0
  16. apply mod_eq_symm
  17. exact hreverse
  18. have hcrt : exists y. ((exists hgcrt_mod_left_linear_sufficiency_first hgcrt_mod_right_linear_sufficiency_first. y + a * hgcrt_mod_left_linear_sufficiency_first = 0 + a * hgcrt_mod_right_linear_sufficiency_first) /\ (exists hgcrt_mod_left_linear_sufficiency_second hgcrt_mod_right_linear_sufficiency_second. y + m * hgcrt_mod_left_linear_sufficiency_second = b + m * hgcrt_mod_right_linear_sufficiency_second))
  19. specialize generalized_binary_crt_sufficient g
  20. specialize generalized_binary_crt_sufficient a
  21. specialize generalized_binary_crt_sufficient m
  22. specialize generalized_binary_crt_sufficient 0
  23. specialize generalized_binary_crt_sufficient b
  24. apply generalized_binary_crt_sufficient
  25. exact hgcd
  26. exact hcompatibility
  27. cases hcrt
  28. cases hcrt_witness
  29. have hmultiple : exists q. x = a * q
  30. specialize linear_congruence_zero_residue_divides a
  31. specialize linear_congruence_zero_residue_divides x
  32. apply linear_congruence_zero_residue_divides
  33. exact hcrt_witness_left
  34. cases hmultiple
  35. exists x1
  36. rewrite <- hmultiple_witness
  37. exact hcrt_witness_right
crt_mod_one_universal · unchanged support, not a new admission
forall a b. (exists hgcrt_mod_left_gcrt_gcomp_one hgcrt_mod_right_gcrt_gcomp_one. a + 1 * hgcrt_mod_left_gcrt_gcomp_one = b + 1 * hgcrt_mod_right_gcrt_gcomp_one)
  1. intro a
  2. intro b
  3. exists b
  4. exists a
  5. trans a + b
  6. congr
  7. refl
  8. apply one_mul
  9. trans b + a
  10. apply add_comm
  11. congr
  12. refl
  13. symm
  14. apply one_mul
finite_add_le_add · unchanged support, not a new admission
forall a b c d. (exists fms_gap_le. fms_gap_le + (a) = (b)) -> (exists fms_gap_le. fms_gap_le + (c) = (d)) -> (exists fms_gap_le. fms_gap_le + (a+c) = (b+d))
  1. intro a
  2. intro b
  3. intro c
  4. intro d
  5. intro hab
  6. intro hcd
  7. specialize le_trans a+c
  8. specialize le_trans b+c
  9. specialize le_trans b+d
  10. apply le_trans
  11. specialize add_le_add_right a
  12. specialize add_le_add_right b
  13. specialize add_le_add_right c
  14. apply add_le_add_right
  15. exact hab
  16. specialize add_le_add_left c
  17. specialize add_le_add_left d
  18. specialize add_le_add_left b
  19. apply add_le_add_left
  20. exact hcd
finite_add_lt_of_lt_of_le · unchanged support, not a new admission
forall a b c d. (exists fms_gap_lt. fms_gap_lt + S (a) = (b)) -> (exists fms_gap_le. fms_gap_le + (c) = (d)) -> (exists fms_gap_lt. fms_gap_lt + S (a+c) = (b+d))
  1. intro a
  2. intro b
  3. intro c
  4. intro d
  5. intro hab
  6. intro hcd
  7. have ht : exists fms_gap_le. fms_gap_le + ((S a)+c) = (b+d)
  8. specialize finite_add_le_add S a
  9. specialize finite_add_le_add b
  10. specialize finite_add_le_add c
  11. specialize finite_add_le_add d
  12. apply finite_add_le_add
  13. exact hab
  14. exact hcd
  15. have he : (S a)+c=S(a+c)
  16. specialize add_succ_left a
  17. specialize add_succ_left c
  18. apply add_succ_left
  19. rewrite he at ht
  20. exact ht