The Stable theorem atlas#
This is the complete interactive reading surface for the Stable native Peano arithmetic library. It is generated from the same checked snapshot used by the current library tests and catalog—not copied by hand. The released training corpus remains explicitly frozen at its earlier 247-theorem checkpoint. Search by mathematical idea, filter by domain, focus a theorem to move backward to prerequisites or forward to its clients, and expand any card to read the exact first-order statement and the complete authored tactic recipe.
What “actual proof” means here
Every checked card embeds its full authored tactic body plus the explicit
use imports that reconstruct its dependencies. Replay produces one closed
self-contained certificate, which the independent kernel checks from the
empty context. The much larger certificate tree is identified by its hash and
metrics rather than pasted as tens of thousands of constructor nodes.
Stable is not the same as hosted deployment
These 432 theorems are the canonical Stable repository edition. Whether a hosted Peano Lab has deployed this exact commit is a separate operational state and does not downgrade the library to Alpha. See Alpha and Stable library editions.
Snapshot root: 4d02dc439d53533e8992a471b26ee34059fb6001f822041e42c56b2cc0a7a079
Generated card digest: 1036b44c204887ae37c4e5d4fd78954078b357847c13c98e0582f13a7d94cf99
Focus one theorem
zero_addZero is a left identity for addition
Addition
checked
Zero is a left identity for addition; unlike PA3, this needs induction.
add_comm mul_one le_refl drop_add_prefix_from_fixed le_succ_self le_eq_or_lt division_remainder_succ division_remainder_unique factor_difference gcd_balanced_bezout_exists_up_to beta_at_self_of_bound dvd_to_mod_zero binary_crt common_divisor_beta_moduli_divides_gap_times_c quadratic_residue_search_up_to quadratic_residue_bounded_equiv factorial_succ_decompose predecessor_square_mod_one beta_half_range_entry_bounds mod_inverse_implies_coprimeExact expanded PA statement
forall n. 0 + n = n
Complete replay recipe: dependency imports + authored proof
pa prove forall n. 0 + n = n
induction n
simp
simp [IH]
qed
- Occurrences
- 17
- Distinct objects
- 17
- Reused references
- 0
- Depth
- 8
- Cuts
- 0
- Certificate SHA-256
5f9cb3146e4a…
add_succ_leftSuccessor moves through addition on the left
Addition
checked
A successor can move through addition on the left.
add_comm drop_add_prefix_from_fixed le_succ_self le_succ lt_to_le lt_irrefl_expanded le_eq_or_lt lt_trans lt_not_eq_add_middle division_remainder_succ common_divisor_beta_moduli_divides_gap_times_c prime_unbounded odd_add_even odd_add_odd odd_mul_odd quadratic_residue_search_up_to bit_count_bounded factorial_succ_decompose predecessor_square_mod_one beta_half_range_entry_boundsExact expanded PA statement
forall n m. S n + m = S (n + m)
Complete replay recipe: dependency imports + authored proof
pa prove forall n m. S n + m = S (n + m)
intro n
induction m
simp
simp [IH]
qed
- Occurrences
- 27
- Distinct objects
- 25
- Reused references
- 2
- Depth
- 10
- Cuts
- 0
- Certificate SHA-256
a551da8ef511…
add_commAddition is commutative
Addition
checked
Addition is commutative.
mul_succ_left add_left_cancel le_add_right add_le_add_left mul_lt_mul_succ_left_nonzero division_block_upper positive_quotient_gap_impossible add_eq_zero_left factor_difference add_permute_outer balanced_bezout_euclid_step common_divisor_divides_balanced_result mod_eq_trans mod_eq_add remainder_decomposition_to_mod_eq mod_eq_bounded_unique mod_eq_to_remainder_decomposition add_residue_lift bezout_mod_left mod_eq_predecessor_cancel beta_moduli_coprime_of_lt_bounded_common_multiple prime_unbounded mod5_square_residue_two odd_add_odd predecessor_square_mod_one mod_eq_ordered_gap_multipleExact expanded PA statement
forall n m. n + m = m + n
Complete replay recipe: dependency imports + authored proof
pa prove forall n m. n + m = m + n
use zero_add
use add_succ_left
intro n
induction m
simp [zero_add]
simp [add_succ_left, IH]
qed
- Occurrences
- 73
- Distinct objects
- 67
- Reused references
- 6
- Depth
- 12
- Cuts
- 2
- Certificate SHA-256
281109de8768…
add_assocAddition is associative
Addition
checked
Addition is associative.
mul_succ_left mul_add le_trans antisymm_from_witnesses add_le_add_right add_le_add_left add_le_cancel_right lt_of_le_of_lt lt_trans division_block_upper positive_quotient_gap_impossible factor_difference add_permute_outer balanced_bezout_euclid_step mod_eq_trans add_residue add_residue_lift square_decomp bezout_mod_left bezout_mod_right mod_eq_predecessor_cancel mod5_square_residue_one mod5_square_residue_two even_add_odd odd_add_odd odd_mul_odd bit_count_bounded coprime_balanced_mod_inverse predecessor_square_mod_one beta_half_range_entry_bounds mod_eq_ordered_gap_multipleExact expanded PA statement
forall n m k. (n + m) + k = n + (m + k)
Complete replay recipe: dependency imports + authored proof
pa prove forall n m k. (n + m) + k = n + (m + k)
intro n
intro m
induction k
simp
simp [IH]
qed
- Occurrences
- 33
- Distinct objects
- 30
- Reused references
- 3
- Depth
- 12
- Cuts
- 0
- Certificate SHA-256
a21351de86c8…
mul_zero_leftZero is a left annihilator for multiplication
Multiplication
checked
Zero annihilates multiplication on the left.
Exact expanded PA statement
forall n. 0 * n = 0
Complete replay recipe: dependency imports + authored proof
pa prove forall n. 0 * n = 0
induction n
simp
simp [IH]
qed
- Occurrences
- 21
- Distinct objects
- 21
- Reused references
- 0
- Depth
- 8
- Cuts
- 0
- Certificate SHA-256
fb469fdd0b52…
mul_succ_leftSuccessor moves through multiplication on the left
Multiplication
checked
A successor can move through multiplication on the left.
Exact expanded PA statement
forall n m. S n * m = n * m + m
Complete replay recipe: dependency imports + authored proof
pa prove forall n m. S n * m = n * m + m
use add_comm
use add_assoc
intro n
induction m
simp
specialize add_comm n
specialize add_comm m
simp [IH, add_comm, add_assoc]
qed
- Occurrences
- 172
- Distinct objects
- 155
- Reused references
- 17
- Depth
- 22
- Cuts
- 4
- Certificate SHA-256
b57ad3ce119f…
mul_commMultiplication is commutative
Multiplication
checked
Multiplication is commutative.
add_mul mul_right_cancel_nonzero multiple_mul_left balanced_combination_scale_right mod_eq_mul_left remainder_decomposition_to_mod_eq mod_eq_to_remainder_decomposition beta_at_exists beta_at_unique square_decomp binary_crt beta_modulus_coprime_base beta_moduli_coprime_of_gap_dvd bounded_common_multiple_step right_factor_divides_product greatest_prime_divisor_quotient_bound greatest_prime_divisor_descent beta_factor_divides_product prime_factorization_exists_up_to two_prime_product_uniqueness mul_double_right mod_eq_decidable_nonzero quadratic_residue_bounded_equiv coprime_mod_inverse mod_eq_cancel_coprime beta_product_replace_balance prime_bounded_nonzero_mod_inverse canonical_remainders_characterize_mod_eq bounded_mod_inverse_unique coprime_bounded_mod_inverse coprime_product_is_lcm gcd_lcm_compatible_exists mod_eq_common_remainder_decomposition mod_eq_lcm_merge crt_solution_canonical_remainder_nonzeroExact expanded PA statement
forall n m. n * m = m * n
Complete replay recipe: dependency imports + authored proof
pa prove forall n m. n * m = m * n
use mul_zero_left
use mul_succ_left
intro n
induction m
simp [mul_zero_left]
simp [IH, mul_succ_left]
qed
- Occurrences
- 222
- Distinct objects
- 200
- Reused references
- 22
- Depth
- 24
- Cuts
- 6
- Certificate SHA-256
c3efa368cf22…
mul_addMultiplication distributes over right addition
Multiplication
checked
Multiplication distributes over addition on the right.
mul_assoc add_mul mul_le_mul_left positive_quotient_gap_impossible multiple_add divides_linear_step balanced_bezout_euclid_step common_divisor_divides_balanced_result mod_eq_trans mod_eq_add add_residue add_residue_lift square_decomp binary_crt mod5_square_residue_one mod5_square_residue_two even_add_even even_add_odd odd_add_even odd_add_odd odd_mul_odd odd_mod4_cases mod4_three_is_odd coprime_mod_inverse balanced_bezout_cancel_gcd mod_eq_scaleExact expanded PA statement
forall n m k. n * (m + k) = n * m + n * k
Complete replay recipe: dependency imports + authored proof
pa prove forall n m k. n * (m + k) = n * m + n * k
use add_assoc
intro n
intro m
induction k
simp
simp [IH, add_assoc]
qed
- Occurrences
- 77
- Distinct objects
- 70
- Reused references
- 7
- Depth
- 16
- Cuts
- 1
- Certificate SHA-256
2a65ee30f1db…
mul_assocMultiplication is associative
Multiplication
checked
Multiplication is associative.
multiple_mul_right multiple_trans multiple_antisymm divides_remainder divides_linear_step balanced_bezout_euclid_step balanced_combination_scale_right common_divisor_divides_balanced_result mod_eq_mul_right square_decomp binary_crt mod_eq_of_mod_eq_multiple fourth_power_regroup mod5_square_residue_one mod5_square_residue_two mod5_fourth_power_residue_one mod5_fourth_power_residue_two mod5_fourth_power_residue_three mod5_fourth_power_residue_four mod5_fourth_power_one even_mul_left mul_double_right four_mul_eq_double_double coprime_mod_inverse mod_eq_cancel_coprime pow_add beta_product_replace_balance bounded_mod_inverse_unique coprime_product_is_lcm is_lcm_scale_nonzero balanced_bezout_cancel_gcd gcd_lcm_compatible_exists mod_eq_scale is_gcd_quotients_coprime_nonzeroExact expanded PA statement
forall n m k. (n * m) * k = n * (m * k)
Complete replay recipe: dependency imports + authored proof
pa prove forall n m k. (n * m) * k = n * (m * k)
use mul_add
intro n
intro m
induction k
simp
simp [IH, mul_add]
qed
- Occurrences
- 116
- Distinct objects
- 104
- Reused references
- 12
- Depth
- 17
- Cuts
- 2
- Certificate SHA-256
4784291080cf…
one_mulOne is a left identity for multiplication
Multiplication
checked
One is a left identity for multiplication.
mul_eq_one_components one_multiple coprime_to_is_gcd_one gauss_coprime_cancel le_scaled_nonzero beta_prefix_product_trace_exists beta_canonical_append_empty prime_factorization_exists_up_to beta_prefix_sum_trace_exists pow_one_from_zero_successor pow_predecessor_parity_mod bounded_mod_inverse_uniqueExact expanded PA statement
forall n. 1 * n = n
Complete replay recipe: dependency imports + authored proof
pa prove forall n. 1 * n = n
induction n
simp
simp [IH]
qed
- Occurrences
- 26
- Distinct objects
- 26
- Reused references
- 0
- Depth
- 9
- Cuts
- 0
- Certificate SHA-256
09b763d9af1e…
mul_oneOne is a right identity for multiplication
Multiplication
checked
One is a right identity for multiplication.
Exact expanded PA statement
forall n. n * 1 = n
Complete replay recipe: dependency imports + authored proof
pa prove forall n. n * 1 = n
use zero_add
intro n
simp [zero_add]
qed
- Occurrences
- 33
- Distinct objects
- 33
- Reused references
- 0
- Depth
- 9
- Cuts
- 1
- Certificate SHA-256
c7e423c814db…
add_mulLeft addition distributes through multiplication
Multiplication
checked
Multiplication distributes over addition on the left.
Exact expanded PA statement
forall n m k. (n + m) * k = n * k + m * k
Complete replay recipe: dependency imports + authored proof
pa prove forall n m k. (n + m) * k = n * k + m * k
use mul_comm
use mul_add
intro n
intro m
intro k
simp [mul_comm, mul_add]
qed
- Occurrences
- 326
- Distinct objects
- 263
- Reused references
- 31
- Depth
- 25
- Cuts
- 9
- Certificate SHA-256
436c20edef86…
succ_ne_zeroA successor is not zero
Equality
checked
No successor is zero (the reusable PA1 lemma).
mul_left_cancel_nonzero factor_search_up_to prime_nonzero beta_modulus_nonzero bounded_common_multiple_step bounded_common_multiple_exists bounded_beta_exclusive_recode_invariant beta_prefix_product_trace_exists all_prime_empty sorted_empty sorted_singleton beta_factor_divides_product prime_factorization_exists_up_to beta_all_prime_product_one_iff_length_zero prime_factorization_uniqueness_by_length beta_repeat_empty beta_range_empty beta_prefix_sum_trace_exists all_bits_zero qres_mod3_canonical_iff qres_mod5_canonical_iff qres_mod7_canonical_iff finite_surjective_zero beta_prefix_replace_exists finite_contains_decidable beta_product_replace_balance prime_bounded_nonzero_mod_inverse canonical_remainder_zero_impossibleExact expanded PA statement
forall n. ~(S n = 0)
Complete replay recipe: dependency imports + authored proof
pa prove forall n. ~(S n = 0)
apply PA1
qed
- Occurrences
- 1
- Distinct objects
- 1
- Reused references
- 0
- Depth
- 1
- Cuts
- 0
- Certificate SHA-256
885b0b7ed12a…
succ_injectiveSuccessor is injective
Equality
checked
Successor is injective (the reusable PA2 lemma).
Exact expanded PA statement
forall n m. S n = S m -> n = m
Complete replay recipe: dependency imports + authored proof
pa prove forall n m. S n = S m -> n = m
apply PA2
qed
- Occurrences
- 1
- Distinct objects
- 1
- Reused references
- 0
- Depth
- 1
- Cuts
- 0
- Certificate SHA-256
2ff195ad0d0d…
le_reflOrder is reflexive
Order
checked
The defined order is reflexive; zero is its witness.
gcd_exists_relational gcd_balanced_bezout_exists factor_search_up_to prime_divisor_exists beta_crt_prefix_congruence_step bounded_beta_crt_for_existing_code beta_exclusive_recode_congruence_step beta_prefix_extend beta_prefix_product_trace_exists beta_product_functional beta_product_succ_decompose beta_product_succ_append beta_factor_prefix_product_append all_prime_succ_elim_last sorted_succ_elim_last beta_prefix_extend_sorted_succ beta_canonical_append_succ greatest_prime_divisor_search beta_canonical_append_general beta_canonical_last_factor_bound prime_factorization_exists_up_to prime_factorization_existence beta_prime_divisor_product_member beta_sorted_factor_le_last beta_nonempty_all_prime_product_ne_one beta_canonical_last_factors_equal pow_successor_decompose beta_prefix_sum_trace_exists beta_sum_trace_functional beta_sum_succ_decompose beta_product_pointwise_mod_congruent beta_sum_pointwise_mod_congruent all_bits_last_succ factorial_succ_decompose beta_prefix_swap_last_from_entries finite_swap_last_bounded finite_swap_last_injective finite_swap_last_surjective_back finite_contains_decidable finite_bounded_last_succ finite_surjective_succ_intro finite_last_is_top_from_prefix_surjective finite_bounded_injective_surjective beta_product_replace_balance beta_product_swap_last_invariant finite_fixed_last_prefix_boundedExact expanded PA statement
forall n. n <= n
Complete replay recipe: dependency imports + authored proof
pa prove forall n. n <= n
use zero_add
intro n
exists 0
simp [zero_add]
qed
- Occurrences
- 25
- Distinct objects
- 25
- Reused references
- 0
- Depth
- 9
- Cuts
- 1
- Certificate SHA-256
78852db8db26…
le_transOrder is transitive
Order
checked
Order witnesses compose by addition, so the defined order is transitive.
Exact expanded PA statement
forall n m k. n <= m -> m <= k -> n <= k
Complete replay recipe: dependency imports + authored proof
pa prove forall n m k. n <= m -> m <= k -> n <= k
use add_assoc
intro n
intro m
intro k
intro h_nm
intro h_mk
cases h_nm
cases h_mk
exists x1 + x
simp [add_assoc, h_nm_witness, h_mk_witness]
qed
- Occurrences
- 57
- Distinct objects
- 54
- Reused references
- 3
- Depth
- 15
- Cuts
- 1
- Certificate SHA-256
eca4525bf3b2…
no_succ_add_fixedAdding a positive successor has no fixed point
Addition
checked
Adding a positive successor cannot leave a natural number fixed.
Exact expanded PA statement
forall p n. S p + n = n -> false
Complete replay recipe: dependency imports + authored proof
pa prove forall p n. S p + n = n -> false
intro p
induction n
intro h
apply PA1
rewrite PA3 at h
exact h
intro h
apply IH
apply PA2
rewrite PA4 at h
exact h
qed
- Occurrences
- 30
- Distinct objects
- 30
- Reused references
- 0
- Depth
- 12
- Cuts
- 0
- Certificate SHA-256
3cfcff019a80…
drop_add_prefix_from_fixedDrop an additive prefix from a fixed-point equation
Addition
checked
A fixed-point equation remains fixed after dropping an additive prefix.
Exact expanded PA statement
forall a b n. (b + a) + n = n -> a + n = n
Complete replay recipe: dependency imports + authored proof
pa prove forall a b n. (b + a) + n = n -> a + n = n
use zero_add
use add_succ_left
use no_succ_add_fixed
intro a
induction b
intro n
intro h
specialize zero_add a
rewrite zero_add at h
exact h
intro n
intro h
exfalso
specialize no_succ_add_fixed (b + a)
specialize no_succ_add_fixed n
apply no_succ_add_fixed
specialize add_succ_left b
specialize add_succ_left a
rewrite add_succ_left at h
exact h
qed
- Occurrences
- 120
- Distinct objects
- 116
- Reused references
- 4
- Depth
- 22
- Cuts
- 3
- Certificate SHA-256
ebf03686ffd7…
antisymm_from_witnessesOpposing additive witnesses force equality
Order
checked
Opposing additive witnesses force equality.
Exact expanded PA statement
forall a b n m. a + n = m -> b + m = n -> n = m
Complete replay recipe: dependency imports + authored proof
pa prove forall a b n m. a + n = m -> b + m = n -> n = m
use add_assoc
use drop_add_prefix_from_fixed
intro a
intro b
intro n
intro m
intro h_anm
intro h_bmn
symm
rewrite <- h_anm
specialize drop_add_prefix_from_fixed a
specialize drop_add_prefix_from_fixed b
specialize drop_add_prefix_from_fixed n
apply drop_add_prefix_from_fixed
specialize add_assoc b
specialize add_assoc a
specialize add_assoc n
rewrite add_assoc
rewrite h_anm
rewrite h_bmn
refl
qed
- Occurrences
- 200
- Distinct objects
- 191
- Reused references
- 9
- Depth
- 28
- Cuts
- 5
- Certificate SHA-256
b62cd9302971…
le_antisymmOrder is antisymmetric
Order
checked
The witness-defined order is antisymmetric.
Exact expanded PA statement
forall n m. n <= m -> m <= n -> n = m
Complete replay recipe: dependency imports + authored proof
pa prove forall n m. n <= m -> m <= n -> n = m
use antisymm_from_witnesses
intro n
intro m
intro h_nm
intro h_mn
cases h_nm
cases h_mn
apply antisymm_from_witnesses
exact h_nm_witness
exact h_mn_witness
qed
- Occurrences
- 218
- Distinct objects
- 209
- Reused references
- 9
- Depth
- 29
- Cuts
- 6
- Certificate SHA-256
e0c6f0ae6bc7…
le_totalNatural-number order is total
Order
checked
Every pair of natural numbers is comparable in the defined order.
Exact expanded PA statement
forall n m. n <= m \/ m <= n
Complete replay recipe: dependency imports + authored proof
pa prove forall n m. n <= m \/ m <= n
induction n
intro m
left
exists m
simp
induction m
right
exists (S n)
simp
specialize IH m
cases IH
cases IH_left
left
exists x
rewrite PA4
congr
exact IH_left_witness
cases IH_right
right
exists x
rewrite PA4
congr
exact IH_right_witness
qed
- Occurrences
- 49
- Distinct objects
- 48
- Reused references
- 1
- Depth
- 17
- Cuts
- 0
- Certificate SHA-256
13db746df298…
add_eq_zero_rightA zero sum has a zero right summand
Addition
checked
A sum equal to zero has zero as its right addend.
mul_eq_zero le_zero add_eq_zero_left add_eq_zero_components mul_eq_one_components factor_difference bounded_beta_exclusive_recode_invariant beta_prefix_product_trace_exists all_prime_empty beta_factor_divides_product prime_factorization_exists_up_to prime_factorization_uniqueness_by_length quadratic_residue_search_up_to beta_repeat_empty beta_range_empty beta_prefix_sum_trace_exists all_bits_zero finite_surjective_zero beta_prefix_replace_exists finite_contains_decidable beta_product_replace_balanceExact expanded PA statement
forall a b. a + b = 0 -> b = 0
Complete replay recipe: dependency imports + authored proof
pa prove forall a b. a + b = 0 -> b = 0
intro a
induction b
intro h
refl
intro h
exfalso
apply PA1
rewrite PA4 at h
exact h
qed
- Occurrences
- 19
- Distinct objects
- 19
- Reused references
- 0
- Depth
- 12
- Cuts
- 0
- Certificate SHA-256
e9b362b69b8a…
mul_eq_zeroA zero product has a zero factor
Multiplication
checked
Zero products have a zero factor: the 23-entry core capstone.
Exact expanded PA statement
forall n m. n * m = 0 -> n = 0 \/ m = 0
Complete replay recipe: dependency imports + authored proof
pa prove forall n m. n * m = 0 -> n = 0 \/ m = 0
use add_eq_zero_right
intro n
induction m
intro h
right
refl
intro h
left
specialize add_eq_zero_right (n * m)
specialize add_eq_zero_right n
apply add_eq_zero_right
rewrite PA6 at h
exact h
qed
- Occurrences
- 47
- Distinct objects
- 47
- Reused references
- 0
- Depth
- 17
- Cuts
- 1
- Certificate SHA-256
ff49ed484000…
eq_symmEquality is symmetric
Equality
checked
Equality is symmetric.
Exact expanded PA statement
forall a b. a = b -> b = a
Complete replay recipe: dependency imports + authored proof
pa prove forall a b. a = b -> b = a
intro a
intro b
intro h
symm
exact h
qed
- Occurrences
- 5
- Distinct objects
- 5
- Reused references
- 0
- Depth
- 5
- Cuts
- 0
- Certificate SHA-256
a7f8dc7f3c54…
eq_transEquality is transitive
Equality
checked
Equality is transitive.
Exact expanded PA statement
forall a b c. a = b -> b = c -> a = c
Complete replay recipe: dependency imports + authored proof
pa prove forall a b c. a = b -> b = c -> a = c
intro a
intro b
intro c
intro hab
intro hbc
trans b
exact hab
exact hbc
qed
- Occurrences
- 8
- Distinct objects
- 8
- Reused references
- 0
- Depth
- 7
- Cuts
- 0
- Certificate SHA-256
b883c2beef2b…
succ_congrSuccessor preserves equality
Equality
checked
Successor preserves equality.
Exact expanded PA statement
forall a b. a = b -> S a = S b
Complete replay recipe: dependency imports + authored proof
pa prove forall a b. a = b -> S a = S b
intro a
intro b
intro h
congr
exact h
qed
- Occurrences
- 5
- Distinct objects
- 5
- Reused references
- 0
- Depth
- 5
- Cuts
- 0
- Certificate SHA-256
50f243457746…
zero_or_succEvery natural is zero or a successor
Equality
checked
Every natural is either zero or the successor of a natural.
Exact expanded PA statement
forall n. n = 0 \/ exists k. n = S k
Complete replay recipe: dependency imports + authored proof
pa prove forall n. n = 0 \/ exists k. n = S k
induction n
left
refl
right
exists n
refl
qed
- Occurrences
- 8
- Distinct objects
- 8
- Reused references
- 0
- Depth
- 6
- Cuts
- 0
- Certificate SHA-256
c045c0f7e88d…
nonzero_is_succEvery nonzero natural has a predecessor
Equality
checked
Every nonzero natural has a predecessor.
Exact expanded PA statement
forall n. ~(n = 0) -> exists k. n = S k
Complete replay recipe: dependency imports + authored proof
pa prove forall n. ~(n = 0) -> exists k. n = S k
induction n
intro h
exfalso
apply h
refl
intro h
exists n
refl
qed
- Occurrences
- 11
- Distinct objects
- 11
- Reused references
- 0
- Depth
- 6
- Cuts
- 0
- Certificate SHA-256
ce59c977bbdf…
add_congrAddition preserves equality in both arguments
Equality
checked
Addition preserves equality in both arguments.
Exact expanded PA statement
forall a b c d. a = b -> c = d -> a + c = b + d
Complete replay recipe: dependency imports + authored proof
pa prove forall a b c d. a = b -> c = d -> a + c = b + d
intro a
intro b
intro c
intro d
intro hab
intro hcd
congr
exact hab
exact hcd
qed
- Occurrences
- 9
- Distinct objects
- 9
- Reused references
- 0
- Depth
- 8
- Cuts
- 0
- Certificate SHA-256
36c4025bd91f…
mul_congrMultiplication preserves equality in both arguments
Equality
checked
Multiplication preserves equality in both arguments.
Exact expanded PA statement
forall a b c d. a = b -> c = d -> a * c = b * d
Complete replay recipe: dependency imports + authored proof
pa prove forall a b c d. a = b -> c = d -> a * c = b * d
intro a
intro b
intro c
intro d
intro hab
intro hcd
congr
exact hab
exact hcd
qed
- Occurrences
- 9
- Distinct objects
- 9
- Reused references
- 0
- Depth
- 8
- Cuts
- 0
- Certificate SHA-256
a55a97cc7dfa…
add_right_cancelAddition cancels on the right
Addition
checked
A common right addend can be cancelled.
Exact expanded PA statement
forall a b c. a + c = b + c -> a = b
Complete replay recipe: dependency imports + authored proof
pa prove forall a b c. a + c = b + c -> a = b
intro a
intro b
induction c
intro h
rewrite PA3 at h
rewrite PA3 at h
exact h
intro h
apply IH
apply PA2
rewrite PA4 at h
rewrite PA4 at h
exact h
qed
- Occurrences
- 41
- Distinct objects
- 41
- Reused references
- 0
- Depth
- 15
- Cuts
- 0
- Certificate SHA-256
ea6126f3e712…
add_left_cancelAddition cancels on the left
Addition
checked
A common left addend can be cancelled.
Exact expanded PA statement
forall a b c. a + b = a + c -> b = c
Complete replay recipe: dependency imports + authored proof
pa prove forall a b c. a + b = a + c -> b = c
use add_comm
use add_right_cancel
intro a
intro b
intro c
intro h
specialize add_right_cancel b
specialize add_right_cancel c
specialize add_right_cancel a
apply add_right_cancel
trans a + b
apply add_comm
trans a + c
exact h
apply add_comm
qed
- Occurrences
- 143
- Distinct objects
- 137
- Reused references
- 6
- Depth
- 18
- Cuts
- 4
- Certificate SHA-256
891b97905c1d…
zero_leZero is below every natural number
Order
checked
Zero is below every natural number.
Exact expanded PA statement
forall n. 0 <= n
Complete replay recipe: dependency imports + authored proof
pa prove forall n. 0 <= n
intro n
exists n
rewrite PA3
refl
qed
- Occurrences
- 7
- Distinct objects
- 7
- Reused references
- 0
- Depth
- 6
- Cuts
- 0
- Certificate SHA-256
7ba583081e4b…
le_succ_selfEvery natural is below its successor
Order
checked
Every natural number is below its successor.
Exact expanded PA statement
forall n. n <= S n
Complete replay recipe: dependency imports + authored proof
pa prove forall n. n <= S n
use zero_add
use add_succ_left
intro n
exists 1
simp [add_succ_left, zero_add]
qed
- Occurrences
- 58
- Distinct objects
- 54
- Reused references
- 4
- Depth
- 12
- Cuts
- 2
- Certificate SHA-256
1bdf6c9f2c04…
le_zeroOnly zero lies below zero
Order
checked
Only zero is less than or equal to zero.
Exact expanded PA statement
forall n. n <= 0 -> n = 0
Complete replay recipe: dependency imports + authored proof
pa prove forall n. n <= 0 -> n = 0
use add_eq_zero_right
intro n
intro h
cases h
apply add_eq_zero_right
exact h_witness
qed
- Occurrences
- 29
- Distinct objects
- 29
- Reused references
- 0
- Depth
- 13
- Cuts
- 1
- Certificate SHA-256
7674b5d583d8…
one_le_of_ne_zeroEvery nonzero natural is at least one
Order
checked
Every nonzero natural is at least one.
Exact expanded PA statement
forall n. ~(n = 0) -> 1 <= n
Complete replay recipe: dependency imports + authored proof
pa prove forall n. ~(n = 0) -> 1 <= n
induction n
intro h
exfalso
apply h
refl
intro h
exists n
simp
qed
- Occurrences
- 20
- Distinct objects
- 20
- Reused references
- 0
- Depth
- 10
- Cuts
- 0
- Certificate SHA-256
627f1a9c62d5…
ne_zero_of_one_leA natural at least one is nonzero
Order
checked
A natural at least one is nonzero.
Exact expanded PA statement
forall n. 1 <= n -> ~(n = 0)
Complete replay recipe: dependency imports + authored proof
pa prove forall n. 1 <= n -> ~(n = 0)
intro n
intro h
intro hn
cases h
rewrite hn at h_witness
apply PA1
rewrite PA4 at h_witness
exact h_witness
qed
- Occurrences
- 21
- Distinct objects
- 21
- Reused references
- 0
- Depth
- 12
- Cuts
- 0
- Certificate SHA-256
9a743f0b80bd…
le_add_leftA number is below a left-added summand
Order
checked
Adding on the left produces an explicit order witness.
Exact expanded PA statement
forall a b. exists k. k + a = b + a
Complete replay recipe: dependency imports + authored proof
pa prove forall a b. exists k. k + a = b + a
intro a
intro b
exists b
refl
qed
- Occurrences
- 4
- Distinct objects
- 4
- Reused references
- 0
- Depth
- 4
- Cuts
- 0
- Certificate SHA-256
87a93b4692ab…
le_add_rightA number is below itself plus a right summand
Order
checked
Adding on the right produces an explicit order witness.
Exact expanded PA statement
forall a b. exists k. k + a = a + b
Complete replay recipe: dependency imports + authored proof
pa prove forall a b. exists k. k + a = a + b
use add_comm
intro a
intro b
exists b
apply add_comm
qed
- Occurrences
- 80
- Distinct objects
- 74
- Reused references
- 6
- Depth
- 13
- Cuts
- 3
- Certificate SHA-256
a7c973720d50…
add_le_add_rightAdding the same right summand preserves order
Order
checked
Adding the same right summand preserves the witness-defined order.
Exact expanded PA statement
forall a b c. (exists k. k + a = b) -> exists r. r + (a + c) = b + c
Complete replay recipe: dependency imports + authored proof
pa prove forall a b c. (exists k. k + a = b) -> exists r. r + (a + c) = b + c
use add_assoc
intro a
intro b
intro c
intro h
cases h
exists x
trans (x + a) + c
symm
apply add_assoc
congr
exact h_witness
refl
qed
- Occurrences
- 50
- Distinct objects
- 47
- Reused references
- 3
- Depth
- 13
- Cuts
- 1
- Certificate SHA-256
b9f1f17b67a5…
add_le_add_leftAdding the same left summand preserves order
Order
checked
Adding the same left summand preserves the witness-defined order.
Exact expanded PA statement
forall a b c. (exists k. k + a = b) -> exists r. r + (c + a) = c + b
Complete replay recipe: dependency imports + authored proof
pa prove forall a b c. (exists k. k + a = b) -> exists r. r + (c + a) = c + b
use add_assoc
use add_comm
intro a
intro b
intro c
intro h
cases h
exists x
trans (x + c) + a
symm
apply add_assoc
trans (c + x) + a
congr
apply add_comm
refl
trans c + (x + a)
apply add_assoc
congr
refl
exact h_witness
qed
- Occurrences
- 135
- Distinct objects
- 124
- Reused references
- 11
- Depth
- 15
- Cuts
- 4
- Certificate SHA-256
2c818a03f8f1…
succ_le_succSuccessor preserves order
Order
checked
Successor preserves the witness-defined order.
Exact expanded PA statement
forall a b. (exists k. k + a = b) -> exists r. r + S a = S b
Complete replay recipe: dependency imports + authored proof
pa prove forall a b. (exists k. k + a = b) -> exists r. r + S a = S b
intro a
intro b
intro h
cases h
exists x
rewrite PA4
congr
exact h_witness
qed
- Occurrences
- 13
- Distinct objects
- 13
- Reused references
- 0
- Depth
- 10
- Cuts
- 0
- Certificate SHA-256
72f0bef7672b…
le_of_succ_le_succSuccessor reflects order
Order
checked
Successor order reflects to the underlying naturals.
gcd_exists_up_to gcd_balanced_bezout_exists_up_to factor_property_succ prime_divisor_exists_up_to beta_accumulated_product_step beta_crt_prefix_congruence_step beta_exclusive_accumulated_product_step beta_exclusive_recode_congruence_step beta_prefix_product_trace_exists beta_product_succ_append beta_factor_prefix_product_append all_prime_succ_intro sorted_singleton sorted_succ_intro greatest_prime_divisor_search beta_factor_divides_product prime_factorization_exists_up_to beta_sorted_factor_le_last prime_factorization_uniqueness_by_length beta_repeat_succ_extend beta_range_succ_extend beta_prefix_sum_trace_exists lt_three_cases lt_five_cases lt_seven_cases finite_lt_succ_eq_or_ltExact expanded PA statement
forall a b. (exists k. k + S a = S b) -> exists r. r + a = b
Complete replay recipe: dependency imports + authored proof
pa prove forall a b. (exists k. k + S a = S b) -> exists r. r + a = b
intro a
intro b
intro h
cases h
exists x
apply PA2
trans x + S a
symm
apply PA4
exact h_witness
qed
- Occurrences
- 16
- Distinct objects
- 16
- Reused references
- 0
- Depth
- 11
- Cuts
- 0
- Certificate SHA-256
f4da1b80d84f…
le_succOrder is preserved by raising the upper bound
Order
checked
A weak inequality remains true after raising its upper bound by one.
factor_search_up_to base_le_beta_modulus beta_product_functional beta_product_succ_decompose all_prime_succ_elim_prefix sorted_succ_elim_prefix greatest_prime_divisor_search beta_prime_divisor_product_member pow_successor_decompose beta_sum_trace_functional beta_sum_succ_decompose beta_product_pointwise_mod_congruent beta_sum_pointwise_mod_congruent all_bits_prefix_succ factorial_succ_decompose finite_injective_prefix_succ beta_prefix_swap_last_from_entries finite_swap_last_bounded finite_swap_last_injective finite_swap_last_surjective_back finite_contains_decidable finite_bounded_prefix_without_top finite_surjective_succ_intro finite_last_is_top_from_prefix_surjective finite_bounded_injective_surjective beta_product_replace_balance beta_product_swap_last_invariant finite_fixed_last_prefix_boundedExact expanded PA statement
forall a b. (exists k. k + a = b) -> exists r. r + a = S b
Complete replay recipe: dependency imports + authored proof
pa prove forall a b. (exists k. k + a = b) -> exists r. r + a = S b
use add_succ_left
intro a
intro b
intro h
cases h
exists S x
trans S (x + a)
apply add_succ_left
congr
exact h_witness
qed
- Occurrences
- 40
- Distinct objects
- 38
- Reused references
- 2
- Depth
- 11
- Cuts
- 1
- Certificate SHA-256
acb1d2bedd29…
lt_to_leStrict order entails weak order
Order
checked
A witnessed strict inequality entails the corresponding weak inequality.
Exact expanded PA statement
forall a b. (exists k. k + S a = b) -> exists r. r + a = b
Complete replay recipe: dependency imports + authored proof
pa prove forall a b. (exists k. k + S a = b) -> exists r. r + a = b
use add_succ_left
intro a
intro b
intro h
cases h
exists S x
trans x + S a
trans S (x + a)
apply add_succ_left
symm
apply PA4
exact h_witness
qed
- Occurrences
- 44
- Distinct objects
- 42
- Reused references
- 2
- Depth
- 12
- Cuts
- 1
- Certificate SHA-256
04cba73adcda…
add_le_cancel_rightCancel a common right summand from order
Order
checked
A common right summand can be cancelled from an order comparison.
Exact expanded PA statement
forall a b c. (exists k. k + (a + c) = b + c) -> exists r. r + a = b
Complete replay recipe: dependency imports + authored proof
pa prove forall a b c. (exists k. k + (a + c) = b + c) -> exists r. r + a = b
use add_assoc
use add_right_cancel
intro a
intro b
intro c
intro h
cases h
exists x
specialize add_right_cancel (x + a)
specialize add_right_cancel b
specialize add_right_cancel c
apply add_right_cancel
trans x + (a + c)
apply add_assoc
exact h_witness
qed
- Occurrences
- 103
- Distinct objects
- 100
- Reused references
- 3
- Depth
- 20
- Cuts
- 2
- Certificate SHA-256
cec17a619915…
lt_irrefl_expandedStrict order is irreflexive
Order
checked
No natural is strictly below itself, with strict order fully expanded.
Exact expanded PA statement
forall n. ~(exists k. k + S n = n)
Complete replay recipe: dependency imports + authored proof
pa prove forall n. ~(exists k. k + S n = n)
use add_succ_left
use no_succ_add_fixed
intro n
intro h
cases h
specialize no_succ_add_fixed x
specialize no_succ_add_fixed n
apply no_succ_add_fixed
trans x + S n
trans S (x + n)
apply add_succ_left
symm
apply PA4
exact h_witness
qed
- Occurrences
- 83
- Distinct objects
- 81
- Reused references
- 2
- Depth
- 16
- Cuts
- 2
- Certificate SHA-256
fb85108bee59…
le_eq_or_ltA weak inequality is equality or strict inequality
Order
checked
A witnessed inequality is either equality or a witnessed strict inequality.
remainder_bound_step gcd_exists_up_to gcd_balanced_bezout_exists_up_to factor_property_succ proper_factor_lt beta_accumulated_product_step beta_crt_prefix_congruence_step beta_exclusive_accumulated_product_step beta_exclusive_recode_congruence_step beta_prefix_product_trace_exists beta_product_succ_append beta_factor_prefix_product_append all_prime_succ_intro sorted_succ_intro greatest_prime_divisor_search beta_factor_divides_product prime_factorization_exists_up_to beta_sorted_factor_le_last prime_factorization_uniqueness_by_length quadratic_residue_search_up_to beta_repeat_succ_extend beta_range_succ_extend beta_prefix_sum_trace_exists lt_three_cases lt_five_cases lt_seven_cases finite_lt_succ_eq_or_ltExact expanded PA statement
forall a b. (exists k. k + a = b) -> a = b \/ exists k. k + S a = b
Complete replay recipe: dependency imports + authored proof
pa prove forall a b. (exists k. k + a = b) -> a = b \/ exists k. k + S a = b
use zero_or_succ
use zero_add
use add_succ_left
intro a
intro b
intro h
cases h
specialize zero_or_succ x
cases zero_or_succ
left
rewrite zero_or_succ_left at h_witness
specialize zero_add a
rewrite zero_add at h_witness
exact h_witness
cases zero_or_succ_right
right
exists x1
trans S x1 + a
trans S (x1 + a)
apply PA4
symm
apply add_succ_left
rewrite <- zero_or_succ_right_witness
exact h_witness
qed
- Occurrences
- 98
- Distinct objects
- 94
- Reused references
- 4
- Depth
- 19
- Cuts
- 3
- Certificate SHA-256
59ff9abf5aa8…
lt_of_lt_of_leStrict order followed by weak order
Order
checked
Strict order followed by weak order remains strict.
Exact expanded PA statement
forall a b c. (exists k. k + S a = b) -> (exists k. k + b = c) -> exists k. k + S a = c
Complete replay recipe: dependency imports + authored proof
pa prove forall a b c. (exists k. k + S a = b) -> (exists k. k + b = c) -> exists k. k + S a = c
use le_trans
intro a
intro b
intro c
intro hab
intro hbc
specialize le_trans (S a)
specialize le_trans b
specialize le_trans c
apply le_trans
exact hab
exact hbc
qed
- Occurrences
- 80
- Distinct objects
- 77
- Reused references
- 3
- Depth
- 16
- Cuts
- 2
- Certificate SHA-256
ef269788128f…
lt_of_le_of_ltWeak order followed by strict order
Order
checked
Weak order followed by strict order remains strict.
Exact expanded PA statement
forall a b c. (exists k. k + a = b) -> (exists k. k + S b = c) -> exists k. k + S a = c
Complete replay recipe: dependency imports + authored proof
pa prove forall a b c. (exists k. k + a = b) -> (exists k. k + S b = c) -> exists k. k + S a = c
use add_assoc
intro a
intro b
intro c
intro hab
intro hbc
cases hab
cases hbc
exists x1 + x
trans x1 + (x + S a)
apply add_assoc
rewrite PA4
rewrite hab_witness
exact hbc_witness
qed
- Occurrences
- 58
- Distinct objects
- 55
- Reused references
- 3
- Depth
- 15
- Cuts
- 1
- Certificate SHA-256
f3e188673abc…
lt_transStrict order is transitive
Order
checked
Strict order is transitive.
Exact expanded PA statement
forall a b c. (exists k. k + S a = b) -> (exists k. k + S b = c) -> exists k. k + S a = c
Complete replay recipe: dependency imports + authored proof
pa prove forall a b c. (exists k. k + S a = b) -> (exists k. k + S b = c) -> exists k. k + S a = c
use add_assoc
use add_succ_left
intro a
intro b
intro c
intro hab
intro hbc
cases hab
cases hbc
exists x1 + S x
trans x1 + (S x + S a)
apply add_assoc
trans x1 + S (x + S a)
congr
refl
apply add_succ_left
trans x1 + S b
congr
refl
congr
exact hab_witness
exact hbc_witness
qed
- Occurrences
- 89
- Distinct objects
- 82
- Reused references
- 7
- Depth
- 16
- Cuts
- 2
- Certificate SHA-256
83ea214a0810…
le_or_ltWeak-or-reverse-strict comparison
Order
checked
Any two naturals satisfy weak order in one direction or strict order in the other.
Exact expanded PA statement
forall a b. (exists k. k + a = b) \/ exists k. k + S b = a
Complete replay recipe: dependency imports + authored proof
pa prove forall a b. (exists k. k + a = b) \/ exists k. k + S b = a
induction a
intro b
left
exists b
apply PA3
induction b
right
exists a
trans S (a + 0)
apply PA4
congr
apply PA3
specialize IH b
cases IH
left
cases IH_left
exists x
rewrite PA4
congr
exact IH_left_witness
right
cases IH_right
exists x
rewrite PA4
congr
exact IH_right_witness
qed
- Occurrences
- 48
- Distinct objects
- 48
- Reused references
- 0
- Depth
- 17
- Cuts
- 0
- Certificate SHA-256
8317909b51ce…
lt_trichotomyNatural strict-order trichotomy
Order
checked
Two naturals are equal or strictly ordered in exactly one displayed direction.
Exact expanded PA statement
forall a b. a = b \/ ((exists k. k + S a = b) \/ exists k. k + S b = a)
Complete replay recipe: dependency imports + authored proof
pa prove forall a b. a = b \/ ((exists k. k + S a = b) \/ exists k. k + S b = a)
induction a
induction b
left
refl
right
left
exists b
trans S (b + 0)
apply PA4
congr
apply PA3
induction b
right
right
exists a
trans S (a + 0)
apply PA4
congr
apply PA3
specialize IH b
cases IH
left
congr
exact IH_left
cases IH_right
right
left
cases IH_right_left
exists x
rewrite PA4
congr
exact IH_right_left_witness
right
right
cases IH_right_right
exists x
rewrite PA4
congr
exact IH_right_right_witness
qed
- Occurrences
- 66
- Distinct objects
- 66
- Reused references
- 0
- Depth
- 19
- Cuts
- 0
- Certificate SHA-256
abdf421beb86…
lt_not_leStrict order excludes reverse weak order
Order
checked
A strict inequality excludes the reverse weak inequality.
Exact expanded PA statement
forall a b. (exists k. k + S a = b) -> ~ (exists k. k + b = a)
Complete replay recipe: dependency imports + authored proof
pa prove forall a b. (exists k. k + S a = b) -> ~ (exists k. k + b = a)
have hbad : forall z u v. ~(z = u + (v + S z))
intro z
induction z
intro u
intro v
intro hz
apply PA1
symm
rewrite PA4 at hz
rewrite PA4 at hz
exact hz
intro u
intro v
intro hz
specialize IH u
specialize IH v
apply IH
apply PA2
rewrite PA4 at hz
rewrite PA4 at hz
exact hz
intro a
intro b
intro hab
intro hba
cases hab
cases hba
specialize hbad a
specialize hbad x1
specialize hbad x
apply hbad
symm
rewrite <- hab_witness at hba_witness
exact hba_witness
qed
- Occurrences
- 56
- Distinct objects
- 56
- Reused references
- 0
- Depth
- 23
- Cuts
- 0
- Certificate SHA-256
e410e57fb272…
le_not_ltWeak order excludes reverse strict order
Order
checked
A weak inequality excludes strict inequality in the reverse direction.
Exact expanded PA statement
forall a b. (exists k. k + a = b) -> ~ (exists k. k + S b = a)
Complete replay recipe: dependency imports + authored proof
pa prove forall a b. (exists k. k + a = b) -> ~ (exists k. k + S b = a)
use lt_not_le
intro a
intro b
intro hab
intro hba
specialize lt_not_le b
specialize lt_not_le a
apply lt_not_le
exact hba
exact hab
qed
- Occurrences
- 74
- Distinct objects
- 74
- Reused references
- 0
- Depth
- 24
- Cuts
- 1
- Certificate SHA-256
d9e660d3f46d…
lt_not_eq_add_middleA strict bound cannot occur inside an additive decomposition of the lower term
Order
checked
A strict upper bound prevents the lower term from containing that bound as an additive middle block.
Exact expanded PA statement
forall r m a b. (exists k. k + S r = m) -> ~(r = (a + m) + b)
Complete replay recipe: dependency imports + authored proof
pa prove forall r m a b. (exists k. k + S r = m) -> ~(r = (a + m) + b)
use add_succ_left
have hbad : forall z a w b. ~(z = (a + (w + S z)) + b)
intro z
induction z
intro a
intro w
intro b
intro hz
apply PA1
symm
rewrite PA4 at hz
rewrite PA4 at hz
specialize add_succ_left (a + (w + 0))
specialize add_succ_left b
rewrite add_succ_left at hz
exact hz
intro a
intro w
intro b
intro hz
specialize IH a
specialize IH w
specialize IH b
apply IH
apply PA2
rewrite PA4 at hz
rewrite PA4 at hz
specialize add_succ_left (a + (w + S z))
specialize add_succ_left b
rewrite add_succ_left at hz
exact hz
intro r
intro m
intro a
intro b
intro hr
intro heq
cases hr
specialize hbad r
specialize hbad a
specialize hbad x
specialize hbad b
apply hbad
rewrite <- hr_witness at heq
exact heq
qed
- Occurrences
- 95
- Distinct objects
- 93
- Reused references
- 2
- Depth
- 28
- Cuts
- 1
- Certificate SHA-256
77ec046fb0e4…
mul_le_mul_leftLeft multiplication preserves order
Multiplication
checked
Left multiplication preserves the witness-defined order.
Exact expanded PA statement
forall a b c. (exists k. k + a = b) -> exists r. r + c * a = c * b
Complete replay recipe: dependency imports + authored proof
pa prove forall a b c. (exists k. k + a = b) -> exists r. r + c * a = c * b
use mul_add
intro a
intro b
intro c
intro h
cases h
exists c * x
trans c * (x + a)
symm
apply mul_add
congr
refl
exact h_witness
qed
- Occurrences
- 94
- Distinct objects
- 87
- Reused references
- 7
- Depth
- 17
- Cuts
- 2
- Certificate SHA-256
44b7ebda990f…
mul_le_mul_rightRight multiplication preserves order
Multiplication
checked
Right multiplication preserves the witness-defined order.
Exact expanded PA statement
forall a b c. (exists k. k + a = b) -> exists r. r + a * c = b * c
Complete replay recipe: dependency imports + authored proof
pa prove forall a b c. (exists k. k + a = b) -> exists r. r + a * c = b * c
use add_mul
intro a
intro b
intro c
intro h
cases h
exists x * c
trans (x + a) * c
symm
apply add_mul
congr
exact h_witness
refl
qed
- Occurrences
- 343
- Distinct objects
- 280
- Reused references
- 31
- Depth
- 26
- Cuts
- 10
- Certificate SHA-256
71720fa700b3…
mul_lt_mul_succ_left_nonzeroA nonzero left factor strictly separates successor products
Multiplication
checked
Multiplication by a nonzero left factor strictly increases across a successor step.
Exact expanded PA statement
forall c a. ~(c = 0) -> exists r. r + S (c * a) = c * S a
Complete replay recipe: dependency imports + authored proof
pa prove forall c a. ~(c = 0) -> exists r. r + S (c * a) = c * S a
use add_comm
induction c
intro a
intro hc
exfalso
apply hc
refl
intro a
intro hc
exists c
trans S (c + S c * a)
apply PA4
trans S (S c * a + c)
congr
apply add_comm
trans S c * a + S c
symm
apply PA4
symm
apply PA6
qed
- Occurrences
- 104
- Distinct objects
- 98
- Reused references
- 6
- Depth
- 14
- Cuts
- 3
- Certificate SHA-256
9a2a8ae4e6ea…
division_remainder_succDivision with remainder for successor divisors
Division
checked
Every dividend has a quotient and bounded remainder for a successor divisor.
Exact expanded PA statement
forall d n. exists q r. n = S d * q + r /\ S r <= S d
Complete replay recipe: dependency imports + authored proof
pa prove forall d n. exists q r. n = S d * q + r /\ S r <= S d
use zero_add
use add_succ_left
use zero_or_succ
intro d
induction n
exists 0
exists 0
split
simp
exists d
simp
cases IH
cases IH_witness
cases IH_witness_witness
cases IH_witness_witness_right
specialize zero_or_succ x2
cases zero_or_succ
rewrite zero_or_succ_left at IH_witness_witness_right_witness
specialize zero_add S x1
rewrite zero_add at IH_witness_witness_right_witness
have hrd : x1 = d
apply PA2
exact IH_witness_witness_right_witness
exists S x
exists 0
split
rewrite IH_witness_witness_left
rewrite hrd
simp
exists d
simp
cases zero_or_succ_right
exists x
exists S x1
split
rewrite IH_witness_witness_left
simp
exists x3
rewrite <- IH_witness_witness_right_witness
rewrite zero_or_succ_right_witness
simp [add_succ_left]
qed
- Occurrences
- 179
- Distinct objects
- 164
- Reused references
- 15
- Depth
- 26
- Cuts
- 3
- Certificate SHA-256
1b331ac3a9c4…
division_remainder_existsDivision with remainder for every nonzero divisor
Division
checked
Every positive divisor admits a quotient and a strictly bounded remainder.
gcd_exists_up_to gcd_balanced_bezout_exists_up_to multiple_decidable_nonzero mod_eq_to_remainder_decomposition beta_at_exists mod_eq_decidable_nonzero quadratic_residue_bounded_equiv prime_bounded_nonzero_mod_inverse canonical_remainder_exists mod_eq_common_remainder_decomposition crt_solution_canonical_remainder_nonzeroExact expanded PA statement
forall m n. ~(m = 0) -> exists q r. n = m * q + r /\ S r <= m
Complete replay recipe: dependency imports + authored proof
pa prove forall m n. ~(m = 0) -> exists q r. n = m * q + r /\ S r <= m
use zero_or_succ
use division_remainder_succ
intro m
intro n
intro hm
specialize zero_or_succ m
cases zero_or_succ
exfalso
apply hm
exact zero_or_succ_left
cases zero_or_succ_right
specialize division_remainder_succ x
specialize division_remainder_succ n
rewrite zero_or_succ_right_witness
rewrite zero_or_succ_right_witness
exact division_remainder_succ
qed
- Occurrences
- 219
- Distinct objects
- 196
- Reused references
- 16
- Depth
- 28
- Cuts
- 5
- Certificate SHA-256
9642451ab71c…
remainder_bound_stepAdvance a strict remainder bound by one step
Division
checked
A bounded remainder either reaches the divisor or remains bounded after successor.
Exact expanded PA statement
forall r d. (exists k. k + S r = d) -> S r = d \/ exists k. k + S (S r) = d
Complete replay recipe: dependency imports + authored proof
pa prove forall r d. (exists k. k + S r = d) -> S r = d \/ exists k. k + S (S r) = d
use le_eq_or_lt
intro r
intro d
intro h
specialize le_eq_or_lt (S r)
specialize le_eq_or_lt d
apply le_eq_or_lt
exact h
qed
- Occurrences
- 113
- Distinct objects
- 109
- Reused references
- 4
- Depth
- 20
- Cuts
- 4
- Certificate SHA-256
715004086fe6…
division_block_upperA bounded remainder lies below the next divisor block
Division
checked
A bounded remainder keeps its decomposition below the next divisor block.
Exact expanded PA statement
forall d q r. (exists k. k + S r = d) -> exists k. k + S (d * q + r) = d * S q
Complete replay recipe: dependency imports + authored proof
pa prove forall d q r. (exists k. k + S r = d) -> exists k. k + S (d * q + r) = d * S q
use add_assoc
use add_comm
intro d
intro q
intro r
intro h
cases h
exists x
trans S (x + (d * q + r))
apply PA4
trans S ((x + d * q) + r)
congr
symm
apply add_assoc
trans S ((d * q + x) + r)
congr
congr
apply add_comm
refl
trans S (d * q + (x + r))
congr
apply add_assoc
trans d * q + S (x + r)
symm
apply PA4
trans d * q + (x + S r)
congr
refl
symm
apply PA4
trans d * q + d
congr
refl
exact h_witness
symm
apply PA6
qed
- Occurrences
- 159
- Distinct objects
- 148
- Reused references
- 11
- Depth
- 19
- Cuts
- 4
- Certificate SHA-256
a723be287d1c…
positive_quotient_gap_impossibleA positive quotient gap contradicts bounded remainders
Division
checked
A positive gap between quotients makes two bounded-remainder decompositions unequal.
Exact expanded PA statement
forall m q q2 r s k. (exists z. z + S r = m) -> S k + q = q2 -> ~(m * q + r = m * q2 + s)
Complete replay recipe: dependency imports + authored proof
pa prove forall m q q2 r s k. (exists z. z + S r = m) -> S k + q = q2 -> ~(m * q + r = m * q2 + s)
use add_comm
use add_assoc
use mul_add
use add_left_cancel
use lt_not_eq_add_middle
intro m
intro q
intro q2
intro r
intro s
intro k
intro hr
intro hgap
intro heq
specialize lt_not_eq_add_middle r
specialize lt_not_eq_add_middle m
specialize lt_not_eq_add_middle (m * k)
specialize lt_not_eq_add_middle s
apply lt_not_eq_add_middle
exact hr
specialize add_left_cancel (m * q)
specialize add_left_cancel r
specialize add_left_cancel ((m * k + m) + s)
apply add_left_cancel
trans m * q2 + s
exact heq
rewrite <- hgap
specialize add_comm S k
specialize add_comm q
rewrite add_comm
specialize mul_add m
specialize mul_add q
specialize mul_add S k
rewrite mul_add
rewrite PA6
specialize add_assoc (m * q)
specialize add_assoc (m * k + m)
specialize add_assoc s
apply add_assoc
qed
- Occurrences
- 517
- Distinct objects
- 369
- Reused references
- 18
- Depth
- 52
- Cuts
- 13
- Certificate SHA-256
de44a14fab4f…
remainder_unique_same_quotientRemainders are unique at a fixed quotient
Division
checked
Equal decompositions with the same quotient have equal remainders.
Exact expanded PA statement
forall d q r s. d * q + r = d * q + s -> r = s
Complete replay recipe: dependency imports + authored proof
pa prove forall d q r s. d * q + r = d * q + s -> r = s
use add_left_cancel
intro d
intro q
intro r
intro s
intro h
specialize add_left_cancel (d * q)
specialize add_left_cancel r
specialize add_left_cancel s
apply add_left_cancel
exact h
qed
- Occurrences
- 164
- Distinct objects
- 158
- Reused references
- 6
- Depth
- 19
- Cuts
- 5
- Certificate SHA-256
45700cc00c1d…
division_remainder_uniqueQuotient and remainder are unique
Division
checked
Bounded quotient-remainder decompositions have unique quotients and remainders.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use zero_add
use le_total
use zero_or_succ
use add_left_cancel
use positive_quotient_gap_impossible
intro m
intro n
intro q
intro r
intro q2
intro r2
intro h1
intro hr
intro h2
intro hr2
have hsum : m * q + r = m * q2 + r2
trans n
symm
exact h1
exact h2
specialize le_total q
specialize le_total q2
cases le_total
cases le_total_left
specialize zero_or_succ x
cases zero_or_succ
rewrite zero_or_succ_left at le_total_left_witness
specialize zero_add q
rewrite zero_add at le_total_left_witness
split
exact le_total_left_witness
specialize add_left_cancel (m * q)
specialize add_left_cancel r
specialize add_left_cancel r2
apply add_left_cancel
rewrite <- le_total_left_witness at hsum
exact hsum
cases zero_or_succ_right
exfalso
specialize positive_quotient_gap_impossible m
specialize positive_quotient_gap_impossible q
specialize positive_quotient_gap_impossible q2
specialize positive_quotient_gap_impossible r
specialize positive_quotient_gap_impossible r2
specialize positive_quotient_gap_impossible x1
apply positive_quotient_gap_impossible
exact hr
rewrite zero_or_succ_right_witness at le_total_left_witness
exact le_total_left_witness
exact hsum
cases le_total_right
specialize zero_or_succ x
cases zero_or_succ
rewrite zero_or_succ_left at le_total_right_witness
specialize zero_add q2
rewrite zero_add at le_total_right_witness
split
symm
exact le_total_right_witness
specialize add_left_cancel (m * q)
specialize add_left_cancel r
specialize add_left_cancel r2
apply add_left_cancel
rewrite le_total_right_witness at hsum
exact hsum
cases zero_or_succ_right
exfalso
specialize positive_quotient_gap_impossible m
specialize positive_quotient_gap_impossible q2
specialize positive_quotient_gap_impossible q
specialize positive_quotient_gap_impossible r2
specialize positive_quotient_gap_impossible r
specialize positive_quotient_gap_impossible x1
apply positive_quotient_gap_impossible
exact hr2
rewrite zero_or_succ_right_witness at le_total_right_witness
exact le_total_right_witness
symm
exact hsum
qed
- Occurrences
- 854
- Distinct objects
- 544
- Reused references
- 22
- Depth
- 57
- Cuts
- 22
- Certificate SHA-256
1c8ee6b98aae…
zero_remainder_implies_multipleZero remainder implies divisibility
Division
checked
A quotient decomposition with zero remainder supplies a divisibility witness.
Exact expanded PA statement
forall m n q. n = m * q + 0 -> exists k. n = m * k
Complete replay recipe: dependency imports + authored proof
pa prove forall m n q. n = m * q + 0 -> exists k. n = m * k
intro m
intro n
intro q
intro h
exists q
rewrite h
simp
qed
- Occurrences
- 13
- Distinct objects
- 13
- Reused references
- 0
- Depth
- 10
- Cuts
- 0
- Certificate SHA-256
983bdc1e759a…
multiple_has_zero_remainderA multiple has a bounded zero remainder
Division
checked
Every multiple of a nonzero divisor has a bounded zero-remainder decomposition.
Exact expanded PA statement
forall m n. ~(m = 0) -> (exists q. n = m * q) -> exists q r. (n = m * q + r /\ r = 0) /\ S r <= m
Complete replay recipe: dependency imports + authored proof
pa prove forall m n. ~(m = 0) -> (exists q. n = m * q) -> exists q r. (n = m * q + r /\ r = 0) /\ S r <= m
use zero_or_succ
intro m
intro n
intro hm
intro hd
cases hd
specialize zero_or_succ m
cases zero_or_succ
exfalso
apply hm
exact zero_or_succ_left
cases zero_or_succ_right
exists x
exists 0
split
split
rewrite hd_witness
simp
refl
exists x1
rewrite zero_or_succ_right_witness
simp
qed
- Occurrences
- 54
- Distinct objects
- 53
- Reused references
- 1
- Depth
- 20
- Cuts
- 1
- Certificate SHA-256
2dd49a512758…
add_eq_zero_leftA zero sum has a zero left summand
Addition
checked
A sum equal to zero has zero as its left addend.
Exact expanded PA statement
forall a b. a + b = 0 -> a = 0
Complete replay recipe: dependency imports + authored proof
pa prove forall a b. a + b = 0 -> a = 0
use add_comm
use add_eq_zero_right
intro a
intro b
intro h
specialize add_eq_zero_right b
specialize add_eq_zero_right a
apply add_eq_zero_right
trans a + b
apply add_comm
exact h
qed
- Occurrences
- 112
- Distinct objects
- 106
- Reused references
- 6
- Depth
- 14
- Cuts
- 4
- Certificate SHA-256
546a7553991f…
add_eq_zero_componentsBoth summands of a zero sum are zero
Addition
checked
Both summands of a zero sum are zero.
Exact expanded PA statement
forall a b. a + b = 0 -> a = 0 /\ b = 0
Complete replay recipe: dependency imports + authored proof
pa prove forall a b. a + b = 0 -> a = 0 /\ b = 0
use add_eq_zero_left
use add_eq_zero_right
intro a
intro b
intro h
split
apply add_eq_zero_left
exact h
apply add_eq_zero_right
exact h
qed
- Occurrences
- 147
- Distinct objects
- 122
- Reused references
- 7
- Depth
- 15
- Cuts
- 6
- Certificate SHA-256
5ebeb330038f…
mul_eq_one_componentsBoth factors of a product equal to one are one
Multiplication
checked
A product is one only when both natural factors are one.
Exact expanded PA statement
forall a b. a * b = 1 -> a = 1 /\ b = 1
Complete replay recipe: dependency imports + authored proof
pa prove forall a b. a * b = 1 -> a = 1 /\ b = 1
use mul_zero_left
use add_eq_zero_right
use one_mul
intro a
induction a
intro b
intro h
specialize mul_zero_left b
rewrite mul_zero_left at h
exfalso
apply PA1
symm
exact h
intro b
induction b
intro h
rewrite PA5 at h
exfalso
apply PA1
symm
exact h
intro h
rewrite PA6 at h
rewrite PA4 at h
have hz : S a * b + a = 0
apply PA2
exact h
specialize add_eq_zero_right (S a * b)
specialize add_eq_zero_right a
have ha0 : a = 0
apply add_eq_zero_right
exact hz
split
congr
exact ha0
rewrite ha0 at hz
rewrite ha0 at hz
rewrite PA3 at hz
specialize one_mul b
rewrite one_mul at hz
congr
exact hz
qed
- Occurrences
- 176
- Distinct objects
- 164
- Reused references
- 12
- Depth
- 27
- Cuts
- 3
- Certificate SHA-256
a6ffdfad0473…
mul_ne_zeroA product of nonzero naturals is nonzero
Multiplication
checked
A product of two nonzero naturals is nonzero.
Exact expanded PA statement
forall a b. ~(a = 0) -> ~(b = 0) -> ~(a * b = 0)
Complete replay recipe: dependency imports + authored proof
pa prove forall a b. ~(a = 0) -> ~(b = 0) -> ~(a * b = 0)
use mul_eq_zero
intro a
intro b
intro ha
intro hb
intro hab
specialize mul_eq_zero a
specialize mul_eq_zero b
have hz : a = 0 \/ b = 0
apply mul_eq_zero
exact hab
cases hz
apply ha
exact hz_left
apply hb
exact hz_right
qed
- Occurrences
- 65
- Distinct objects
- 65
- Reused references
- 0
- Depth
- 18
- Cuts
- 2
- Certificate SHA-256
645eefcefbe2…
mul_left_cancel_nonzeroA nonzero factor cancels on the left
Multiplication
checked
A nonzero common left factor can be cancelled.
Exact expanded PA statement
forall a b c. ~(a = 0) -> a * b = a * c -> b = c
Complete replay recipe: dependency imports + authored proof
pa prove forall a b c. ~(a = 0) -> a * b = a * c -> b = c
use mul_eq_zero
use mul_ne_zero
use add_right_cancel
use succ_ne_zero
intro a
induction b
intro c
intro ha
intro h
have hz : a * c = 0
symm
rewrite PA5 at h
exact h
have factors : a = 0 \/ c = 0
specialize mul_eq_zero a
specialize mul_eq_zero c
apply mul_eq_zero
exact hz
cases factors
exfalso
apply ha
exact factors_left
symm
exact factors_right
intro c
induction c
intro ha
intro h
exfalso
specialize mul_ne_zero a
specialize mul_ne_zero (S b)
apply mul_ne_zero
exact ha
specialize succ_ne_zero b
exact succ_ne_zero
rewrite PA5 at h
exact h
intro ha
intro h
congr
apply IH
exact ha
apply add_right_cancel
rewrite PA6 at h
rewrite PA6 at h
exact h
qed
- Occurrences
- 224
- Distinct objects
- 177
- Reused references
- 1
- Depth
- 23
- Cuts
- 7
- Certificate SHA-256
6ac15cdf9d96…
mul_right_cancel_nonzeroA nonzero factor cancels on the right
Multiplication
checked
A nonzero common right factor can be cancelled.
Exact expanded PA statement
forall a b c. ~(c = 0) -> a * c = b * c -> a = b
Complete replay recipe: dependency imports + authored proof
pa prove forall a b c. ~(c = 0) -> a * c = b * c -> a = b
use mul_comm
use mul_left_cancel_nonzero
intro a
intro b
intro c
intro hc
intro h
specialize mul_left_cancel_nonzero c
specialize mul_left_cancel_nonzero a
specialize mul_left_cancel_nonzero b
apply mul_left_cancel_nonzero
exact hc
trans a * c
apply mul_comm
trans b * c
exact h
apply mul_comm
qed
- Occurrences
- 478
- Distinct objects
- 409
- Reused references
- 23
- Depth
- 25
- Cuts
- 15
- Certificate SHA-256
7c4fbfcfbc65…
two_large_factors_impossibleTwo is not a product of two successors of successors
Multiplication
checked
Two naturals at least two cannot multiply to two.
Exact expanded PA statement
forall a b. ~(2 = S (S a) * S (S b))
Complete replay recipe: dependency imports + authored proof
pa prove forall a b. ~(2 = S (S a) * S (S b))
use mul_succ_left
use add_eq_zero_left
use mul_eq_zero
intro a
intro b
intro h
specialize mul_succ_left (S a)
specialize mul_succ_left (S (S b))
rewrite mul_succ_left at h
rewrite PA4 at h
rewrite PA4 at h
have hzero : 0 = S a * S (S b) + b
apply PA2
apply PA2
exact h
have hzero' : S a * S (S b) + b = 0
symm
exact hzero
have hprod : S a * S (S b) = 0
apply add_eq_zero_left
exact hzero'
specialize mul_eq_zero (S a)
specialize mul_eq_zero (S (S b))
have hz : S a = 0 \/ S (S b) = 0
apply mul_eq_zero
exact hprod
cases hz
apply PA1
exact hz_left
apply PA1
exact hz_right
qed
- Occurrences
- 376
- Distinct objects
- 267
- Reused references
- 19
- Depth
- 23
- Cuts
- 12
- Certificate SHA-256
33d33a9acbc7…
prime_twoTwo is prime
Primes
checked
Two is prime in the expanded first-order prime predicate.
Exact expanded PA statement
~(2 = 1) /\ forall a b. 2 = a * b -> a = 1 \/ b = 1
Complete replay recipe: dependency imports + authored proof
pa prove ~(2 = 1) /\ forall a b. 2 = a * b -> a = 1 \/ b = 1
use mul_zero_left
use two_large_factors_impossible
split
intro h
have h10 : 1 = 0
apply PA2
exact h
apply PA1
exact h10
intro a
induction b
intro h
rewrite PA5 at h
exfalso
apply PA1
exact h
induction b
intro h
right
refl
induction a
intro h
specialize mul_zero_left (S (S b))
rewrite mul_zero_left at h
exfalso
apply PA1
exact h
induction a
intro h
left
refl
intro h
exfalso
specialize two_large_factors_impossible a
specialize two_large_factors_impossible b
apply two_large_factors_impossible
exact h
qed
- Occurrences
- 456
- Distinct objects
- 344
- Reused references
- 22
- Depth
- 25
- Cuts
- 14
- Certificate SHA-256
6f30b33256b8…
multiple_zeroEvery natural number divides zero
Divisibility
checked
Zero is a multiple of every natural number.
Exact expanded PA statement
forall a. exists q. 0 = a * q
Complete replay recipe: dependency imports + authored proof
pa prove forall a. exists q. 0 = a * q
intro a
exists 0
rewrite PA5
refl
qed
- Occurrences
- 7
- Distinct objects
- 7
- Reused references
- 0
- Depth
- 6
- Cuts
- 0
- Certificate SHA-256
2304f77f5c8a…
one_multipleOne divides every natural number
Divisibility
checked
Every natural number is a multiple of one.
Exact expanded PA statement
forall n. exists q. n = 1 * q
Complete replay recipe: dependency imports + authored proof
pa prove forall n. exists q. n = 1 * q
use one_mul
intro n
exists n
symm
apply one_mul
qed
- Occurrences
- 32
- Distinct objects
- 32
- Reused references
- 0
- Depth
- 10
- Cuts
- 1
- Certificate SHA-256
3493ac871515…
multiple_reflDivisibility is reflexive
Divisibility
checked
Every natural number is a multiple of itself.
Exact expanded PA statement
forall a. exists q. a = a * q
Complete replay recipe: dependency imports + authored proof
pa prove forall a. exists q. a = a * q
use mul_one
intro a
exists 1
symm
apply mul_one
qed
- Occurrences
- 39
- Distinct objects
- 39
- Reused references
- 0
- Depth
- 10
- Cuts
- 2
- Certificate SHA-256
f8eb406ea24d…
multiple_addA common divisor divides a sum
Divisibility
checked
Multiples of a fixed number are closed under addition.
Exact expanded PA statement
forall a n m. (exists q. n = a * q) -> (exists r. m = a * r) -> exists s. n + m = a * s
Complete replay recipe: dependency imports + authored proof
pa prove forall a n m. (exists q. n = a * q) -> (exists r. m = a * r) -> exists s. n + m = a * s
use mul_add
intro a
intro n
intro m
intro hn
intro hm
cases hn
cases hm
exists x + x1
rewrite hn_witness
rewrite hm_witness
symm
apply mul_add
qed
- Occurrences
- 99
- Distinct objects
- 92
- Reused references
- 7
- Depth
- 17
- Cuts
- 2
- Certificate SHA-256
40c1927b5346…
multiple_mul_rightA divisor remains a divisor after right multiplication
Divisibility
checked
A right multiple of a multiple remains a multiple.
Exact expanded PA statement
forall a n m. (exists q. n = a * q) -> exists s. n * m = a * s
Complete replay recipe: dependency imports + authored proof
pa prove forall a n m. (exists q. n = a * q) -> exists s. n * m = a * s
use mul_assoc
intro a
intro n
intro m
intro hn
cases hn
exists x * m
rewrite hn_witness
apply mul_assoc
qed
- Occurrences
- 131
- Distinct objects
- 119
- Reused references
- 12
- Depth
- 18
- Cuts
- 3
- Certificate SHA-256
e2b7b5396400…
multiple_mul_leftA divisor remains a divisor after left multiplication
Divisibility
checked
A left multiple of a multiple remains a multiple.
Exact expanded PA statement
forall a n m. (exists q. n = a * q) -> exists s. m * n = a * s
Complete replay recipe: dependency imports + authored proof
pa prove forall a n m. (exists q. n = a * q) -> exists s. m * n = a * s
use mul_comm
use multiple_mul_right
intro a
intro n
intro m
intro hn
suffices hswap : m * n = n * m
rewrite hswap
apply multiple_mul_right
exact hn
apply mul_comm
qed
- Occurrences
- 370
- Distinct objects
- 304
- Reused references
- 34
- Depth
- 25
- Cuts
- 11
- Certificate SHA-256
532e24fbf506…
multiple_transDivisibility is transitive
Divisibility
checked
The multiple relation is transitive.
Exact expanded PA statement
forall a b n. (exists q. n = a * q) -> (exists r. a = b * r) -> exists s. n = b * s
Complete replay recipe: dependency imports + authored proof
pa prove forall a b n. (exists q. n = a * q) -> (exists r. a = b * r) -> exists s. n = b * s
use mul_assoc
intro a
intro b
intro n
intro hn
intro hab
cases hn
cases hab
exists x1 * x
rewrite hn_witness
rewrite hab_witness
apply mul_assoc
qed
- Occurrences
- 137
- Distinct objects
- 125
- Reused references
- 12
- Depth
- 18
- Cuts
- 3
- Certificate SHA-256
8cb32c63f8ac…
divisor_le_nonzeroA divisor of a nonzero natural is bounded
Divisibility
checked
A divisor of a nonzero natural is bounded by that natural.
Exact expanded PA statement
forall d n. ~(n = 0) -> (exists q. n = d * q) -> exists k. k + d = n
Complete replay recipe: dependency imports + authored proof
pa prove forall d n. ~(n = 0) -> (exists q. n = d * q) -> exists k. k + d = n
use one_le_of_ne_zero
intro d
intro n
intro hn
intro hd
cases hd
have hq : ~(x = 0)
intro hx
apply hn
trans d * x
exact hd_witness
rewrite hx
apply PA5
specialize one_le_of_ne_zero x
have h1q : exists k. k + 1 = x
apply one_le_of_ne_zero
exact hq
cases h1q
have hs : S x1 = x
trans x1 + 1
simp
exact h1q_witness
exists d * x1
trans d * S x1
symm
apply PA6
trans d * x
congr
refl
exact hs
symm
exact hd_witness
qed
- Occurrences
- 64
- Distinct objects
- 62
- Reused references
- 2
- Depth
- 17
- Cuts
- 1
- Certificate SHA-256
b96a5e2d2843…
divisor_oneEvery divisor of one is one
Divisibility
checked
Every natural divisor of one equals one.
Exact expanded PA statement
forall d. (exists y. 1 = d * y) -> d = 1
Complete replay recipe: dependency imports + authored proof
pa prove forall d. (exists y. 1 = d * y) -> d = 1
use mul_eq_one_components
intro d
intro h
cases h
specialize mul_eq_one_components d
specialize mul_eq_one_components x
have parts : d = 1 /\ x = 1
apply mul_eq_one_components
symm
exact h_witness
cases parts
exact parts_left
qed
- Occurrences
- 188
- Distinct objects
- 176
- Reused references
- 12
- Depth
- 28
- Cuts
- 4
- Certificate SHA-256
ef2c18d807f3…
multiple_antisymmDivisibility is antisymmetric
Divisibility
checked
Mutual divisibility is antisymmetric over natural numbers.
Exact expanded PA statement
forall a b. (exists x. b = a * x) -> (exists y. a = b * y) -> a = b
Complete replay recipe: dependency imports + authored proof
pa prove forall a b. (exists x. b = a * x) -> (exists y. a = b * y) -> a = b
use zero_or_succ
use mul_zero_left
use mul_assoc
use mul_one
use mul_left_cancel_nonzero
use mul_eq_one_components
intro a
intro b
intro hab
intro hba
cases hab
cases hba
specialize zero_or_succ a
cases zero_or_succ
rewrite zero_or_succ_left
rewrite zero_or_succ_left at hab_witness
specialize mul_zero_left x
rewrite mul_zero_left at hab_witness
symm
exact hab_witness
cases zero_or_succ_right
have ha : ~(a = 0)
intro ha0
rewrite zero_or_succ_right_witness at ha0
apply PA1
exact ha0
have hcycle : a = a * (x * x1)
trans b * x1
exact hba_witness
trans (a * x) * x1
congr
exact hab_witness
refl
apply mul_assoc
specialize mul_left_cancel_nonzero a
specialize mul_left_cancel_nonzero 1
specialize mul_left_cancel_nonzero (x * x1)
have hunit : 1 = x * x1
apply mul_left_cancel_nonzero
exact ha
specialize mul_one a
trans a
apply mul_one
exact hcycle
specialize mul_eq_one_components x
specialize mul_eq_one_components x1
have hparts : x = 1 /\ x1 = 1
apply mul_eq_one_components
symm
exact hunit
cases hparts
symm
trans a * x
exact hab_witness
rewrite hparts_left
apply mul_one
qed
- Occurrences
- 646
- Distinct objects
- 527
- Reused references
- 35
- Depth
- 33
- Cuts
- 19
- Certificate SHA-256
2b8e9547aaac…
factor_differenceA common-factor difference retains the factor
Divisibility
checked
A common-factor difference is itself a multiple of that factor.
Exact expanded PA statement
forall c u v r. c * u = c * v + r -> exists w. r = c * w
Complete replay recipe: dependency imports + authored proof
pa prove forall c u v r. c * u = c * v + r -> exists w. r = c * w
use zero_add
use add_eq_zero_right
use add_right_cancel
use add_assoc
use add_comm
intro c
induction u
intro v
intro r
intro h
rewrite PA5 at h
have hr : r = 0
apply add_eq_zero_right
symm
exact h
exists 0
rewrite hr
rewrite PA5
refl
intro v
induction v
intro r
intro h
exists S u
rewrite PA5 at h
specialize zero_add r
rewrite zero_add at h
symm
exact h
intro r
intro h
have hred : c * u = c * v + r
specialize add_right_cancel (c * u)
specialize add_right_cancel (c * v + r)
specialize add_right_cancel c
apply add_right_cancel
rewrite PA6 at h
rewrite PA6 at h
trans (c * v + c) + r
exact h
trans c * v + (c + r)
apply add_assoc
trans c * v + (r + c)
congr
refl
apply add_comm
symm
apply add_assoc
specialize IH v
specialize IH r
apply IH
exact hred
qed
- Occurrences
- 265
- Distinct objects
- 237
- Reused references
- 12
- Depth
- 26
- Cuts
- 7
- Certificate SHA-256
c26302d91bcb…
divides_remainderA common divisor divides a Euclidean remainder
Divisibility
checked
A common divisor of a dividend and divisor also divides the remainder.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use mul_assoc
use factor_difference
intro c
intro a
intro b
intro q
intro r
intro ha
intro hb
intro h
cases ha
cases hb
specialize factor_difference c
specialize factor_difference x
specialize factor_difference (x1 * q)
specialize factor_difference r
apply factor_difference
trans a
symm
exact ha_witness
trans b * q + r
exact h
congr
rewrite hb_witness
apply mul_assoc
refl
qed
- Occurrences
- 427
- Distinct objects
- 357
- Reused references
- 22
- Depth
- 29
- Cuts
- 11
- Certificate SHA-256
2bd033084870…
divides_linear_stepA common divisor divides a Euclidean linear step
Divisibility
checked
A common divisor of a divisor and remainder divides their Euclidean linear step.
Exact expanded PA statement
forall c b q r. (exists u. b = c * u) -> (exists v. r = c * v) -> exists w. b * q + r = c * w
Complete replay recipe: dependency imports + authored proof
pa prove forall c b q r. (exists u. b = c * u) -> (exists v. r = c * v) -> exists w. b * q + r = c * w
use mul_assoc
use mul_add
intro c
intro b
intro q
intro r
intro hb
intro hr
cases hb
cases hr
exists x * q + x1
rewrite hb_witness
rewrite hr_witness
trans c * (x * q) + c * x1
congr
apply mul_assoc
refl
symm
apply mul_add
qed
- Occurrences
- 224
- Distinct objects
- 135
- Reused references
- 13
- Depth
- 19
- Cuts
- 5
- Certificate SHA-256
faf479e85693…
not_multiple_pointwiseA nonmultiple differs from every candidate multiple
Divisibility
checked
Turn a negated existential multiple into pointwise inequalities.
Exact expanded PA statement
forall a n. ~(exists q. n = a * q) -> forall q. ~(n = a * q)
Complete replay recipe: dependency imports + authored proof
pa prove forall a n. ~(exists q. n = a * q) -> forall q. ~(n = a * q)
intro a
intro n
intro h
intro q
intro hq
apply h
exists q
exact hq
qed
- Occurrences
- 9
- Distinct objects
- 9
- Reused references
- 0
- Depth
- 8
- Cuts
- 0
- Certificate SHA-256
fd88abf61d9c…
not_multiple_from_pointwisePointwise inequality excludes every multiple witness
Divisibility
checked
Reconstruct a negated existential from pointwise inequalities.
Exact expanded PA statement
forall a n. (forall q. ~(n = a * q)) -> ~(exists q. n = a * q)
Complete replay recipe: dependency imports + authored proof
pa prove forall a n. (forall q. ~(n = a * q)) -> ~(exists q. n = a * q)
intro a
intro n
intro h
intro hex
cases hex
specialize h x
apply h
exact hex_witness
qed
- Occurrences
- 13
- Distinct objects
- 13
- Reused references
- 0
- Depth
- 9
- Cuts
- 0
- Certificate SHA-256
53691b6629a8…
is_gcd_zero_rightEvery natural is the gcd of itself and zero
GCD, Bézout & coprimality
checked
Every natural is the relational gcd of itself and zero.
Exact expanded PA statement
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)
Complete replay recipe: dependency imports + authored proof
pa prove 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)
use multiple_refl
use multiple_zero
intro a
split
split
specialize multiple_refl a
exact multiple_refl
specialize multiple_zero a
exact multiple_zero
intro c
intro ha
intro hz
exact ha
qed
- Occurrences
- 65
- Distinct objects
- 65
- Reused references
- 0
- Depth
- 11
- Cuts
- 4
- Certificate SHA-256
1d964354c1b3…
is_gcd_symmThe relational gcd specification is symmetric
GCD, Bézout & coprimality
checked
The expanded relational greatest-common-divisor specification is symmetric.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
intro g
intro a
intro b
intro h
cases h
cases h_left
split
split
exact h_left_right
exact h_left_left
intro c
intro hb
intro ha
specialize h_right c
apply h_right
exact ha
exact hb
qed
- Occurrences
- 36
- Distinct objects
- 36
- Reused references
- 0
- Depth
- 21
- Cuts
- 0
- Certificate SHA-256
bf63a0e526c3…
is_gcd_dvd_leftA relational gcd divides the left input
GCD, Bézout & coprimality
checked
A relational greatest common divisor divides its left input.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
intro g
intro a
intro b
intro h
cases h
cases h_left
exact h_left_left
qed
- Occurrences
- 21
- Distinct objects
- 21
- Reused references
- 0
- Depth
- 13
- Cuts
- 0
- Certificate SHA-256
848a8df1aab9…
is_gcd_dvd_rightA relational gcd divides the right input
GCD, Bézout & coprimality
checked
A relational greatest common divisor divides its right input.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
intro g
intro a
intro b
intro h
cases h
cases h_left
exact h_left_right
qed
- Occurrences
- 21
- Distinct objects
- 21
- Reused references
- 0
- Depth
- 13
- Cuts
- 0
- Certificate SHA-256
bdbcd5dadc77…
is_gcd_greatestEvery common divisor divides a relational gcd
GCD, Bézout & coprimality
checked
Every common divisor of the inputs divides their relational gcd.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
intro g
intro a
intro b
intro c
intro h
intro ha
intro hb
cases h
specialize h_right c
apply h_right
exact ha
exact hb
qed
- Occurrences
- 24
- Distinct objects
- 24
- Reused references
- 0
- Depth
- 16
- Cuts
- 0
- Certificate SHA-256
90f411bbe254…
is_gcd_of_dvdA divisor is the gcd of itself and its multiple
GCD, Bézout & coprimality
checked
If the left input divides the right, the left input is their relational gcd.
Exact expanded PA statement
forall a b. (exists y. b = a * y) -> (((exists x. a = a * x) /\ (exists y. b = a * y)) /\ forall c. (exists u. a = c * u) -> (exists v. b = c * v) -> exists w. a = c * w)
Complete replay recipe: dependency imports + authored proof
pa prove forall a b. (exists y. b = a * y) -> (((exists x. a = a * x) /\ (exists y. b = a * y)) /\ forall c. (exists u. a = c * u) -> (exists v. b = c * v) -> exists w. a = c * w)
use multiple_refl
intro a
intro b
intro hd
split
split
specialize multiple_refl a
exact multiple_refl
exact hd
intro c
intro ha
intro hb
exact ha
qed
- Occurrences
- 55
- Distinct objects
- 55
- Reused references
- 0
- Depth
- 11
- Cuts
- 3
- Certificate SHA-256
3377fa1041e5…
is_gcd_uniqueThe relational greatest common divisor is unique
GCD, Bézout & coprimality
checked
The fully expanded relational greatest common divisor is unique.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use multiple_antisymm
intro g
intro h
intro a
intro b
intro hg
intro hh
cases hg
cases hg_left
cases hh
cases hh_left
specialize hg_right h
have hdg : exists w. g = h * w
apply hg_right
exact hh_left_left
exact hh_left_right
specialize hh_right g
have gdh : exists w. h = g * w
apply hh_right
exact hg_left_left
exact hg_left_right
specialize multiple_antisymm g
specialize multiple_antisymm h
apply multiple_antisymm
exact gdh
exact hdg
qed
- Occurrences
- 680
- Distinct objects
- 561
- Reused references
- 35
- Depth
- 34
- Cuts
- 20
- Certificate SHA-256
f903e7437550…
is_gcd_euclid_forwardEuclidean gcd invariance in the forward direction
GCD, Bézout & coprimality
checked
A relational gcd of divisor and remainder is a gcd of dividend and divisor.
Exact expanded PA statement
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)
Complete replay recipe: dependency imports + authored proof
pa prove 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)
use divides_remainder
use divides_linear_step
intro d
intro a
intro b
intro q
intro r
intro hstep
intro hg
cases hg
cases hg_left
split
split
rewrite hstep
specialize divides_linear_step d
specialize divides_linear_step b
specialize divides_linear_step q
specialize divides_linear_step r
apply divides_linear_step
exact hg_left_left
exact hg_left_right
exact hg_left_left
intro c
intro hca
intro hcb
specialize hg_right c
apply hg_right
exact hcb
specialize divides_remainder c
specialize divides_remainder a
specialize divides_remainder b
specialize divides_remainder q
specialize divides_remainder r
apply divides_remainder
exact hca
exact hcb
exact hstep
qed
- Occurrences
- 741
- Distinct objects
- 478
- Reused references
- 24
- Depth
- 38
- Cuts
- 18
- Certificate SHA-256
3da415ea4ec6…
is_gcd_euclid_backwardEuclidean gcd invariance in the backward direction
GCD, Bézout & coprimality
checked
A relational gcd of dividend and divisor is a gcd of divisor and remainder.
Exact expanded PA statement
forall d a b q r. a = b * q + r -> (((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 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)
Complete replay recipe: dependency imports + authored proof
pa prove forall d a b q r. a = b * q + r -> (((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 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)
use divides_remainder
use divides_linear_step
intro d
intro a
intro b
intro q
intro r
intro hstep
intro hg
cases hg
cases hg_left
split
split
exact hg_left_right
specialize divides_remainder d
specialize divides_remainder a
specialize divides_remainder b
specialize divides_remainder q
specialize divides_remainder r
apply divides_remainder
exact hg_left_left
exact hg_left_right
exact hstep
intro c
intro hcb
intro hcr
specialize hg_right c
apply hg_right
rewrite hstep
specialize divides_linear_step c
specialize divides_linear_step b
specialize divides_linear_step q
specialize divides_linear_step r
apply divides_linear_step
exact hcb
exact hcr
exact hcb
qed
- Occurrences
- 741
- Distinct objects
- 478
- Reused references
- 24
- Depth
- 37
- Cuts
- 18
- Certificate SHA-256
bd24f6b65f7e…
gcd_exists_up_toA greatest common divisor exists below a fixed bound
GCD, Bézout & coprimality
checked
Bounded induction constructs a relational gcd whenever the right input is at most the bound.
Exact expanded PA statement
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)
Complete replay recipe: dependency imports + authored proof
pa prove 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)
use multiple_refl
use le_zero
use le_eq_or_lt
use le_of_succ_le_succ
use division_remainder_exists
use is_gcd_euclid_forward
intro B
induction B
intro b
intro hb
intro a
have hb0 : b = 0
apply le_zero
exact hb
exists a
split
split
specialize multiple_refl a
exact multiple_refl
exists 0
trans 0
exact hb0
symm
apply PA5
intro c
intro hca
intro hcb
exact hca
intro b
intro hb
intro a
specialize le_eq_or_lt b
specialize le_eq_or_lt (S B)
have hsplit : b = S B \/ exists k. k + S b = S B
apply le_eq_or_lt
exact hb
cases hsplit
have hb0 : ~(b = 0)
intro hzero
apply PA1
trans b
symm
exact hsplit_left
exact hzero
have hdiv : exists q r. a = b * q + r /\ exists k. k + S r = b
apply division_remainder_exists
exact hb0
cases hdiv
cases hdiv_witness
cases hdiv_witness_witness
have hrB : exists k. k + x1 = B
apply le_of_succ_le_succ
rewrite hsplit_left at hdiv_witness_witness_right
exact hdiv_witness_witness_right
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)
specialize IH x1
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)
apply IH
exact hrB
specialize hall b
exact hall
cases hsmall
exists x2
specialize is_gcd_euclid_forward x2
specialize is_gcd_euclid_forward a
specialize is_gcd_euclid_forward b
specialize is_gcd_euclid_forward x
specialize is_gcd_euclid_forward x1
apply is_gcd_euclid_forward
exact hdiv_witness_witness_left
exact hsmall_witness
have hbB : exists k. k + b = B
apply le_of_succ_le_succ
exact hsplit_right
specialize IH b
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)
apply IH
exact hbB
specialize hall a
exact hall
qed
- Occurrences
- 1,232
- Distinct objects
- 814
- Reused references
- 47
- Depth
- 44
- Cuts
- 35
- Certificate SHA-256
ef027a9b219f…
gcd_exists_relationalA greatest common divisor exists
GCD, Bézout & coprimality
checked
Every pair of naturals has a relational greatest common divisor.
Exact expanded PA statement
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)
Complete replay recipe: dependency imports + authored proof
pa prove 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)
use le_refl
use gcd_exists_up_to
intro a
intro b
specialize gcd_exists_up_to b
specialize gcd_exists_up_to b
have hbb : exists t. t + b = b
apply le_refl
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)
apply gcd_exists_up_to
exact hbb
specialize hall a
exact hall
qed
- Occurrences
- 1,268
- Distinct objects
- 833
- Reused references
- 48
- Depth
- 46
- Cuts
- 38
- Certificate SHA-256
ee2e36ed07e4…
coprime_symmCoprimality is symmetric
GCD, Bézout & coprimality
checked
Coprimality in its expanded common-divisor form is symmetric.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
intro a
intro b
intro h
intro c
intro hb
intro ha
specialize h c
apply h
exact ha
exact hb
qed
- Occurrences
- 15
- Distinct objects
- 15
- Reused references
- 0
- Depth
- 11
- Cuts
- 0
- Certificate SHA-256
3f127d01f834…
coprime_one_rightEvery natural number is coprime to one
GCD, Bézout & coprimality
checked
Every natural is coprime to one in the expanded common-divisor relation.
Exact expanded PA statement
forall a d. (exists x. a = d * x) -> (exists y. 1 = d * y) -> d = 1
Complete replay recipe: dependency imports + authored proof
pa prove forall a d. (exists x. a = d * x) -> (exists y. 1 = d * y) -> d = 1
use divisor_one
intro a
intro d
intro ha
intro h1
specialize divisor_one d
apply divisor_one
exact h1
qed
- Occurrences
- 200
- Distinct objects
- 188
- Reused references
- 12
- Depth
- 29
- Cuts
- 5
- Certificate SHA-256
904cdc493146…
coprime_one_leftOne is coprime to every natural number
GCD, Bézout & coprimality
checked
One is coprime to every natural in the expanded common-divisor relation.
Exact expanded PA statement
forall a d. (exists x. 1 = d * x) -> (exists y. a = d * y) -> d = 1
Complete replay recipe: dependency imports + authored proof
pa prove forall a d. (exists x. 1 = d * x) -> (exists y. a = d * y) -> d = 1
use divisor_one
intro a
intro d
intro h1
intro ha
specialize divisor_one d
apply divisor_one
exact h1
qed
- Occurrences
- 200
- Distinct objects
- 188
- Reused references
- 12
- Depth
- 29
- Cuts
- 5
- Certificate SHA-256
6bb2edf69b5e…
coprime_to_is_gcd_oneCoprimality constructs a relational gcd equal to one
GCD, Bézout & coprimality
checked
Expanded coprimality constructs the relational gcd witness one.
Exact expanded PA statement
forall a b. (forall d. (exists x. a = d * x) -> (exists y. b = d * y) -> d = 1) -> (((exists x. a = 1 * x) /\ (exists y. b = 1 * y)) /\ forall c. (exists u. a = c * u) -> (exists v. b = c * v) -> exists w. 1 = c * w)
Complete replay recipe: dependency imports + authored proof
pa prove forall a b. (forall d. (exists x. a = d * x) -> (exists y. b = d * y) -> d = 1) -> (((exists x. a = 1 * x) /\ (exists y. b = 1 * y)) /\ forall c. (exists u. a = c * u) -> (exists v. b = c * v) -> exists w. 1 = c * w)
use one_multiple
use one_mul
use mul_one
intro a
intro b
intro h
split
split
specialize one_multiple a
exact one_multiple
exists b
symm
apply one_mul
intro c
intro ha
intro hb
specialize h c
have hc : c = 1
apply h
exact ha
exact hb
exists 1
rewrite hc
symm
apply mul_one
qed
- Occurrences
- 120
- Distinct objects
- 90
- Reused references
- 5
- Depth
- 17
- Cuts
- 5
- Certificate SHA-256
530efb1368fb…
is_gcd_one_to_coprimeA relational gcd equal to one implies coprimality
GCD, Bézout & coprimality
checked
A relational gcd witness one implies expanded coprimality.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use divisor_one
intro a
intro b
intro hg
intro c
intro ha
intro hb
cases hg
specialize hg_right c
have hd : exists w. 1 = c * w
apply hg_right
exact ha
exact hb
specialize divisor_one c
apply divisor_one
exact hd
qed
- Occurrences
- 205
- Distinct objects
- 193
- Reused references
- 12
- Depth
- 29
- Cuts
- 5
- Certificate SHA-256
5f7782d1cc3c…
add_permute_outerThe outer terms of two additive pairs may be permuted
Addition
checked
Permute the outer entries of two additive pairs.
Exact expanded PA statement
forall a b c d. (a + b) + (c + d) = (c + b) + (a + d)
Complete replay recipe: dependency imports + authored proof
pa prove forall a b c d. (a + b) + (c + d) = (c + b) + (a + d)
use add_assoc
use add_comm
intro a
intro b
intro c
intro d
trans a + (b + (c + d))
apply add_assoc
trans a + ((b + c) + d)
congr
refl
symm
apply add_assoc
trans a + ((c + b) + d)
congr
refl
congr
apply add_comm
refl
trans (a + (c + b)) + d
symm
apply add_assoc
trans ((c + b) + a) + d
congr
apply add_comm
refl
apply add_assoc
qed
- Occurrences
- 149
- Distinct objects
- 138
- Reused references
- 11
- Depth
- 15
- Cuts
- 4
- Certificate SHA-256
897b1a1c5b72…
balanced_bezout_euclid_stepBalanced Bézout coefficients cross one Euclidean step
GCD, Bézout & coprimality
checked
Transport balanced natural Bezout coefficients across one Euclidean division step.
Exact expanded PA statement
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))
Complete replay recipe: dependency imports + authored proof
pa prove 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))
use add_assoc
use add_comm
use mul_add
use mul_assoc
use add_mul
use add_permute_outer
intro a
intro b
intro q
intro r
intro d
intro xp
intro yp
intro xn
intro yn
intro hab
intro hbez
rewrite hab
trans ((b * q) * yp + r * yp) + b * (xp + q * yn)
congr
apply add_mul
refl
trans ((b * q) * yp + r * yp) + (b * xp + b * (q * yn))
congr
refl
apply mul_add
trans ((b * q) * yp + r * yp) + (b * xp + (b * q) * yn)
congr
refl
congr
refl
symm
apply mul_assoc
trans (b * xp + r * yp) + ((b * q) * yp + (b * q) * yn)
apply add_permute_outer
trans (b * xp + r * yp) + ((b * q) * yn + (b * q) * yp)
congr
refl
apply add_comm
trans (d + (b * xn + r * yn)) + ((b * q) * yn + (b * q) * yp)
congr
exact hbez
refl
trans d + ((b * xn + r * yn) + ((b * q) * yn + (b * q) * yp))
apply add_assoc
trans d + (((b * q) * yn + r * yn) + (b * xn + (b * q) * yp))
congr
refl
apply add_permute_outer
trans d + ((b * q + r) * yn + (b * xn + (b * q) * yp))
congr
refl
congr
symm
apply add_mul
refl
trans d + ((b * q + r) * yn + (b * xn + b * (q * yp)))
congr
refl
congr
refl
congr
refl
apply mul_assoc
congr
refl
congr
congr
symm
exact hab
refl
symm
apply mul_add
qed
- Occurrences
- 880
- Distinct objects
- 446
- Reused references
- 42
- Depth
- 35
- Cuts
- 24
- Certificate SHA-256
feae8ba0dfcb…
gcd_balanced_bezout_exists_up_toA gcd with balanced Bézout witnesses exists below a bound
GCD, Bézout & coprimality
checked
Bounded Euclidean descent simultaneously constructs a relational gcd and balanced natural Bezout witnesses.
Exact expanded PA statement
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))
Complete replay recipe: dependency imports + authored proof
pa prove 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))
use zero_add
use le_zero
use le_eq_or_lt
use le_of_succ_le_succ
use division_remainder_exists
use is_gcd_zero_right
use is_gcd_euclid_forward
use balanced_bezout_euclid_step
intro B
induction B
intro b
intro hb
intro a
have hb0 : b = 0
apply le_zero
exact hb
exists a
split
rewrite hb0
rewrite hb0
specialize is_gcd_zero_right a
exact is_gcd_zero_right
exists 1
exists 0
exists 0
exists 0
rewrite hb0
simp [zero_add]
intro b
intro hb
intro a
specialize le_eq_or_lt b
specialize le_eq_or_lt (S B)
have hsplit : b = S B \/ exists k. k + S b = S B
apply le_eq_or_lt
exact hb
cases hsplit
have hb0 : ~(b = 0)
intro hzero
apply PA1
trans b
symm
exact hsplit_left
exact hzero
have hdiv : exists q r. a = b * q + r /\ exists k. k + S r = b
apply division_remainder_exists
exact hb0
cases hdiv
cases hdiv_witness
cases hdiv_witness_witness
have hrB : exists k. k + x1 = B
apply le_of_succ_le_succ
rewrite hsplit_left at hdiv_witness_witness_right
exact hdiv_witness_witness_right
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))
specialize IH x1
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))
apply IH
exact hrB
specialize hall b
exact hall
cases hsmall
cases hsmall_witness
cases hsmall_witness_right
cases hsmall_witness_right_witness
cases hsmall_witness_right_witness_witness
cases hsmall_witness_right_witness_witness_witness
exists x2
split
apply is_gcd_euclid_forward
exact hdiv_witness_witness_left
exact hsmall_witness_left
exists x4
exists x3 + x * x6
exists x6
exists x5 + x * x4
apply balanced_bezout_euclid_step
exact hdiv_witness_witness_left
exact hsmall_witness_right_witness_witness_witness_witness
have hbB : exists k. k + b = B
apply le_of_succ_le_succ
exact hsplit_right
specialize IH b
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))
apply IH
exact hbB
specialize hall a
exact hall
qed
- Occurrences
- 2,233
- Distinct objects
- 1,187
- Reused references
- 80
- Depth
- 45
- Cuts
- 63
- Certificate SHA-256
2e611f8aee45…
gcd_balanced_bezout_existsA gcd has balanced natural Bézout coefficients
GCD, Bézout & coprimality
checked
Every pair has a relational gcd together with balanced natural Bezout witnesses.
Exact expanded PA statement
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))
Complete replay recipe: dependency imports + authored proof
pa prove 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))
use le_refl
use gcd_balanced_bezout_exists_up_to
intro a
intro b
specialize gcd_balanced_bezout_exists_up_to b
specialize gcd_balanced_bezout_exists_up_to b
have hbb : exists t. t + b = b
apply le_refl
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))
apply gcd_balanced_bezout_exists_up_to
exact hbb
specialize hall a
exact hall
qed
- Occurrences
- 2,269
- Distinct objects
- 1,206
- Reused references
- 81
- Depth
- 47
- Cuts
- 66
- Certificate SHA-256
0c34da8ea071…
balanced_combination_scale_rightA balanced combination may be scaled on the right
GCD, Bézout & coprimality
checked
Scale a balanced natural combination on the right.
Exact expanded PA statement
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)
Complete replay recipe: dependency imports + authored proof
pa prove 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)
use mul_assoc
use mul_comm
use add_mul
intro a
intro b
intro d
intro xp
intro yp
intro xn
intro yn
intro z
intro h
trans (a * xp) * z + (b * z) * yp
congr
symm
apply mul_assoc
refl
trans (a * xp) * z + (b * yp) * z
congr
refl
trans b * (z * yp)
apply mul_assoc
trans b * (yp * z)
congr
refl
apply mul_comm
symm
apply mul_assoc
trans (a * xp + b * yp) * z
symm
apply add_mul
trans (d + (a * xn + b * yn)) * z
congr
exact h
refl
trans d * z + (a * xn + b * yn) * z
apply add_mul
trans d * z + ((a * xn) * z + (b * yn) * z)
congr
refl
apply add_mul
trans d * z + (a * (xn * z) + (b * yn) * z)
congr
refl
congr
apply mul_assoc
refl
congr
refl
congr
refl
trans b * (yn * z)
apply mul_assoc
trans b * (z * yn)
congr
refl
apply mul_comm
symm
apply mul_assoc
qed
- Occurrences
- 754
- Distinct objects
- 387
- Reused references
- 38
- Depth
- 28
- Cuts
- 20
- Certificate SHA-256
dfb696fa22b5…
common_divisor_divides_balanced_resultA common divisor divides a balanced-combination result
GCD, Bézout & coprimality
checked
Every common divisor of two inputs divides the result of a balanced natural combination.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use mul_assoc
use mul_add
use add_comm
use factor_difference
intro c
intro a
intro b
intro d
intro xp
intro yp
intro xn
intro yn
intro ha
intro hb
intro h
cases ha
cases hb
specialize factor_difference c
specialize factor_difference (x * xp + x1 * yp)
specialize factor_difference (x * xn + x1 * yn)
specialize factor_difference d
apply factor_difference
trans c * (x * xp) + c * (x1 * yp)
apply mul_add
trans (c * x) * xp + (c * x1) * yp
congr
symm
apply mul_assoc
symm
apply mul_assoc
trans a * xp + b * yp
rewrite ha_witness
rewrite hb_witness
refl
trans d + (a * xn + b * yn)
exact h
trans (a * xn + b * yn) + d
apply add_comm
trans ((c * x) * xn + (c * x1) * yn) + d
rewrite ha_witness
rewrite hb_witness
refl
trans (c * (x * xn) + c * (x1 * yn)) + d
congr
congr
apply mul_assoc
apply mul_assoc
refl
congr
symm
apply mul_add
refl
qed
- Occurrences
- 626
- Distinct objects
- 406
- Reused references
- 24
- Depth
- 39
- Cuts
- 16
- Certificate SHA-256
b8a6860c9469…
coprime_balanced_bezoutCoprime inputs have a balanced Bézout identity
GCD, Bézout & coprimality
checked
Coprime inputs admit balanced natural Bezout coefficients with result one.
Exact expanded PA statement
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)
Complete replay recipe: dependency imports + authored proof
pa prove 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)
use gcd_balanced_bezout_exists
intro a
intro b
intro hcop
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))
apply gcd_balanced_bezout_exists
cases hgb
cases hgb_witness
cases hgb_witness_left
cases hgb_witness_left_left
have hd : x = 1
specialize hcop x
apply hcop
exact hgb_witness_left_left_left
exact hgb_witness_left_left_right
cases hgb_witness_right
cases hgb_witness_right_witness
cases hgb_witness_right_witness_witness
cases hgb_witness_right_witness_witness_witness
exists x1
exists x2
exists x3
exists x4
rewrite hd at hgb_witness_right_witness_witness_witness_witness
exact hgb_witness_right_witness_witness_witness_witness
qed
- Occurrences
- 2,304
- Distinct objects
- 1,241
- Reused references
- 81
- Depth
- 48
- Cuts
- 67
- Certificate SHA-256
342339e0e63d…
gauss_coprime_cancelGauss cancellation for coprime factors
GCD, Bézout & coprimality
checked
Cancel a coprime factor from a divisibility witness (Gauss cancellation).
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use multiple_refl
use one_mul
use coprime_balanced_bezout
use balanced_combination_scale_right
use common_divisor_divides_balanced_result
intro a
intro b
intro z
intro hcop
intro hdiv
have hbez : exists xp yp xn yn. a * xp + b * yp = 1 + (a * xn + b * yn)
apply coprime_balanced_bezout
exact hcop
cases hbez
cases hbez_witness
cases hbez_witness_witness
cases hbez_witness_witness_witness
have hscaled : a * (x * z) + (b * z) * x1 = 1 * z + (a * (x2 * z) + (b * z) * x3)
apply balanced_combination_scale_right
exact hbez_witness_witness_witness_witness
specialize one_mul z
rewrite one_mul at hscaled
specialize common_divisor_divides_balanced_result a
specialize common_divisor_divides_balanced_result a
specialize common_divisor_divides_balanced_result (b * z)
specialize common_divisor_divides_balanced_result z
specialize common_divisor_divides_balanced_result (x * z)
specialize common_divisor_divides_balanced_result x1
specialize common_divisor_divides_balanced_result (x2 * z)
specialize common_divisor_divides_balanced_result x3
apply common_divisor_divides_balanced_result
specialize multiple_refl a
exact multiple_refl
exact hdiv
exact hscaled
qed
- Occurrences
- 3,800
- Distinct objects
- 1,499
- Reused references
- 93
- Depth
- 51
- Cuts
- 110
- Certificate SHA-256
763e42141ac2…
eq_decidableEquality of naturals is decidable
Equality
checked
Equality of natural numbers is constructively decidable.
multiple_decidable_nonzero multiple_decidable factor_search_up_to prime_decidable prime_factorization_exists_up_to mod_eq_decidable_from_remainders beta_prefix_swap_last_reflect finite_swap_last_bounded finite_contains_decidable beta_prefix_replace_reflect gcd_lcm_compatible_exists generalized_binary_crt_sufficient generalized_binary_crt_canonical_boundary mod_eq_decidableExact expanded PA statement
forall a b. a = b \/ ~(a = b)
Complete replay recipe: dependency imports + authored proof
pa prove forall a b. a = b \/ ~(a = b)
intro a
induction a
intro b
induction b
left
refl
right
intro h
apply PA1
symm
exact h
intro b
induction b
right
intro h
apply PA1
exact h
specialize IH b
cases IH
left
congr
exact IH_left
right
intro h
apply IH_right
apply PA2
exact h
qed
- Occurrences
- 48
- Distinct objects
- 48
- Reused references
- 0
- Depth
- 20
- Cuts
- 0
- Certificate SHA-256
d89ef3447e28…
multiple_decidable_nonzeroDivisibility by a nonzero natural is decidable
Divisibility
checked
Divisibility by a nonzero natural is constructively decidable.
Exact expanded PA statement
forall d n. ~(d = 0) -> (exists q. n = d * q) \/ ~(exists q. n = d * q)
Complete replay recipe: dependency imports + authored proof
pa prove forall d n. ~(d = 0) -> (exists q. n = d * q) \/ ~(exists q. n = d * q)
use eq_decidable
use division_remainder_exists
use multiple_has_zero_remainder
use division_remainder_unique
intro d
intro n
intro hd
have hdiv : exists q r. n = d * q + r /\ S r <= d
apply division_remainder_exists
exact hd
cases hdiv
cases hdiv_witness
cases hdiv_witness_witness
specialize eq_decidable x1
specialize eq_decidable 0
have hr : x1 = 0 \/ ~(x1 = 0)
apply eq_decidable
cases hr
left
exists x
rewrite hr_left at hdiv_witness_witness_left
rewrite PA3 at hdiv_witness_witness_left
exact hdiv_witness_witness_left
right
intro hmul
have hzero : exists q r. ((n = d * q + r /\ r = 0) /\ S r <= d)
apply multiple_has_zero_remainder
exact hd
exact hmul
cases hzero
cases hzero_witness
cases hzero_witness_witness
cases hzero_witness_witness_left
have huniq : x = x2 /\ x1 = x3
apply division_remainder_unique
exact hdiv_witness_witness_left
exact hdiv_witness_witness_right
exact hzero_witness_witness_left_left
exact hzero_witness_witness_right
cases huniq
apply hr_right
trans x3
exact huniq_right
exact hzero_witness_witness_left_right
qed
- Occurrences
- 1,242
- Distinct objects
- 848
- Reused references
- 43
- Depth
- 61
- Cuts
- 32
- Certificate SHA-256
e472d09fa365…
multiple_decidableDivisibility of naturals is decidable
Divisibility
checked
Divisibility of natural numbers is constructively decidable, including the zero divisor case.
Exact expanded PA statement
forall d n. (exists q. n = d * q) \/ ~(exists q. n = d * q)
Complete replay recipe: dependency imports + authored proof
pa prove forall d n. (exists q. n = d * q) \/ ~(exists q. n = d * q)
use mul_zero_left
use eq_decidable
use multiple_decidable_nonzero
intro d
intro n
specialize eq_decidable d
specialize eq_decidable 0
have hd : d = 0 \/ ~(d = 0)
apply eq_decidable
cases hd
specialize eq_decidable_before n
specialize eq_decidable_before 0
have hn : n = 0 \/ ~(n = 0)
apply eq_decidable_before
cases hn
left
exists 0
trans 0
exact hn_left
symm
rewrite hd_left
apply mul_zero_left
right
intro hmultiple
cases hmultiple
apply hn_right
trans d * x
exact hmultiple_witness
rewrite hd_left
apply mul_zero_left
apply multiple_decidable_nonzero
exact hd_right
qed
- Occurrences
- 1,352
- Distinct objects
- 907
- Reused references
- 47
- Depth
- 64
- Cuts
- 35
- Certificate SHA-256
27aa9616c05f…
factor_property_succA bounded factor property extends across one boundary
Primes
checked
Extend a bounded prime factor-pair property by checking the new boundary.
Exact expanded PA statement
forall B n. (forall c d. (exists k. k + c = B) -> n = c * d -> c = 1 \/ d = 1) -> (forall d. n = S B * d -> S B = 1 \/ d = 1) -> forall c d. (exists k. k + c = S B) -> n = c * d -> c = 1 \/ d = 1
Complete replay recipe: dependency imports + authored proof
pa prove forall B n. (forall c d. (exists k. k + c = B) -> n = c * d -> c = 1 \/ d = 1) -> (forall d. n = S B * d -> S B = 1 \/ d = 1) -> forall c d. (exists k. k + c = S B) -> n = c * d -> c = 1 \/ d = 1
use le_eq_or_lt
use le_of_succ_le_succ
intro B
intro n
intro hprev
intro hboundary
intro c
intro d
intro hc
intro hfac
specialize le_eq_or_lt c
specialize le_eq_or_lt (S B)
have hsplit : c = S B \/ exists k. k + S c = S B
apply le_eq_or_lt
exact hc
cases hsplit
rewrite hsplit_left
specialize hboundary d
apply hboundary
rewrite <- hsplit_left
exact hfac
have hcB : exists k. k + c = B
apply le_of_succ_le_succ
exact hsplit_right
specialize hprev c
specialize hprev d
apply hprev
exact hcB
exact hfac
qed
- Occurrences
- 150
- Distinct objects
- 146
- Reused references
- 4
- Depth
- 20
- Cuts
- 5
- Certificate SHA-256
0d6bbb6b6480…
factor_search_up_toBounded nontrivial factor search
Primes
checked
Constructively decide whether a nonzero natural has a bounded nontrivial factor pair.
Exact expanded PA statement
forall B n. ~(n = 0) -> ((forall c d. (exists k. k + c = B) -> n = c * d -> c = 1 \/ d = 1) \/ exists c d. ((((exists k. k + c = B) /\ ~(c = 1)) /\ ~(d = 1)) /\ n = c * d))
Complete replay recipe: dependency imports + authored proof
pa prove forall B n. ~(n = 0) -> ((forall c d. (exists k. k + c = B) -> n = c * d -> c = 1 \/ d = 1) \/ exists c d. ((((exists k. k + c = B) /\ ~(c = 1)) /\ ~(d = 1)) /\ n = c * d))
use mul_zero_left
use succ_ne_zero
use le_zero
use le_refl
use le_succ
use mul_left_cancel_nonzero
use eq_decidable
use multiple_decidable_nonzero
use factor_property_succ
intro B
induction B
intro n
intro hn
left
intro c
intro d
intro hc
intro hfac
have hc0 : c = 0
apply le_zero
exact hc
exfalso
apply hn
trans c * d
exact hfac
rewrite hc0
apply mul_zero_left
intro n
intro hn
specialize IH n
have hprev : (forall c d. (exists k. k + c = B) -> n = c * d -> c = 1 \/ d = 1) \/ exists c d. ((((exists k. k + c = B) /\ ~(c = 1)) /\ ~(d = 1)) /\ n = c * d)
apply IH
exact hn
cases hprev
have hs0 : ~(S B = 0)
specialize succ_ne_zero B
exact succ_ne_zero
specialize multiple_decidable_nonzero (S B)
specialize multiple_decidable_nonzero n
have hdiv : (exists q. n = S B * q) \/ ~(exists q. n = S B * q)
apply multiple_decidable_nonzero
exact hs0
cases hdiv
cases hdiv_left
specialize eq_decidable (S B)
specialize eq_decidable 1
have hc1 : S B = 1 \/ ~(S B = 1)
apply eq_decidable
cases hc1
left
apply factor_property_succ
exact hprev_left
intro d
intro hboundary
left
exact hc1_left
specialize eq_decidable_before x
specialize eq_decidable_before 1
have hq1 : x = 1 \/ ~(x = 1)
apply eq_decidable_before
cases hq1
left
apply factor_property_succ
exact hprev_left
intro d
intro hboundary
right
trans x
apply mul_left_cancel_nonzero
exact hs0
trans n
symm
exact hboundary
exact hdiv_left_witness
exact hq1_left
right
exists S B
exists x
split
split
split
apply le_refl
exact hc1_right
exact hq1_right
exact hdiv_left_witness
left
apply factor_property_succ
exact hprev_left
intro d
intro hboundary
exfalso
apply hdiv_right
exists d
exact hboundary
right
cases hprev_right
cases hprev_right_witness
cases hprev_right_witness_witness
cases hprev_right_witness_witness_left
cases hprev_right_witness_witness_left_left
exists x
exists x1
split
split
split
apply le_succ
exact hprev_right_witness_witness_left_left_left
exact hprev_right_witness_witness_left_left_right
exact hprev_right_witness_witness_left_right
exact hprev_right_witness_witness_right
qed
- Occurrences
- 1,925
- Distinct objects
- 1,276
- Reused references
- 56
- Depth
- 69
- Cuts
- 56
- Certificate SHA-256
b678af35c4db…
prime_or_compositeEvery nontrivial natural is prime or composite
Primes
checked
Every nonzero nonunit natural is constructively prime or has a nontrivial factor pair.
Exact expanded PA statement
forall n. ~(n = 0) -> ~(n = 1) -> ((~(n = 1) /\ forall a b. n = a * b -> a = 1 \/ b = 1) \/ exists c d. ((~(c = 1) /\ ~(d = 1)) /\ n = c * d))
Complete replay recipe: dependency imports + authored proof
pa prove forall n. ~(n = 0) -> ~(n = 1) -> ((~(n = 1) /\ forall a b. n = a * b -> a = 1 \/ b = 1) \/ exists c d. ((~(c = 1) /\ ~(d = 1)) /\ n = c * d))
use divisor_le_nonzero
use factor_search_up_to
intro n
intro hn0
intro hn1
specialize factor_search_up_to n
specialize factor_search_up_to n
have hsearch : (forall c d. (exists k. k + c = n) -> n = c * d -> c = 1 \/ d = 1) \/ exists c d. ((((exists k. k + c = n) /\ ~(c = 1)) /\ ~(d = 1)) /\ n = c * d)
apply factor_search_up_to
exact hn0
cases hsearch
left
split
exact hn1
intro c
intro d
intro hfac
specialize hsearch_left c
specialize hsearch_left d
apply hsearch_left
specialize divisor_le_nonzero c
specialize divisor_le_nonzero n
apply divisor_le_nonzero
exact hn0
exists d
exact hfac
exact hfac
right
cases hsearch_right
cases hsearch_right_witness
cases hsearch_right_witness_witness
cases hsearch_right_witness_witness_left
cases hsearch_right_witness_witness_left_left
exists x
exists x1
split
split
exact hsearch_right_witness_witness_left_left_right
exact hsearch_right_witness_witness_left_right
exact hsearch_right_witness_witness_right
qed
- Occurrences
- 2,038
- Distinct objects
- 1,385
- Reused references
- 60
- Depth
- 71
- Cuts
- 59
- Certificate SHA-256
4f3834b266fc…
prime_nonzeroEvery prime natural is nonzero
Primes
checked
Every prime natural is nonzero.
Exact expanded PA statement
forall p. (~(p = 1) /\ forall a b. p = a * b -> a = 1 \/ b = 1) -> ~(p = 0)
Complete replay recipe: dependency imports + authored proof
pa prove forall p. (~(p = 1) /\ forall a b. p = a * b -> a = 1 \/ b = 1) -> ~(p = 0)
use mul_zero_left
use succ_ne_zero
intro p
intro hp
intro hp0
cases hp
specialize hp_right 0
specialize hp_right 0
have hunit : 0 = 1 \/ 0 = 1
apply hp_right
rewrite hp0
symm
apply mul_zero_left
cases hunit
specialize succ_ne_zero 0
apply succ_ne_zero
symm
exact hunit_left
specialize succ_ne_zero 0
apply succ_ne_zero
symm
exact hunit_right
qed
- Occurrences
- 49
- Distinct objects
- 49
- Reused references
- 0
- Depth
- 11
- Cuts
- 2
- Certificate SHA-256
28430940e08d…
prime_decidablePrimality of naturals is decidable
Primes
checked
Primality of every natural number is constructively decidable.
Exact expanded PA statement
forall n. ((~(n = 1) /\ forall a b. n = a * b -> a = 1 \/ b = 1) \/ ~((~(n = 1) /\ forall a b. n = a * b -> a = 1 \/ b = 1)))
Complete replay recipe: dependency imports + authored proof
pa prove forall n. ((~(n = 1) /\ forall a b. n = a * b -> a = 1 \/ b = 1) \/ ~((~(n = 1) /\ forall a b. n = a * b -> a = 1 \/ b = 1)))
use eq_decidable
use prime_or_composite
use prime_nonzero
intro n
specialize eq_decidable n
specialize eq_decidable 0
have hn0 : n = 0 \/ ~(n = 0)
apply eq_decidable
cases hn0
right
intro hp
specialize prime_nonzero n
apply prime_nonzero
exact hp
exact hn0_left
specialize eq_decidable_before n
specialize eq_decidable_before 1
have hn1 : n = 1 \/ ~(n = 1)
apply eq_decidable_before
cases hn1
right
intro hp
cases hp
apply hp_left
exact hn1_left
specialize prime_or_composite n
have hkind : ((~(n = 1) /\ forall a b. n = a * b -> a = 1 \/ b = 1) \/ exists c d. ((~(c = 1) /\ ~(d = 1)) /\ n = c * d))
apply prime_or_composite
exact hn0_right
exact hn1_right
cases hkind
left
exact hkind_left
right
intro hp
cases hp
cases hkind_right
cases hkind_right_witness
cases hkind_right_witness_witness
cases hkind_right_witness_witness_left
specialize hp_right x
specialize hp_right x1
have hunit : x = 1 \/ x1 = 1
apply hp_right
exact hkind_right_witness_witness_right
cases hunit
apply hkind_right_witness_witness_left_left
exact hunit_left
apply hkind_right_witness_witness_left_right
exact hunit_right
qed
- Occurrences
- 2,194
- Distinct objects
- 1,471
- Reused references
- 63
- Depth
- 73
- Cuts
- 64
- Certificate SHA-256
80a5f7837c8e…
factor_nonzero_leftA left factor of a nonzero product is nonzero
Multiplication
checked
The left factor of a nonzero product is nonzero.
Exact expanded PA statement
forall n c d. ~(n = 0) -> n = c * d -> ~(c = 0)
Complete replay recipe: dependency imports + authored proof
pa prove forall n c d. ~(n = 0) -> n = c * d -> ~(c = 0)
use mul_zero_left
intro n
intro c
intro d
intro hn
intro hfac
intro hc
apply hn
trans c * d
exact hfac
rewrite hc
apply mul_zero_left
qed
- Occurrences
- 37
- Distinct objects
- 37
- Reused references
- 0
- Depth
- 12
- Cuts
- 1
- Certificate SHA-256
623e666aaba6…
proper_factor_ltA proper factor is strictly smaller than its product
Primes
checked
A factor with a nonunit cofactor is strictly smaller than a nonzero product.
Exact expanded PA statement
forall n c d. ~(n = 0) -> n = c * d -> ~(d = 1) -> exists k. k + S c = n
Complete replay recipe: dependency imports + authored proof
pa prove forall n c d. ~(n = 0) -> n = c * d -> ~(d = 1) -> exists k. k + S c = n
use divisor_le_nonzero
use le_eq_or_lt
use mul_left_cancel_nonzero
use mul_one
intro n
intro c
intro d
intro hn
intro hfactor
intro hd
have hle : exists k. k + c = n
specialize divisor_le_nonzero c
specialize divisor_le_nonzero n
apply divisor_le_nonzero
exact hn
exists d
exact hfactor
have hcases : c = n \/ exists k. k + S c = n
specialize le_eq_or_lt c
specialize le_eq_or_lt n
apply le_eq_or_lt
exact hle
cases hcases
exfalso
apply hd
have hc : ~(c = 0)
intro hc0
apply hn
trans c
symm
exact hcases_left
exact hc0
specialize mul_left_cancel_nonzero c
specialize mul_left_cancel_nonzero d
specialize mul_left_cancel_nonzero 1
apply mul_left_cancel_nonzero
exact hc
trans n
symm
exact hfactor
trans c
symm
exact hcases_left
symm
specialize mul_one c
exact mul_one
exact hcases_right
qed
- Occurrences
- 468
- Distinct objects
- 396
- Reused references
- 10
- Depth
- 26
- Cuts
- 16
- Certificate SHA-256
22b2140fa2bd…
prime_divisor_exists_up_toBounded prime-divisor existence
Primes
checked
Bounded strong induction constructs a prime divisor of every nonzero nonunit natural.
Exact expanded PA statement
forall B n. (exists t. t + n = B) -> ~(n = 0) -> ~(n = 1) -> exists p. ((~(p = 1) /\ forall a b. p = a * b -> a = 1 \/ b = 1) /\ exists k. n = p * k)
Complete replay recipe: dependency imports + authored proof
pa prove forall B n. (exists t. t + n = B) -> ~(n = 0) -> ~(n = 1) -> exists p. ((~(p = 1) /\ forall a b. p = a * b -> a = 1 \/ b = 1) /\ exists k. n = p * k)
use mul_zero_left
use le_zero
use lt_of_lt_of_le
use le_of_succ_le_succ
use multiple_refl
use multiple_trans
use prime_or_composite
use proper_factor_lt
intro B
induction B
intro n
intro hnB
intro hn0
intro hn1
exfalso
apply hn0
apply le_zero
exact hnB
intro n
intro hnB
intro hn0
intro hn1
specialize prime_or_composite n
have hpc : (~(n = 1) /\ forall a b. n = a * b -> a = 1 \/ b = 1) \/ exists c d. ((~(c = 1) /\ ~(d = 1)) /\ n = c * d)
apply prime_or_composite
exact hn0
exact hn1
cases hpc
exists n
split
exact hpc_left
apply multiple_refl
cases hpc_right
cases hpc_right_witness
cases hpc_right_witness_witness
cases hpc_right_witness_witness_left
have hc0 : ~(x = 0)
intro hc
apply hn0
trans x * x1
exact hpc_right_witness_witness_right
rewrite hc
apply mul_zero_left
have hcn : exists k. k + S x = n
specialize proper_factor_lt n
specialize proper_factor_lt x
specialize proper_factor_lt x1
apply proper_factor_lt
exact hn0
exact hpc_right_witness_witness_right
exact hpc_right_witness_witness_left_right
have hcSB : exists k. k + S x = S B
specialize lt_of_lt_of_le x
specialize lt_of_lt_of_le n
specialize lt_of_lt_of_le (S B)
apply lt_of_lt_of_le
exact hcn
exact hnB
have hcB : exists k. k + x = B
apply le_of_succ_le_succ
exact hcSB
specialize IH x
have hp : exists p. ((~(p = 1) /\ forall a b. p = a * b -> a = 1 \/ b = 1) /\ exists k. x = p * k)
apply IH
exact hcB
exact hc0
exact hpc_right_witness_witness_left_left
cases hp
cases hp_witness
exists x2
split
exact hp_witness_left
specialize multiple_trans x
specialize multiple_trans x2
specialize multiple_trans n
apply multiple_trans
exists x1
exact hpc_right_witness_witness_right
exact hp_witness_right
qed
- Occurrences
- 2,931
- Distinct objects
- 1,659
- Reused references
- 77
- Depth
- 78
- Cuts
- 91
- Certificate SHA-256
1258bfd21a67…
prime_divisor_existsEvery nontrivial natural has a prime divisor
Primes
checked
Every nonzero nonunit natural has a prime divisor.
Exact expanded PA statement
forall n. ~(n = 0) -> ~(n = 1) -> exists p. ((~(p = 1) /\ forall a b. p = a * b -> a = 1 \/ b = 1) /\ exists k. n = p * k)
Complete replay recipe: dependency imports + authored proof
pa prove forall n. ~(n = 0) -> ~(n = 1) -> exists p. ((~(p = 1) /\ forall a b. p = a * b -> a = 1 \/ b = 1) /\ exists k. n = p * k)
use le_refl
use prime_divisor_exists_up_to
intro n
intro hn0
intro hn1
specialize prime_divisor_exists_up_to n
specialize prime_divisor_exists_up_to n
apply prime_divisor_exists_up_to
apply le_refl
exact hn0
exact hn1
qed
- Occurrences
- 2,977
- Distinct objects
- 1,680
- Reused references
- 78
- Depth
- 80
- Cuts
- 94
- Certificate SHA-256
fab66d905009…
prime_divisor_eq_one_or_selfEvery divisor of a prime is one or the prime
Primes
checked
Every divisor of a prime is one or the prime itself.
Exact expanded PA statement
forall p g. (~(p = 1) /\ forall c d. p = c * d -> c = 1 \/ d = 1) -> (exists x. p = g * x) -> g = 1 \/ p = g
Complete replay recipe: dependency imports + authored proof
pa prove forall p g. (~(p = 1) /\ forall c d. p = c * d -> c = 1 \/ d = 1) -> (exists x. p = g * x) -> g = 1 \/ p = g
use mul_one
intro p
intro g
intro hp
intro hdiv
cases hp
cases hdiv
specialize hp_right g
specialize hp_right x
have hfactor : g = 1 \/ x = 1
apply hp_right
exact hdiv_witness
cases hfactor
left
exact hfactor_left
right
trans g * x
exact hdiv_witness
rewrite hfactor_right
apply mul_one
qed
- Occurrences
- 57
- Distinct objects
- 57
- Reused references
- 0
- Depth
- 12
- Cuts
- 2
- Certificate SHA-256
e7e3017fe0ec…
euclid_prime_dvd_productEuclid's lemma
Primes
checked
A prime dividing a product divides at least one factor (Euclid's lemma).
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use prime_divisor_eq_one_or_self
use gcd_exists_relational
use is_gcd_one_to_coprime
use gauss_coprime_cancel
intro p
intro a
intro b
intro hp
intro hab
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)
apply gcd_exists_relational
cases hg
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)
exact hg_witness
cases hg_witness
cases hg_witness_left
have hfactor : x = 1 \/ p = x
specialize prime_divisor_eq_one_or_self p
specialize prime_divisor_eq_one_or_self x
apply prime_divisor_eq_one_or_self
exact hp
exact hg_witness_left_left
cases hfactor
right
apply gauss_coprime_cancel
have hcop : forall d. (exists u. p = d * u) -> (exists v. a = d * v) -> d = 1
apply is_gcd_one_to_coprime
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)
rewrite <- hfactor_left
rewrite <- hfactor_left
rewrite <- hfactor_left
exact hgfull
exact hg1
exact hcop
exact hab
left
cases hg_witness_left_right
exists x1
rewrite hfactor_right
exact hg_witness_left_right_witness
qed
- Occurrences
- 5,382
- Distinct objects
- 1,806
- Reused references
- 113
- Depth
- 55
- Cuts
- 159
- Certificate SHA-256
8db2385c53a7…
mod_eq_reflBalanced natural congruence is reflexive
Congruence & CRT
checked
Balanced natural congruence is reflexive.
Exact expanded PA statement
forall m a. exists u v. a + m * u = a + m * v
Complete replay recipe: dependency imports + authored proof
pa prove forall m a. exists u v. a + m * u = a + m * v
intro m
intro a
exists 0
exists 0
refl
qed
- Occurrences
- 5
- Distinct objects
- 5
- Reused references
- 0
- Depth
- 5
- Cuts
- 0
- Certificate SHA-256
48a2acf45d57…
mod_eq_symmBalanced natural congruence is symmetric
Congruence & CRT
checked
Balanced natural congruence is symmetric.
mod_eq_decidable_from_remainders quadratic_residue_bounded_equiv mod_eq_cancel_coprime prime_bounded_nonzero_mod_inverse canonical_remainders_characterize_mod_eq bounded_mod_inverse_unique coprime_bounded_mod_inverse crt_solution_pair_congruent crt_common_solution_implies_gcd_compatible mod_eq_common_remainder_decomposition generalized_binary_crt_sufficient_zero_right mod_eq_lcm_merge crt_solution_canonical_remainder_nonzeroExact expanded PA statement
forall m a b. (exists u v. a + m * u = b + m * v) -> exists r s. b + m * r = a + m * s
Complete replay recipe: dependency imports + authored proof
pa prove forall m a b. (exists u v. a + m * u = b + m * v) -> exists r s. b + m * r = a + m * s
intro m
intro a
intro b
intro h
cases h
cases h_witness
exists x1
exists x
symm
exact h_witness_witness
qed
- Occurrences
- 12
- Distinct objects
- 12
- Reused references
- 0
- Depth
- 10
- Cuts
- 0
- Certificate SHA-256
136980f4284d…
mod_eq_transBalanced natural congruence is transitive
Congruence & CRT
checked
Balanced natural congruence is transitive.
mod_eq_mul mod_eq_to_remainder_decomposition binary_crt binary_crt_fold_step mod_eq_decidable_from_remainders quadratic_residue_bounded_equiv coprime_mod_inverse mod_eq_cancel_coprime bounded_square_mod3_classify bounded_square_mod5_classify bounded_square_mod7_classify pow_predecessor_parity_mod prime_bounded_nonzero_mod_inverse canonical_remainders_characterize_mod_eq bounded_mod_inverse_unique coprime_bounded_mod_inverse crt_solution_pair_congruent crt_common_solution_implies_gcd_compatible mod_eq_common_remainder_decomposition crt_solution_class_iff_lcmExact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use add_assoc
use add_comm
use mul_add
intro m
intro a
intro b
intro c
intro hab
intro hbc
cases hab
cases hab_witness
cases hbc
cases hbc_witness
exists x + x2
exists x3 + x1
trans a + (m * x + m * x2)
congr
refl
apply mul_add
trans (a + m * x) + m * x2
symm
apply add_assoc
trans (b + m * x1) + m * x2
congr
exact hab_witness_witness
refl
trans b + (m * x1 + m * x2)
apply add_assoc
trans b + (m * x2 + m * x1)
congr
refl
apply add_comm
trans (b + m * x2) + m * x1
symm
apply add_assoc
trans (c + m * x3) + m * x1
congr
exact hbc_witness_witness
refl
trans c + (m * x3 + m * x1)
apply add_assoc
congr
refl
symm
apply mul_add
qed
- Occurrences
- 252
- Distinct objects
- 204
- Reused references
- 16
- Depth
- 29
- Cuts
- 6
- Certificate SHA-256
052be6f7213b…
mod_eq_addBalanced congruence respects addition
Congruence & CRT
checked
Balanced natural congruence respects addition.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use mul_add
use add_comm
use add_permute_outer
intro m
intro a
intro b
intro c
intro d
intro hab
intro hcd
cases hab
cases hab_witness
cases hcd
cases hcd_witness
exists x2 + x
exists x3 + x1
trans (a + c) + (m * x2 + m * x)
congr
refl
apply mul_add
trans (m * x2 + c) + (a + m * x)
apply add_permute_outer
trans (c + m * x2) + (a + m * x)
congr
apply add_comm
refl
trans (a + m * x) + (c + m * x2)
apply add_comm
trans (b + m * x1) + (d + m * x3)
congr
exact hab_witness_witness
exact hcd_witness_witness
trans (d + m * x3) + (b + m * x1)
apply add_comm
trans (m * x3 + d) + (b + m * x1)
congr
apply add_comm
refl
trans (b + d) + (m * x3 + m * x1)
symm
apply add_permute_outer
congr
refl
symm
apply mul_add
qed
- Occurrences
- 370
- Distinct objects
- 249
- Reused references
- 17
- Depth
- 30
- Cuts
- 10
- Certificate SHA-256
49e4d310fb28…
mod_eq_mul_rightBalanced congruence is stable under right multiplication
Congruence & CRT
checked
Balanced congruence is preserved by multiplication on the right.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use add_mul
use mul_assoc
intro m
intro a
intro b
intro c
intro h
cases h
cases h_witness
exists x * c
exists x1 * c
trans a * c + (m * x) * c
congr
refl
symm
apply mul_assoc
trans (a + m * x) * c
symm
apply add_mul
trans (b + m * x1) * c
congr
exact h_witness_witness
refl
trans b * c + (m * x1) * c
apply add_mul
congr
refl
apply mul_assoc
qed
- Occurrences
- 484
- Distinct objects
- 339
- Reused references
- 37
- Depth
- 26
- Cuts
- 13
- Certificate SHA-256
4994212781f9…
mod_eq_mul_leftBalanced congruence is stable under left multiplication
Congruence & CRT
checked
Balanced congruence is preserved by multiplication on the left.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use mod_eq_mul_right
use mul_comm
intro m
intro a
intro b
intro c
intro h
specialize mod_eq_mul_right m
specialize mod_eq_mul_right a
specialize mod_eq_mul_right b
specialize mod_eq_mul_right c
have hr : exists r s. (a * c) + m * r = (b * c) + m * s
apply mod_eq_mul_right
exact h
cases hr
cases hr_witness
exists x
exists x1
trans a * c + m * x
congr
apply mul_comm
refl
trans b * c + m * x1
exact hr_witness_witness
congr
apply mul_comm
refl
qed
- Occurrences
- 738
- Distinct objects
- 371
- Reused references
- 38
- Depth
- 27
- Cuts
- 21
- Certificate SHA-256
84e29f574f4e…
mod_eq_mulBalanced congruence respects multiplication
Congruence & CRT
checked
Balanced natural congruence respects multiplication.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use mod_eq_mul_right
use mod_eq_mul_left
use mod_eq_trans
intro m
intro a
intro b
intro c
intro d
intro hab
intro hcd
have hacbc : exists r s. (a * c) + m * r = (b * c) + m * s
specialize mod_eq_mul_right m
specialize mod_eq_mul_right a
specialize mod_eq_mul_right b
specialize mod_eq_mul_right c
apply mod_eq_mul_right
exact hab
have hbcbd : exists r s. (b * c) + m * r = (b * d) + m * s
specialize mod_eq_mul_left m
specialize mod_eq_mul_left c
specialize mod_eq_mul_left d
specialize mod_eq_mul_left b
apply mod_eq_mul_left
exact hcd
specialize mod_eq_trans m
specialize mod_eq_trans (a * c)
specialize mod_eq_trans (b * c)
specialize mod_eq_trans (b * d)
apply mod_eq_trans
exact hacbc
exact hbcbd
qed
- Occurrences
- 1,505
- Distinct objects
- 471
- Reused references
- 42
- Depth
- 32
- Cuts
- 43
- Certificate SHA-256
660f19930d52…
remainder_decomposition_to_mod_eqA quotient-remainder decomposition gives congruence
Congruence & CRT
checked
A directed quotient/remainder equation gives balanced congruence to its remainder.
Exact expanded PA statement
forall m b q x. b = q * m + x -> exists u v. b + m * u = x + m * v
Complete replay recipe: dependency imports + authored proof
pa prove forall m b q x. b = q * m + x -> exists u v. b + m * u = x + m * v
use add_comm
use mul_comm
intro m
intro b
intro q
intro x
intro h
exists 0
exists q
rewrite PA5
rewrite PA3
trans q * m + x
exact h
trans x + q * m
apply add_comm
congr
refl
apply mul_comm
qed
- Occurrences
- 323
- Distinct objects
- 228
- Reused references
- 23
- Depth
- 26
- Cuts
- 10
- Certificate SHA-256
acea3f60f7fa…
mod_eq_bounded_uniqueBounded congruent representatives are equal
Congruence & CRT
checked
Two balanced-congruent values below the same modulus are equal.
mod_eq_to_remainder_decomposition mod_eq_decidable_from_remainders bounded_square_mod3_classify bounded_square_mod5_classify bounded_square_mod7_classify beta_half_range_mod_eq_value prime_bounded_nonzero_mod_inverse canonical_remainders_characterize_mod_eq bounded_mod_inverse_unique crt_solution_canonical_remainder_nonzeroExact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use add_comm
use division_remainder_unique
intro m
intro a
intro b
intro ha
intro hb
intro hab
cases hab
cases hab_witness
have hda : a + m * x = m * x + a
apply add_comm
have hdb : a + m * x = m * x1 + b
trans b + m * x1
exact hab_witness_witness
apply add_comm
specialize division_remainder_unique m
specialize division_remainder_unique (a + m * x)
specialize division_remainder_unique x
specialize division_remainder_unique a
specialize division_remainder_unique x1
specialize division_remainder_unique b
have huniq : x = x1 /\ a = b
apply division_remainder_unique
exact hda
exact ha
exact hdb
exact hb
cases huniq
exact huniq_right
qed
- Occurrences
- 961
- Distinct objects
- 578
- Reused references
- 23
- Depth
- 59
- Cuts
- 26
- Certificate SHA-256
9bdbf756db7d…
mod_eq_to_remainder_decompositionA bounded congruent representative is a directed remainder
Congruence & CRT
checked
A bounded balanced residue has a directed quotient/remainder witness.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use division_remainder_exists
use add_comm
use mul_comm
use mod_eq_trans
use mod_eq_bounded_unique
intro m
intro b
intro x
intro hm
intro hx
intro hbx
have hdiv : exists q r. b = m * q + r /\ exists h. h + S r = m
specialize division_remainder_exists m
specialize division_remainder_exists b
apply division_remainder_exists
exact hm
cases hdiv
cases hdiv_witness
cases hdiv_witness_witness
have hremb : exists u v. x2 + m * u = b + m * v
exists x1
exists 0
trans m * x1 + x2
apply add_comm
trans b
symm
exact hdiv_witness_witness_left
symm
rewrite PA5
apply PA3
have hremx : exists u v. x2 + m * u = x + m * v
specialize mod_eq_trans m
specialize mod_eq_trans x2
specialize mod_eq_trans b
specialize mod_eq_trans x
apply mod_eq_trans
exact hremb
exact hbx
have hrx : x2 = x
specialize mod_eq_bounded_unique m
specialize mod_eq_bounded_unique x2
specialize mod_eq_bounded_unique x
apply mod_eq_bounded_unique
exact hdiv_witness_witness_right
exact hx
exact hremx
exists x1
trans m * x1 + x2
exact hdiv_witness_witness_left
trans x1 * m + x2
congr
apply mul_comm
refl
congr
refl
exact hrx
qed
- Occurrences
- 1,793
- Distinct objects
- 962
- Reused references
- 59
- Depth
- 64
- Cuts
- 50
- Certificate SHA-256
a92fbaccbecc…
beta_modulus_nonzeroEvery Gödel-beta modulus is nonzero
β sequences, products & FTA
checked
Every Gödel-beta decoding modulus is nonzero.
Exact expanded PA statement
forall c i. ~(S ((S i) * c) = 0)
Complete replay recipe: dependency imports + authored proof
pa prove forall c i. ~(S ((S i) * c) = 0)
use succ_ne_zero
intro c
intro i
specialize succ_ne_zero ((S i) * c)
exact succ_ne_zero
qed
- Occurrences
- 9
- Distinct objects
- 9
- Reused references
- 0
- Depth
- 6
- Cuts
- 1
- Certificate SHA-256
e8ce620074f6…
beta_at_self_of_boundA bounded value is its own Gödel-beta residue
β sequences, products & FTA
checked
A value below a Gödel-beta modulus decodes to itself when used as the code.
Exact expanded PA statement
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)
Complete replay recipe: dependency imports + authored proof
pa prove 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)
use mul_zero_left
use zero_add
intro c
intro i
intro x
intro hx
split
exact hx
exists 0
specialize mul_zero_left (S ((S i) * c))
rewrite mul_zero_left
specialize zero_add x
rewrite zero_add
refl
qed
- Occurrences
- 62
- Distinct objects
- 61
- Reused references
- 1
- Depth
- 16
- Cuts
- 2
- Certificate SHA-256
b563c1208a1c…
beta_at_existsEvery Gödel-beta position has a decoded value
β sequences, products & FTA
checked
Every Gödel-beta position has a bounded decoded residue.
beta_at_exists_unique beta_crt_prefix_congruence_step beta_exclusive_recode_congruence_step beta_prefix_product_trace_exists beta_product_exists prime_factorization_exists_up_to beta_prefix_sum_trace_exists beta_sum_exists beta_prefix_replace_exists beta_prefix_swap_last_exists beta_prefix_swap_last_reflect finite_contains_decidable beta_prefix_replace_reflectExact expanded PA statement
forall b c i. exists x. ((exists h. h + S x = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + x)
Complete replay recipe: dependency imports + authored proof
pa prove forall b c i. exists x. ((exists h. h + S x = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + x)
use beta_modulus_nonzero
use mul_comm
use division_remainder_exists
intro b
intro c
intro i
have hm0 : ~(S ((S i) * c) = 0)
specialize beta_modulus_nonzero c
specialize beta_modulus_nonzero i
exact beta_modulus_nonzero
specialize division_remainder_exists (S ((S i) * c))
specialize division_remainder_exists b
have hdiv : exists q r. b = S ((S i) * c) * q + r /\ exists h. h + S r = S ((S i) * c)
apply division_remainder_exists
exact hm0
cases hdiv
cases hdiv_witness
cases hdiv_witness_witness
exists x1
split
exact hdiv_witness_witness_right
exists x
trans S ((S i) * c) * x + x1
exact hdiv_witness_witness_left
congr
apply mul_comm
refl
qed
- Occurrences
- 479
- Distinct objects
- 392
- Reused references
- 38
- Depth
- 31
- Cuts
- 15
- Certificate SHA-256
967de23f5a2e…
beta_at_uniqueA Gödel-beta decoded value is unique
β sequences, products & FTA
checked
The decoded residue at a Gödel-beta position is unique.
beta_at_exists_unique beta_crt_prefix_congruence_step beta_exclusive_recode_congruence_step beta_product_functional beta_product_zero beta_product_succ_decompose beta_factor_divides_product prime_factorization_exists_up_to beta_prime_divisor_product_member beta_sorted_factor_le_last beta_canonical_last_factors_equal beta_canonical_product_cancel_last prime_factorization_uniqueness_by_length beta_repeat_entry_eq beta_range_entry_eq beta_sum_trace_functional beta_sum_zero beta_sum_succ_decompose bit_count_succ_decompose finite_bounded_entry_lt beta_prefix_replace_exists beta_prefix_swap_last_reflect finite_contains_decidable finite_bounded_injective_surjective beta_prefix_replace_reflect beta_product_replace_balance beta_product_swap_last_invariant beta_reindex_alignment_swap_lastExact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use mul_comm
use division_remainder_unique
intro b
intro c
intro i
intro x
intro y
intro hx
intro hy
cases hx
cases hy
cases hx_right
cases hy_right
have hdx : b = S ((S i) * c) * x1 + x
trans x1 * S ((S i) * c) + x
exact hx_right_witness
congr
apply mul_comm
refl
have hdy : b = S ((S i) * c) * x2 + y
trans x2 * S ((S i) * c) + y
exact hy_right_witness
congr
apply mul_comm
refl
specialize division_remainder_unique (S ((S i) * c))
specialize division_remainder_unique b
specialize division_remainder_unique x1
specialize division_remainder_unique x
specialize division_remainder_unique x2
specialize division_remainder_unique y
have huniq : x1 = x2 /\ x = y
apply division_remainder_unique
exact hdx
exact hx_left
exact hdy
exact hy_left
cases huniq
exact huniq_right
qed
- Occurrences
- 1,121
- Distinct objects
- 692
- Reused references
- 37
- Depth
- 59
- Cuts
- 30
- Certificate SHA-256
891320ec0873…
beta_at_exists_uniqueEvery Gödel-beta position has exactly one decoded value
β sequences, products & FTA
checked
Every Gödel-beta position has exactly one decoded residue.
Exact expanded PA statement
forall b c i. exists x. (((exists h. h + S x = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + x) /\ forall y. ((exists h. h + S y = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + y) -> x = y)
Complete replay recipe: dependency imports + authored proof
pa prove forall b c i. exists x. (((exists h. h + S x = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + x) /\ forall y. ((exists h. h + S y = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + y) -> x = y)
use beta_at_exists
use beta_at_unique
intro b
intro c
intro i
specialize beta_at_exists b
specialize beta_at_exists c
specialize beta_at_exists i
have hx : exists x. ((exists h. h + S x = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + x)
apply beta_at_exists
cases hx
exists x
split
exact hx_witness
intro y
intro hy
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique i
specialize beta_at_unique x
specialize beta_at_unique y
apply beta_at_unique
exact hx_witness
exact hy
qed
- Occurrences
- 1,625
- Distinct objects
- 901
- Reused references
- 55
- Depth
- 61
- Cuts
- 47
- Certificate SHA-256
37ae2a410d20…
beta_at_to_mod_eqA Gödel-beta value is congruent to its code
β sequences, products & FTA
checked
Every expanded Gödel-beta value is balanced-congruent to its code.
Exact expanded PA statement
forall b c i x. ((exists h. h + S x = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + x) -> exists u v. b + S ((S i) * c) * u = x + S ((S i) * c) * v
Complete replay recipe: dependency imports + authored proof
pa prove forall b c i x. ((exists h. h + S x = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + x) -> exists u v. b + S ((S i) * c) * u = x + S ((S i) * c) * v
use remainder_decomposition_to_mod_eq
intro b
intro c
intro i
intro x
intro hat
cases hat
cases hat_right
specialize remainder_decomposition_to_mod_eq (S ((S i) * c))
specialize remainder_decomposition_to_mod_eq b
specialize remainder_decomposition_to_mod_eq x1
specialize remainder_decomposition_to_mod_eq x
apply remainder_decomposition_to_mod_eq
exact hat_right_witness
qed
- Occurrences
- 358
- Distinct objects
- 263
- Reused references
- 23
- Depth
- 27
- Cuts
- 11
- Certificate SHA-256
dd174002d470…
beta_at_of_mod_eq_boundA bounded congruent value is a Gödel-beta value
β sequences, products & FTA
checked
A bounded value congruent to a code is its expanded Gödel-beta value.
Exact expanded PA statement
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)
Complete replay recipe: dependency imports + authored proof
pa prove 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)
use beta_modulus_nonzero
use mod_eq_to_remainder_decomposition
intro b
intro c
intro i
intro x
intro hx
intro hmod
split
exact hx
specialize mod_eq_to_remainder_decomposition (S ((S i) * c))
specialize mod_eq_to_remainder_decomposition b
specialize mod_eq_to_remainder_decomposition x
apply mod_eq_to_remainder_decomposition
specialize beta_modulus_nonzero c
specialize beta_modulus_nonzero i
exact beta_modulus_nonzero
exact hx
exact hmod
qed
- Occurrences
- 1,839
- Distinct objects
- 1,008
- Reused references
- 59
- Depth
- 66
- Cuts
- 53
- Certificate SHA-256
e4a2ead06ca6…
dvd_to_mod_zeroA multiple is congruent to zero
Congruence & CRT
checked
A multiple is balanced-congruent to zero.
Exact expanded PA statement
forall m a. (exists k. a = m * k) -> exists u v. a + m * u = 0 + m * v
Complete replay recipe: dependency imports + authored proof
pa prove forall m a. (exists k. a = m * k) -> exists u v. a + m * u = 0 + m * v
use zero_add
intro m
intro a
intro h
cases h
exists 0
exists x
rewrite h_witness
simp [zero_add]
qed
- Occurrences
- 41
- Distinct objects
- 40
- Reused references
- 1
- Depth
- 14
- Cuts
- 1
- Certificate SHA-256
fa1d8f3ac2a8…
add_residueAbsorb a known residue decomposition into a multiple
Congruence & CRT
checked
Absorb a second quotient into an existing residue equation.
Exact expanded PA statement
forall a u c r s. r = a * c + s -> a * u + r = a * (u + c) + s
Complete replay recipe: dependency imports + authored proof
pa prove forall a u c r s. r = a * c + s -> a * u + r = a * (u + c) + s
use add_assoc
use mul_add
intro a
intro u
intro c
intro r
intro s
intro hr
trans a * u + (a * c + s)
congr
refl
exact hr
trans (a * u + a * c) + s
symm
apply add_assoc
congr
symm
apply mul_add
refl
qed
- Occurrences
- 135
- Distinct objects
- 95
- Reused references
- 8
- Depth
- 18
- Cuts
- 3
- Certificate SHA-256
2b9ca2734b62…
add_residue_liftLift an additive residue decomposition
Congruence & CRT
checked
Combine two quotient-and-residue summands and normalize the residue.
Exact expanded PA statement
forall a x u r q t c s. x = a * q + t -> r + t = a * c + s -> (a * u + r) + x = a * ((u + q) + c) + s
Complete replay recipe: dependency imports + authored proof
pa prove forall a x u r q t c s. x = a * q + t -> r + t = a * c + s -> (a * u + r) + x = a * ((u + q) + c) + s
use add_comm
use add_assoc
use mul_add
intro a
intro x
intro u
intro r
intro q
intro t
intro c
intro s
intro hx
intro hr
trans (a * u + r) + (a * q + t)
congr
refl
exact hx
trans a * u + (r + (a * q + t))
apply add_assoc
trans a * u + ((r + a * q) + t)
congr
refl
symm
apply add_assoc
trans a * u + ((a * q + r) + t)
congr
refl
congr
apply add_comm
refl
trans a * u + (a * q + (r + t))
congr
refl
apply add_assoc
trans (a * u + a * q) + (r + t)
symm
apply add_assoc
trans a * (u + q) + (r + t)
congr
symm
apply mul_add
refl
trans a * (u + q) + (a * c + s)
congr
refl
exact hr
trans (a * (u + q) + a * c) + s
symm
apply add_assoc
congr
symm
apply mul_add
refl
qed
- Occurrences
- 259
- Distinct objects
- 211
- Reused references
- 16
- Depth
- 28
- Cuts
- 6
- Certificate SHA-256
7eb051f21c6a…
square_decompExpand the square of a quotient-residue decomposition
Congruence & CRT
checked
Expand a square while retaining an explicit quotient and remainder.
Exact expanded PA statement
forall a z q r. z = a * q + r -> z * z = a * (q * z + r * q) + r * r
Complete replay recipe: dependency imports + authored proof
pa prove forall a z q r. z = a * q + r -> z * z = a * (q * z + r * q) + r * r
use add_assoc
use mul_comm
use mul_add
use add_mul
use mul_assoc
intro a
intro z
intro q
intro r
intro hz
trans (a * q + r) * z
congr
exact hz
refl
trans (a * q) * z + r * z
apply add_mul
trans a * (q * z) + r * z
congr
apply mul_assoc
refl
trans a * (q * z) + r * (a * q + r)
congr
refl
congr
refl
exact hz
trans a * (q * z) + (r * (a * q) + r * r)
congr
refl
apply mul_add
trans a * (q * z) + (a * (r * q) + r * r)
congr
refl
congr
trans (r * a) * q
symm
apply mul_assoc
trans (a * r) * q
congr
apply mul_comm
refl
apply mul_assoc
refl
trans (a * (q * z) + a * (r * q)) + r * r
symm
apply add_assoc
congr
symm
apply mul_add
refl
qed
- Occurrences
- 847
- Distinct objects
- 370
- Reused references
- 40
- Depth
- 29
- Cuts
- 23
- Certificate SHA-256
504cec489222…
square_residue_liftLift a residue decomposition through squaring
Congruence & CRT
checked
Lift one quotient-and-remainder equation through squaring.
Exact expanded PA statement
forall a z q r c s. z = a * q + r -> r * r = a * c + s -> z * z = a * ((q * z + r * q) + c) + s
Complete replay recipe: dependency imports + authored proof
pa prove forall a z q r c s. z = a * q + r -> r * r = a * c + s -> z * z = a * ((q * z + r * q) + c) + s
use square_decomp
use add_residue
intro a
intro z
intro q
intro r
intro c
intro s
intro hz
intro hrc
trans a * (q * z + r * q) + r * r
apply square_decomp
exact hz
apply add_residue
exact hrc
qed
- Occurrences
- 1,008
- Distinct objects
- 421
- Reused references
- 42
- Depth
- 30
- Cuts
- 28
- Certificate SHA-256
efdeed4ea296…
square_residue_witnessPackage a square residue as an existential witness
Congruence & CRT
checked
Existential wrapper for the generic square-residue lift.
Exact expanded PA statement
forall a z q r c s. z = a * q + r -> r * r = a * c + s -> exists w. z * z = a * w + s
Complete replay recipe: dependency imports + authored proof
pa prove forall a z q r c s. z = a * q + r -> r * r = a * c + s -> exists w. z * z = a * w + s
use square_residue_lift
intro a
intro z
intro q
intro r
intro c
intro s
intro hz
intro hrc
exists (q * z + r * q) + c
apply square_residue_lift
exact hz
exact hrc
qed
- Occurrences
- 1,029
- Distinct objects
- 442
- Reused references
- 42
- Depth
- 31
- Cuts
- 29
- Certificate SHA-256
3246695c5c67…
bezout_mod_leftBalanced Bézout identity projected modulo the left modulus
Congruence & CRT
checked
A balanced Bezout identity selects the right coefficient modulo the left modulus.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use add_assoc
use add_comm
intro m
intro n
intro xp
intro yp
intro xn
intro yn
intro h
exists xp
exists xn
trans m * xp + n * yp
apply add_comm
trans 1 + (m * xn + n * yn)
exact h
trans 1 + (n * yn + m * xn)
congr
refl
apply add_comm
symm
apply add_assoc
qed
- Occurrences
- 134
- Distinct objects
- 123
- Reused references
- 11
- Depth
- 19
- Cuts
- 4
- Certificate SHA-256
0ba24c738b19…
bezout_mod_rightBalanced Bézout identity projected modulo the right modulus
Congruence & CRT
checked
A balanced Bezout identity selects the left coefficient modulo the right modulus.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use add_assoc
intro m
intro n
intro xp
intro yp
intro xn
intro yn
intro h
exists yp
exists yn
trans 1 + (m * xn + n * yn)
exact h
symm
apply add_assoc
qed
- Occurrences
- 50
- Distinct objects
- 47
- Reused references
- 3
- Depth
- 16
- Cuts
- 1
- Certificate SHA-256
2b31fb490cc7…
mod_eq_predecessor_cancelSuccessor-predecessor cancellation in balanced congruence
Congruence & CRT
checked
The predecessor of a successor acts as minus one in balanced congruence.
Exact expanded PA statement
forall k a z. exists u v. ((a + z) + k * z) + S k * u = a + S k * v
Complete replay recipe: dependency imports + authored proof
pa prove forall k a z. exists u v. ((a + z) + k * z) + S k * u = a + S k * v
use add_assoc
use add_comm
use mul_succ_left
intro k
intro a
intro z
exists 0
exists z
rewrite PA5
rewrite PA3
specialize mul_succ_left k
specialize mul_succ_left z
rewrite mul_succ_left
trans a + (z + k * z)
apply add_assoc
congr
refl
apply add_comm
qed
- Occurrences
- 315
- Distinct objects
- 192
- Reused references
- 19
- Depth
- 25
- Cuts
- 9
- Certificate SHA-256
35e5bcc42164…
binary_crtConstructive binary Chinese remainder theorem
Congruence & CRT
checked
Constructive binary CRT for positive coprime natural moduli using balanced congruence.
Exact expanded PA statement
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)
Complete replay recipe: dependency imports + authored proof
pa prove 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)
use nonzero_is_succ
use coprime_balanced_bezout
use bezout_mod_left
use bezout_mod_right
use mod_eq_mul_left
use mul_add
use mul_one
use dvd_to_mod_zero
use mul_assoc
use mul_comm
use mod_eq_add
use mod_eq_refl
use mod_eq_trans
use mod_eq_predecessor_cancel
use zero_add
intro m
intro n
intro a
intro b
intro hm
intro hn
intro hcop
have hms : exists k. m = S k
specialize nonzero_is_succ m
apply nonzero_is_succ
exact hm
have hns : exists k. n = S k
specialize nonzero_is_succ n
apply nonzero_is_succ
exact hn
have hbez : exists xp yp xn yn. m * xp + n * yp = 1 + (m * xn + n * yn)
specialize coprime_balanced_bezout m
specialize coprime_balanced_bezout n
apply coprime_balanced_bezout
exact hcop
cases hms
cases hns
cases hbez
cases hbez_witness
cases hbez_witness_witness
cases hbez_witness_witness_witness
have hbl : exists u v. n * x3 + m * u = (1 + n * x5) + m * v
specialize bezout_mod_left m
specialize bezout_mod_left n
specialize bezout_mod_left x2
specialize bezout_mod_left x3
specialize bezout_mod_left x4
specialize bezout_mod_left x5
apply bezout_mod_left
exact hbez_witness_witness_witness_witness
have hbr : exists u v. m * x2 + n * u = (1 + m * x4) + n * v
specialize bezout_mod_right m
specialize bezout_mod_right n
specialize bezout_mod_right x2
specialize bezout_mod_right x3
specialize bezout_mod_right x4
specialize bezout_mod_right x5
apply bezout_mod_right
exact hbez_witness_witness_witness_witness
have hal0 : exists u v. (a * (n * x3)) + m * u = (a * (1 + n * x5)) + m * v
specialize mod_eq_mul_left m
specialize mod_eq_mul_left (n * x3)
specialize mod_eq_mul_left (1 + n * x5)
specialize mod_eq_mul_left a
apply mod_eq_mul_left
exact hbl
have hal : exists u v. (a * (n * x3)) + m * u = (a + a * (n * x5)) + m * v
have haexpand : a * (1 + n * x5) = a + a * (n * x5)
trans a * 1 + a * (n * x5)
apply mul_add
congr
apply mul_one
refl
rewrite <- haexpand
exact hal0
have hbm : exists u v. (b * (m * x2)) + m * u = 0 + m * v
apply dvd_to_mod_zero
exists b * x2
trans (b * m) * x2
symm
apply mul_assoc
trans (m * b) * x2
congr
apply mul_comm
refl
apply mul_assoc
have hym : exists u v. ((a * (n * x3)) + (b * (m * x2))) + m * u = ((a + a * (n * x5)) + 0) + m * v
specialize mod_eq_add m
specialize mod_eq_add (a * (n * x3))
specialize mod_eq_add (a + a * (n * x5))
specialize mod_eq_add (b * (m * x2))
specialize mod_eq_add 0
apply mod_eq_add
exact hal
exact hbm
have hym_norm : exists u v. ((a * (n * x3)) + (b * (m * x2))) + m * u = (a + a * (n * x5)) + m * v
have hym_zero : (a + a * (n * x5)) + 0 = a + a * (n * x5)
rewrite PA3
refl
rewrite <- hym_zero
exact hym
have hkm : exists u v. (x * (a * (n * x5))) + m * u = (x * (a * (n * x5))) + m * v
specialize mod_eq_refl m
specialize mod_eq_refl (x * (a * (n * x5)))
apply mod_eq_refl
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
specialize mod_eq_add m
specialize mod_eq_add ((a * (n * x3)) + (b * (m * x2)))
specialize mod_eq_add (a + a * (n * x5))
specialize mod_eq_add (x * (a * (n * x5)))
specialize mod_eq_add (x * (a * (n * x5)))
apply mod_eq_add
exact hym_norm
exact hkm
have hcancelm : exists u v. ((a + a * (n * x5)) + x * (a * (n * x5))) + S x * u = a + S x * v
specialize mod_eq_predecessor_cancel x
specialize mod_eq_predecessor_cancel a
specialize mod_eq_predecessor_cancel (a * (n * x5))
apply mod_eq_predecessor_cancel
rewrite <- hms_witness at hcancelm
rewrite <- hms_witness at hcancelm
have hbasem : exists u v. (((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5)))) + m * u = a + m * v
specialize mod_eq_trans m
specialize mod_eq_trans (((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5))))
specialize mod_eq_trans ((a + a * (n * x5)) + (x * (a * (n * x5))))
specialize mod_eq_trans a
apply mod_eq_trans
exact hymk
exact hcancelm
have hknznm : exists u v. (x1 * (b * (m * x4))) + m * u = 0 + m * v
apply dvd_to_mod_zero
exists x1 * (b * x4)
trans x1 * ((b * m) * x4)
congr
refl
symm
apply mul_assoc
trans x1 * ((m * b) * x4)
congr
refl
congr
apply mul_comm
refl
trans x1 * (m * (b * x4))
congr
refl
apply mul_assoc
trans (x1 * m) * (b * x4)
symm
apply mul_assoc
trans (m * x1) * (b * x4)
congr
apply mul_comm
refl
apply mul_assoc
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
specialize mod_eq_add m
specialize mod_eq_add (((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5))))
specialize mod_eq_add a
specialize mod_eq_add (x1 * (b * (m * x4)))
specialize mod_eq_add 0
apply mod_eq_add
exact hbasem
exact hknznm
have hazerom : exists u v. (a + 0) + m * u = a + m * v
exists 0
exists 0
simp
have hfinalm : exists u v. ((((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5)))) + (x1 * (b * (m * x4)))) + m * u = a + m * v
specialize mod_eq_trans m
specialize mod_eq_trans ((((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5)))) + (x1 * (b * (m * x4))))
specialize mod_eq_trans (a + 0)
specialize mod_eq_trans a
apply mod_eq_trans
exact hfinalm0
exact hazerom
have hbn0 : exists u v. (b * (m * x2)) + n * u = (b * (1 + m * x4)) + n * v
specialize mod_eq_mul_left n
specialize mod_eq_mul_left (m * x2)
specialize mod_eq_mul_left (1 + m * x4)
specialize mod_eq_mul_left b
apply mod_eq_mul_left
exact hbr
have hbn : exists u v. (b * (m * x2)) + n * u = (b + b * (m * x4)) + n * v
have hbexpand : b * (1 + m * x4) = b + b * (m * x4)
trans b * 1 + b * (m * x4)
apply mul_add
congr
apply mul_one
refl
rewrite <- hbexpand
exact hbn0
have han : exists u v. (a * (n * x3)) + n * u = 0 + n * v
apply dvd_to_mod_zero
exists a * x3
trans (a * n) * x3
symm
apply mul_assoc
trans (n * a) * x3
congr
apply mul_comm
refl
apply mul_assoc
have hyn0 : exists u v. ((a * (n * x3)) + (b * (m * x2))) + n * u = (0 + (b + b * (m * x4))) + n * v
specialize mod_eq_add n
specialize mod_eq_add (a * (n * x3))
specialize mod_eq_add 0
specialize mod_eq_add (b * (m * x2))
specialize mod_eq_add (b + b * (m * x4))
apply mod_eq_add
exact han
exact hbn
have hyn_norm : exists u v. ((a * (n * x3)) + (b * (m * x2))) + n * u = (b + b * (m * x4)) + n * v
have hyn_zero : 0 + (b + b * (m * x4)) = b + b * (m * x4)
specialize zero_add (b + b * (m * x4))
exact zero_add
rewrite <- hyn_zero
exact hyn0
have hkmz : exists u v. (x * (a * (n * x5))) + n * u = 0 + n * v
apply dvd_to_mod_zero
exists x * (a * x5)
trans x * ((a * n) * x5)
congr
refl
symm
apply mul_assoc
trans x * ((n * a) * x5)
congr
refl
congr
apply mul_comm
refl
trans x * (n * (a * x5))
congr
refl
apply mul_assoc
trans (x * n) * (a * x5)
symm
apply mul_assoc
trans (n * x) * (a * x5)
congr
apply mul_comm
refl
apply mul_assoc
have hyn1 : exists u v. (((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5)))) + n * u = ((b + b * (m * x4)) + 0) + n * v
specialize mod_eq_add n
specialize mod_eq_add ((a * (n * x3)) + (b * (m * x2)))
specialize mod_eq_add (b + b * (m * x4))
specialize mod_eq_add (x * (a * (n * x5)))
specialize mod_eq_add 0
apply mod_eq_add
exact hyn_norm
exact hkmz
have hyn1_norm : exists u v. (((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5)))) + n * u = (b + b * (m * x4)) + n * v
have hyn1_zero : (b + b * (m * x4)) + 0 = b + b * (m * x4)
rewrite PA3
refl
rewrite <- hyn1_zero
exact hyn1
have hkn : exists u v. (x1 * (b * (m * x4))) + n * u = (x1 * (b * (m * x4))) + n * v
specialize mod_eq_refl n
specialize mod_eq_refl (x1 * (b * (m * x4)))
apply mod_eq_refl
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
specialize mod_eq_add n
specialize mod_eq_add (((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5))))
specialize mod_eq_add (b + b * (m * x4))
specialize mod_eq_add (x1 * (b * (m * x4)))
specialize mod_eq_add (x1 * (b * (m * x4)))
apply mod_eq_add
exact hyn1_norm
exact hkn
have hcanceln : exists u v. ((b + b * (m * x4)) + x1 * (b * (m * x4))) + S x1 * u = b + S x1 * v
specialize mod_eq_predecessor_cancel x1
specialize mod_eq_predecessor_cancel b
specialize mod_eq_predecessor_cancel (b * (m * x4))
apply mod_eq_predecessor_cancel
rewrite <- hns_witness at hcanceln
rewrite <- hns_witness at hcanceln
have hfinaln : exists u v. ((((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5)))) + (x1 * (b * (m * x4)))) + n * u = b + n * v
specialize mod_eq_trans n
specialize mod_eq_trans ((((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5)))) + (x1 * (b * (m * x4))))
specialize mod_eq_trans ((b + b * (m * x4)) + (x1 * (b * (m * x4))))
specialize mod_eq_trans b
apply mod_eq_trans
exact hynk
exact hcanceln
exists (((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5)))) + (x1 * (b * (m * x4)))
split
exact hfinalm
exact hfinaln
qed
- Occurrences
- 5,044
- Distinct objects
- 1,929
- Reused references
- 109
- Depth
- 51
- Cuts
- 144
- Certificate SHA-256
fd5384ba933f…
binary_crt_remaindersBinary CRT with directed remainder witnesses
Congruence & CRT
checked
Binary CRT with bounded residues exposed as directed quotient/remainder equations.
Exact expanded PA statement
forall m n a b. ~(m = 0) -> ~(n = 0) -> (forall d. (exists u. m = d * u) -> (exists v. n = d * v) -> d = 1) -> (exists ha. ha + S a = m) -> (exists hb. hb + S b = n) -> exists x q r. (x = q * m + a /\ x = r * n + b)
Complete replay recipe: dependency imports + authored proof
pa prove forall m n a b. ~(m = 0) -> ~(n = 0) -> (forall d. (exists u. m = d * u) -> (exists v. n = d * v) -> d = 1) -> (exists ha. ha + S a = m) -> (exists hb. hb + S b = n) -> exists x q r. (x = q * m + a /\ x = r * n + b)
use binary_crt
use mod_eq_to_remainder_decomposition
intro m
intro n
intro a
intro b
intro hm
intro hn
intro hcop
intro ha
intro hb
have hcrt : exists x. (exists u v. x + m * u = a + m * v) /\ (exists r s. x + n * r = b + n * s)
specialize binary_crt m
specialize binary_crt n
specialize binary_crt a
specialize binary_crt b
apply binary_crt
exact hm
exact hn
exact hcop
cases hcrt
cases hcrt_witness
have hma : exists q. x = q * m + a
specialize mod_eq_to_remainder_decomposition m
specialize mod_eq_to_remainder_decomposition x
specialize mod_eq_to_remainder_decomposition a
apply mod_eq_to_remainder_decomposition
exact hm
exact ha
exact hcrt_witness_left
have hnb : exists q. x = q * n + b
specialize mod_eq_to_remainder_decomposition n
specialize mod_eq_to_remainder_decomposition x
specialize mod_eq_to_remainder_decomposition b
apply mod_eq_to_remainder_decomposition
exact hn
exact hb
exact hcrt_witness_right
cases hma
cases hnb
exists x
exists x1
exists x2
split
exact hma_witness
exact hnb_witness
qed
- Occurrences
- 6,890
- Distinct objects
- 2,442
- Reused references
- 125
- Depth
- 66
- Cuts
- 196
- Certificate SHA-256
f3432e4bdae4…
binary_crt_beta_pairA single Gödel-beta code realizes two bounded values
β sequences, products & FTA
checked
Pairwise coprime beta moduli admit a single code realizing two bounded beta values.
Exact expanded PA statement
forall c i j a b. (forall d. (exists u. S ((S i) * c) = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1) -> (exists ha. ha + S a = S ((S i) * c)) -> (exists hb. hb + S b = S ((S j) * c)) -> exists code. (((exists ha. ha + S a = S ((S i) * c)) /\ exists q. code = q * S ((S i) * c) + a) /\ ((exists hb. hb + S b = S ((S j) * c)) /\ exists r. code = r * S ((S j) * c) + b))
Complete replay recipe: dependency imports + authored proof
pa prove forall c i j a b. (forall d. (exists u. S ((S i) * c) = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1) -> (exists ha. ha + S a = S ((S i) * c)) -> (exists hb. hb + S b = S ((S j) * c)) -> exists code. (((exists ha. ha + S a = S ((S i) * c)) /\ exists q. code = q * S ((S i) * c) + a) /\ ((exists hb. hb + S b = S ((S j) * c)) /\ exists r. code = r * S ((S j) * c) + b))
use beta_modulus_nonzero
use binary_crt
use beta_at_of_mod_eq_bound
intro c
intro i
intro j
intro a
intro b
intro hcop
intro ha
intro hb
have hmi : ~(S ((S i) * c) = 0)
specialize beta_modulus_nonzero c
specialize beta_modulus_nonzero i
exact beta_modulus_nonzero
have hmj : ~(S ((S j) * c) = 0)
specialize beta_modulus_nonzero c
specialize beta_modulus_nonzero j
exact beta_modulus_nonzero
have hcrt : exists code. (exists u v. code + S ((S i) * c) * u = a + S ((S i) * c) * v) /\ (exists r s. code + S ((S j) * c) * r = b + S ((S j) * c) * s)
specialize binary_crt (S ((S i) * c))
specialize binary_crt (S ((S j) * c))
specialize binary_crt a
specialize binary_crt b
apply binary_crt
exact hmi
exact hmj
exact hcop
cases hcrt
cases hcrt_witness
have hati : ((exists h. h + S a = S ((S i) * c)) /\ exists q. x = q * S ((S i) * c) + a)
specialize beta_at_of_mod_eq_bound x
specialize beta_at_of_mod_eq_bound c
specialize beta_at_of_mod_eq_bound i
specialize beta_at_of_mod_eq_bound a
apply beta_at_of_mod_eq_bound
exact ha
exact hcrt_witness_left
have hatj : ((exists h. h + S b = S ((S j) * c)) /\ exists q. x = q * S ((S j) * c) + b)
specialize beta_at_of_mod_eq_bound x
specialize beta_at_of_mod_eq_bound c
specialize beta_at_of_mod_eq_bound j
specialize beta_at_of_mod_eq_bound b
apply beta_at_of_mod_eq_bound
exact hb
exact hcrt_witness_right
exists x
split
exact hati
exact hatj
qed
- Occurrences
- 6,941
- Distinct objects
- 2,484
- Reused references
- 126
- Depth
- 69
- Cuts
- 201
- Certificate SHA-256
d0c6658e1cbb…
beta_modulus_coprime_baseA Gödel-beta modulus is coprime to its base
β sequences, products & FTA
checked
Every beta-shaped successor modulus is coprime to its base c.
Exact expanded PA statement
forall c k d. (exists u. S (k * c) = d * u) -> (exists v. c = d * v) -> d = 1
Complete replay recipe: dependency imports + authored proof
pa prove forall c k d. (exists u. S (k * c) = d * u) -> (exists v. c = d * v) -> d = 1
use divides_remainder
use divisor_one
use mul_comm
intro c
intro k
intro d
intro hm
intro hc
have hstep : S (k * c) = c * k + 1
simp [mul_comm]
have h1 : exists w. 1 = d * w
specialize divides_remainder d
specialize divides_remainder (S (k * c))
specialize divides_remainder c
specialize divides_remainder k
specialize divides_remainder 1
apply divides_remainder
exact hm
exact hc
exact hstep
specialize divisor_one d
apply divisor_one
exact h1
qed
- Occurrences
- 874
- Distinct objects
- 630
- Reused references
- 54
- Depth
- 30
- Cuts
- 24
- Certificate SHA-256
f7e3c800ecbe…
common_divisor_beta_moduli_divides_gap_times_cA common beta-modulus divisor divides the scaled index gap
β sequences, products & FTA
checked
A common divisor of two ordered beta moduli divides the index gap times c.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use divides_remainder
use add_succ_left
use add_mul
use zero_add
intro c
intro i
intro j
intro gap
intro d
intro hij
intro hmi
intro hmj
have hstep : S ((S j) * c) = S ((S i) * c) * 1 + gap * c
rewrite hij
specialize add_succ_left i
specialize add_succ_left gap
rewrite <- add_succ_left
simp [add_mul, zero_add]
symm
specialize add_succ_left_before (S i * c)
specialize add_succ_left_before (gap * c)
exact add_succ_left_before
specialize divides_remainder d
specialize divides_remainder (S ((S j) * c))
specialize divides_remainder (S ((S i) * c))
specialize divides_remainder 1
specialize divides_remainder (gap * c)
apply divides_remainder
exact hmj
exact hmi
exact hstep
qed
- Occurrences
- 855
- Distinct objects
- 540
- Reused references
- 45
- Depth
- 30
- Cuts
- 24
- Certificate SHA-256
42a60bc7d8fe…
beta_moduli_coprime_of_gap_dvdDivisible index gaps give coprime Gödel-beta moduli
β sequences, products & FTA
checked
Beta moduli at an additive index gap dividing c are coprime.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use beta_modulus_coprime_base
use common_divisor_beta_moduli_divides_gap_times_c
use multiple_trans
use multiple_refl
use gauss_coprime_cancel
use mul_comm
intro c
intro i
intro j
intro gap
intro hij
intro hgapc
intro d
intro hmi
intro hmj
have hcopdc : forall e. (exists u. d = e * u) -> (exists v. c = e * v) -> e = 1
intro e
intro hed
intro hec
have hmei : exists u. S ((S i) * c) = e * u
specialize multiple_trans d
specialize multiple_trans e
specialize multiple_trans (S ((S i) * c))
apply multiple_trans
exact hmi
exact hed
specialize beta_modulus_coprime_base c
specialize beta_modulus_coprime_base (S i)
specialize beta_modulus_coprime_base e
apply beta_modulus_coprime_base
exact hmei
exact hec
have hgapprod : exists w. gap * c = d * w
specialize common_divisor_beta_moduli_divides_gap_times_c c
specialize common_divisor_beta_moduli_divides_gap_times_c i
specialize common_divisor_beta_moduli_divides_gap_times_c j
specialize common_divisor_beta_moduli_divides_gap_times_c gap
specialize common_divisor_beta_moduli_divides_gap_times_c d
apply common_divisor_beta_moduli_divides_gap_times_c
exact hij
exact hmi
exact hmj
cases hgapprod
have hdivgap : exists w. gap = d * w
specialize gauss_coprime_cancel d
specialize gauss_coprime_cancel c
specialize gauss_coprime_cancel gap
apply gauss_coprime_cancel
exact hcopdc
exists x
trans gap * c
apply mul_comm
exact hgapprod_witness
have hdc : exists w. c = d * w
specialize multiple_trans gap
specialize multiple_trans d
specialize multiple_trans c
apply multiple_trans
exact hgapc
exact hdivgap
specialize hcopdc d
apply hcopdc
specialize multiple_refl d
exact multiple_refl
exact hdc
qed
- Occurrences
- 6,007
- Distinct objects
- 1,803
- Reused references
- 119
- Depth
- 56
- Cuts
- 175
- Certificate SHA-256
e31f87a1af34…
binary_crt_beta_pair_of_gap_dvdA divisible index gap supplies a two-position Gödel-beta code
β sequences, products & FTA
checked
Discharge the beta-pair CRT coprimality premise from a divisible index gap.
Exact expanded PA statement
forall c i j gap a b. j = i + gap -> (exists k. c = gap * k) -> (exists ha. ha + S a = S ((S i) * c)) -> (exists hb. hb + S b = S ((S j) * c)) -> exists code. (((exists ha. ha + S a = S ((S i) * c)) /\ exists q. code = q * S ((S i) * c) + a) /\ ((exists hb. hb + S b = S ((S j) * c)) /\ exists r. code = r * S ((S j) * c) + b))
Complete replay recipe: dependency imports + authored proof
pa prove forall c i j gap a b. j = i + gap -> (exists k. c = gap * k) -> (exists ha. ha + S a = S ((S i) * c)) -> (exists hb. hb + S b = S ((S j) * c)) -> exists code. (((exists ha. ha + S a = S ((S i) * c)) /\ exists q. code = q * S ((S i) * c) + a) /\ ((exists hb. hb + S b = S ((S j) * c)) /\ exists r. code = r * S ((S j) * c) + b))
use beta_moduli_coprime_of_gap_dvd
use binary_crt_beta_pair
intro c
intro i
intro j
intro gap
intro a
intro b
intro hij
intro hgapc
intro ha
intro hb
have hcop : forall d. (exists u. S ((S i) * c) = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1
specialize beta_moduli_coprime_of_gap_dvd c
specialize beta_moduli_coprime_of_gap_dvd i
specialize beta_moduli_coprime_of_gap_dvd j
specialize beta_moduli_coprime_of_gap_dvd gap
apply beta_moduli_coprime_of_gap_dvd
exact hij
exact hgapc
specialize binary_crt_beta_pair c
specialize binary_crt_beta_pair i
specialize binary_crt_beta_pair j
specialize binary_crt_beta_pair a
specialize binary_crt_beta_pair b
apply binary_crt_beta_pair
exact hcop
exact ha
exact hb
qed
- Occurrences
- 12,980
- Distinct objects
- 3,078
- Reused references
- 165
- Depth
- 71
- Cuts
- 378
- Certificate SHA-256
79ec20e402f2…
bounded_common_multiple_stepA bounded common multiple extends by one
Divisibility
checked
Extend a nonzero common multiple through the next positive natural.
Exact expanded PA statement
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)
Complete replay recipe: dependency imports + authored proof
pa prove 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)
use mul_eq_zero
use succ_ne_zero
use zero_or_succ
use multiple_mul_right
use mul_comm
intro B
intro c
intro hc
intro hall
exists c * S B
split
have hSB : ~(S B = 0)
specialize succ_ne_zero B
exact succ_ne_zero
have hprod : ~(c * S B = 0)
intro hzero
have hz : c = 0 \/ S B = 0
specialize mul_eq_zero c
specialize mul_eq_zero (S B)
apply mul_eq_zero
exact hzero
cases hz
apply hc
exact hz_left
apply hSB
exact hz_right
exact hprod
intro t
intro ht
cases ht
specialize zero_or_succ x
cases zero_or_succ
rewrite zero_or_succ_left at ht_witness
have hteq : S t = S B
rewrite PA4 at ht_witness
rewrite PA3 at ht_witness
apply PA2
exact ht_witness
exists c
rewrite hteq
apply mul_comm
cases zero_or_succ_right
have hprev : exists h. S t + S h = S B
exists x1
rewrite zero_or_succ_right_witness at ht_witness
rewrite PA4 at ht_witness
apply PA2
exact ht_witness
have hdivc : exists k. c = S t * k
specialize hall t
apply hall
exact hprev
specialize multiple_mul_right (S t)
specialize multiple_mul_right c
specialize multiple_mul_right (S B)
apply multiple_mul_right
exact hdivc
qed
- Occurrences
- 483
- Distinct objects
- 417
- Reused references
- 34
- Depth
- 29
- Cuts
- 15
- Certificate SHA-256
aa455c44508f…
bounded_common_multiple_existsEvery finite initial interval has a nonzero common multiple
Divisibility
checked
Every finite initial interval has a nonzero common-multiple surrogate.
Exact expanded PA statement
forall B. exists c. (~(c = 0) /\ forall t. (exists h. S t + S h = S B) -> exists k. c = S t * k)
Complete replay recipe: dependency imports + authored proof
pa prove forall B. exists c. (~(c = 0) /\ forall t. (exists h. S t + S h = S B) -> exists k. c = S t * k)
use bounded_common_multiple_step
use succ_ne_zero
use add_eq_zero_left
intro B
induction B
exists 1
split
specialize succ_ne_zero 0
exact succ_ne_zero
intro t
intro ht
cases ht
exfalso
have hz : S t + x = 0
rewrite PA4 at ht_witness
apply PA2
exact ht_witness
have hst0 : S t = 0
specialize add_eq_zero_left (S t)
specialize add_eq_zero_left x
apply add_eq_zero_left
exact hz
specialize succ_ne_zero t
apply succ_ne_zero
exact hst0
cases IH
cases IH_witness
specialize bounded_common_multiple_step B
specialize bounded_common_multiple_step x
apply bounded_common_multiple_step
exact IH_witness_left
exact IH_witness_right
qed
- Occurrences
- 640
- Distinct objects
- 481
- Reused references
- 37
- Depth
- 30
- Cuts
- 22
- Certificate SHA-256
ccb71e803625…
beta_moduli_coprime_of_lt_bounded_common_multipleOrdered bounded Gödel-beta moduli are coprime
β sequences, products & FTA
checked
Ordered bounded indices have coprime beta moduli when c is a common multiple of the bounded positive gaps.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use beta_moduli_coprime_of_gap_dvd
use add_comm
use le_trans
intro B
intro c
intro i
intro j
intro hcm
intro hlt
intro hjB
intro d
intro hdi
intro hdj
cases hlt
have hij : j = i + S x
symm
trans x + S i
simp [add_comm]
exact hlt_witness
have hgaple : exists r. r + S x = B
specialize le_trans (S x)
specialize le_trans j
specialize le_trans B
apply le_trans
exists i
symm
exact hij
exact hjB
cases hgaple
have hgapbound : exists h. S x + S h = S B
exists x1
rewrite PA4
congr
trans x1 + S x
apply add_comm
exact hgaple_witness
have hgapdvd : exists k. c = S x * k
specialize hcm x
apply hcm
exact hgapbound
have hcop : forall e. (exists u. S ((S i) * c) = e * u) -> (exists v. S ((S j) * c) = e * v) -> e = 1
specialize beta_moduli_coprime_of_gap_dvd c
specialize beta_moduli_coprime_of_gap_dvd i
specialize beta_moduli_coprime_of_gap_dvd j
specialize beta_moduli_coprime_of_gap_dvd (S x)
apply beta_moduli_coprime_of_gap_dvd
exact hij
exact hgapdvd
specialize hcop d
apply hcop
exact hdi
exact hdj
qed
- Occurrences
- 6,227
- Distinct objects
- 1,913
- Reused references
- 125
- Depth
- 57
- Cuts
- 181
- Certificate SHA-256
9d97203f2164…
beta_moduli_pairwise_coprime_boundedA bounded Gödel-beta prefix has pairwise coprime moduli
β sequences, products & FTA
checked
Distinct indices in a bounded prefix have pairwise coprime beta moduli under a bounded common-multiple invariant.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use lt_trichotomy
use beta_moduli_coprime_of_lt_bounded_common_multiple
intro B
intro c
intro hcm
intro i
intro j
intro hne
intro hiB
intro hjB
intro d
intro hdi
intro hdj
specialize lt_trichotomy i
specialize lt_trichotomy j
cases lt_trichotomy
exfalso
apply hne
exact lt_trichotomy_left
cases lt_trichotomy_right
have hcopij : forall e. (exists u. S ((S i) * c) = e * u) -> (exists v. S ((S j) * c) = e * v) -> e = 1
specialize beta_moduli_coprime_of_lt_bounded_common_multiple B
specialize beta_moduli_coprime_of_lt_bounded_common_multiple c
specialize beta_moduli_coprime_of_lt_bounded_common_multiple i
specialize beta_moduli_coprime_of_lt_bounded_common_multiple j
apply beta_moduli_coprime_of_lt_bounded_common_multiple
exact hcm
exact lt_trichotomy_right_left
exact hjB
specialize hcopij d
apply hcopij
exact hdi
exact hdj
have hcopji : forall e. (exists u. S ((S j) * c) = e * u) -> (exists v. S ((S i) * c) = e * v) -> e = 1
specialize beta_moduli_coprime_of_lt_bounded_common_multiple B
specialize beta_moduli_coprime_of_lt_bounded_common_multiple c
specialize beta_moduli_coprime_of_lt_bounded_common_multiple j
specialize beta_moduli_coprime_of_lt_bounded_common_multiple i
apply beta_moduli_coprime_of_lt_bounded_common_multiple
exact hcm
exact lt_trichotomy_right_right
exact hiB
specialize hcopji d
apply hcopji
exact hdj
exact hdi
qed
- Occurrences
- 6,348
- Distinct objects
- 2,034
- Reused references
- 125
- Depth
- 59
- Cuts
- 183
- Certificate SHA-256
67f94b655541…
bounded_beta_moduli_pairwise_coprime_existsEvery finite Gödel-beta prefix admits a pairwise-coprime base
β sequences, products & FTA
checked
Every finite beta-modulus prefix admits a nonzero base making its distinct positions pairwise coprime.
Exact expanded PA statement
forall B. exists c. (~(c = 0) /\ 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)
Complete replay recipe: dependency imports + authored proof
pa prove forall B. exists c. (~(c = 0) /\ 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)
use bounded_common_multiple_exists
use beta_moduli_pairwise_coprime_bounded
intro B
specialize bounded_common_multiple_exists B
cases bounded_common_multiple_exists
cases bounded_common_multiple_exists_witness
exists x
split
exact bounded_common_multiple_exists_witness_left
specialize beta_moduli_pairwise_coprime_bounded B
specialize beta_moduli_pairwise_coprime_bounded x
apply beta_moduli_pairwise_coprime_bounded
exact bounded_common_multiple_exists_witness_right
qed
- Occurrences
- 7,019
- Distinct objects
- 2,247
- Reused references
- 132
- Depth
- 61
- Cuts
- 207
- Certificate SHA-256
6d8ad65d4fb5…
coprime_mul_leftCoprimality is closed under multiplication on the left
GCD, Bézout & coprimality
checked
Coprimality with a fixed right operand is closed under multiplication on the left.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use multiple_trans
use gauss_coprime_cancel
intro a
intro b
intro n
intro han
intro hbn
intro d
intro hab
intro hdn
have hda : forall e. (exists u. d = e * u) -> (exists v. a = e * v) -> e = 1
intro e
intro hed
intro hea
have hen : exists q. n = e * q
specialize multiple_trans d
specialize multiple_trans e
specialize multiple_trans n
apply multiple_trans
exact hdn
exact hed
specialize han e
apply han
exact hea
exact hen
have hdb : exists w. b = d * w
specialize gauss_coprime_cancel d
specialize gauss_coprime_cancel a
specialize gauss_coprime_cancel b
apply gauss_coprime_cancel
exact hda
exact hab
specialize hbn d
apply hbn
exact hdb
exact hdn
qed
- Occurrences
- 3,975
- Distinct objects
- 1,558
- Reused references
- 94
- Depth
- 53
- Cuts
- 115
- Certificate SHA-256
51b298808927…
coprime_mul_rightCoprimality is closed under multiplication on the right
GCD, Bézout & coprimality
checked
Coprimality with a fixed left operand is closed under multiplication on the right.
Exact expanded PA statement
forall n a b. (forall d. (exists x. n = d * x) -> (exists y. a = d * y) -> d = 1) -> (forall d. (exists x. n = d * x) -> (exists y. b = d * y) -> d = 1) -> forall d. (exists x. n = d * x) -> (exists y. a * b = d * y) -> d = 1
Complete replay recipe: dependency imports + authored proof
pa prove forall n a b. (forall d. (exists x. n = d * x) -> (exists y. a = d * y) -> d = 1) -> (forall d. (exists x. n = d * x) -> (exists y. b = d * y) -> d = 1) -> forall d. (exists x. n = d * x) -> (exists y. a * b = d * y) -> d = 1
use coprime_mul_left
use coprime_symm
intro n
intro a
intro b
intro hna
intro hnb
have han : forall d. (exists x. a = d * x) -> (exists y. n = d * y) -> d = 1
specialize coprime_symm n
specialize coprime_symm a
apply coprime_symm
exact hna
have hbn : forall d. (exists x. b = d * x) -> (exists y. n = d * y) -> d = 1
specialize coprime_symm n
specialize coprime_symm b
apply coprime_symm
exact hnb
have habn : forall d. (exists x. a * b = d * x) -> (exists y. n = d * y) -> d = 1
specialize coprime_mul_left a
specialize coprime_mul_left b
specialize coprime_mul_left n
apply coprime_mul_left
exact han
exact hbn
specialize coprime_symm (a * b)
specialize coprime_symm n
apply coprime_symm
exact habn
qed
- Occurrences
- 4,017
- Distinct objects
- 1,600
- Reused references
- 94
- Depth
- 54
- Cuts
- 117
- Certificate SHA-256
8a3a38d99c52…
mod_eq_of_mod_eq_multipleCongruence descends along modulus divisibility
Congruence & CRT
checked
Balanced congruence descends from a multiple modulus to every divisor modulus.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use mul_assoc
intro m
intro P
intro x
intro a
intro hdiv
intro hmod
cases hdiv
cases hmod
cases hmod_witness
rewrite hdiv_witness at hmod_witness_witness
rewrite hdiv_witness at hmod_witness_witness
exists x1 * x2
exists x1 * x3
trans x + (m * x1) * x2
congr
refl
symm
apply mul_assoc
trans a + (m * x1) * x3
exact hmod_witness_witness
congr
refl
apply mul_assoc
qed
- Occurrences
- 157
- Distinct objects
- 145
- Reused references
- 12
- Depth
- 23
- Cuts
- 3
- Certificate SHA-256
f3d604756157…
binary_crt_fold_stepOne CRT fold step preserves all accumulated congruences
Congruence & CRT
checked
One binary CRT extension preserves every old congruence whose modulus divides the accumulated product.
Exact expanded PA statement
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)
Complete replay recipe: dependency imports + authored proof
pa prove 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)
use binary_crt
use mod_eq_of_mod_eq_multiple
use mod_eq_trans
intro P
intro n
intro x
intro b
intro hP
intro hn
intro hcop
have hcrt : exists z. (exists u v. z + P * u = x + P * v) /\ (exists q r. z + n * q = b + n * r)
specialize binary_crt P
specialize binary_crt n
specialize binary_crt x
specialize binary_crt b
apply binary_crt
exact hP
exact hn
exact hcop
cases hcrt
cases hcrt_witness
exists x1
split
intro m
intro a
intro hmP
intro hxa
have hzx : exists u v. x1 + m * u = x + m * v
specialize mod_eq_of_mod_eq_multiple m
specialize mod_eq_of_mod_eq_multiple P
specialize mod_eq_of_mod_eq_multiple x1
specialize mod_eq_of_mod_eq_multiple x
apply mod_eq_of_mod_eq_multiple
exact hmP
exact hcrt_witness_left
specialize mod_eq_trans m
specialize mod_eq_trans x1
specialize mod_eq_trans x
specialize mod_eq_trans a
apply mod_eq_trans
exact hzx
exact hxa
exact hcrt_witness_right
qed
- Occurrences
- 5,501
- Distinct objects
- 2,018
- Reused references
- 111
- Depth
- 52
- Cuts
- 156
- Certificate SHA-256
f65c05b0db8a…
right_factor_divides_productThe right factor divides a product
Divisibility
checked
The right factor divides a product.
Exact expanded PA statement
forall a b. exists k. a * b = b * k
Complete replay recipe: dependency imports + authored proof
pa prove forall a b. exists k. a * b = b * k
use mul_comm
intro a
intro b
exists a
apply mul_comm
qed
- Occurrences
- 229
- Distinct objects
- 207
- Reused references
- 22
- Depth
- 25
- Cuts
- 7
- Certificate SHA-256
91ff76024f69…
beta_accumulated_product_stepExtend the accumulated beta-modulus product invariant
β sequences, products & FTA
checked
Extend the accumulated beta-modulus product invariant by one bounded position.
Exact expanded PA statement
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 + i = k) -> exists q. P = S ((S i) * c) * q) -> (forall j. (exists g. g + S 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 (S k)) * c) = 0) /\ ((forall i. (exists h. h + i = S k) -> exists q. P * S ((S (S k)) * c) = S ((S i) * c) * q) /\ forall j. (exists g. g + S (S k) = j) -> (exists h. h + j = N) -> forall d. (exists u. P * S ((S (S k)) * c) = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1))
Complete replay recipe: dependency imports + authored proof
pa prove 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 + i = k) -> exists q. P = S ((S i) * c) * q) -> (forall j. (exists g. g + S 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 (S k)) * c) = 0) /\ ((forall i. (exists h. h + i = S k) -> exists q. P * S ((S (S k)) * c) = S ((S i) * c) * q) /\ forall j. (exists g. g + S (S k) = j) -> (exists h. h + j = N) -> forall d. (exists u. P * S ((S (S k)) * c) = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1))
use mul_ne_zero
use right_factor_divides_product
use beta_modulus_nonzero
use le_eq_or_lt
use le_of_succ_le_succ
use multiple_mul_right
use le_succ_self
use lt_of_le_of_lt
use lt_irrefl_expanded
use beta_moduli_pairwise_coprime_bounded
use coprime_mul_left
intro N
intro c
intro k
intro P
intro hcm
intro hkN
intro hP
intro hdiv
intro hfuture
have hnew : ~(S ((S (S k)) * c) = 0)
specialize beta_modulus_nonzero c
specialize beta_modulus_nonzero (S k)
exact beta_modulus_nonzero
split
specialize mul_ne_zero P
specialize mul_ne_zero (S ((S (S k)) * c))
intro hzero
apply mul_ne_zero
exact hP
exact hnew
exact hzero
split
intro i
intro hi
have hsplit : i = S k \/ exists r. r + S i = S k
specialize le_eq_or_lt i
specialize le_eq_or_lt (S k)
apply le_eq_or_lt
exact hi
cases hsplit
rewrite hsplit_left
specialize right_factor_divides_product P
specialize right_factor_divides_product (S ((S (S k)) * c))
exact right_factor_divides_product
have hik : exists r. r + i = k
specialize le_of_succ_le_succ i
specialize le_of_succ_le_succ k
apply le_of_succ_le_succ
exact hsplit_right
have hiP : exists q. P = S ((S i) * c) * q
specialize hdiv i
apply hdiv
exact hik
specialize multiple_mul_right (S ((S i) * c))
specialize multiple_mul_right P
specialize multiple_mul_right (S ((S (S k)) * c))
apply multiple_mul_right
exact hiP
intro j
intro hSkj
intro hjN
have hkj : exists r. r + S k = j
have hkSk : exists r. r + k = S k
specialize le_succ_self k
exact le_succ_self
specialize lt_of_le_of_lt k
specialize lt_of_le_of_lt (S k)
specialize lt_of_le_of_lt j
apply lt_of_le_of_lt
exact hkSk
exact hSkj
have hPj : forall d. (exists u. P = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1
specialize hfuture j
apply hfuture
exact hkj
exact hjN
have hneq : ~(S k = j)
intro heq
rewrite <- heq at hSkj
specialize lt_irrefl_expanded (S k)
apply lt_irrefl_expanded
exact hSkj
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
specialize beta_moduli_pairwise_coprime_bounded N
specialize beta_moduli_pairwise_coprime_bounded c
apply beta_moduli_pairwise_coprime_bounded
exact hcm
have hnewj : forall d. (exists u. S ((S (S k)) * c) = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1
specialize hpairs (S k)
specialize hpairs j
apply hpairs
exact hneq
exact hkN
exact hjN
specialize coprime_mul_left P
specialize coprime_mul_left (S ((S (S k)) * c))
specialize coprime_mul_left (S ((S j) * c))
apply coprime_mul_left
exact hPj
exact hnewj
qed
- Occurrences
- 11,174
- Distinct objects
- 2,348
- Reused references
- 136
- Depth
- 69
- Cuts
- 330
- Certificate SHA-256
6da6cc49d4d9…
beta_crt_prefix_congruence_stepExtend decoded-prefix congruence by one beta position
β sequences, products & FTA
checked
Extend balanced congruence to one more decoded beta position using the CRT fold step.
Exact expanded PA statement
forall N c b k P z. (exists h. h + S k = N) -> ~(P = 0) -> (forall i. (exists h. h + i = k) -> exists q. P = S ((S i) * c) * q) -> (forall i a. (exists h. h + i = k) -> ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -> exists u v. z + 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 = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1) -> exists z2. forall i a. (exists h. h + i = S k) -> ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -> exists u v. z2 + S ((S i) * c) * u = a + S ((S i) * c) * v
Complete replay recipe: dependency imports + authored proof
pa prove forall N c b k P z. (exists h. h + S k = N) -> ~(P = 0) -> (forall i. (exists h. h + i = k) -> exists q. P = S ((S i) * c) * q) -> (forall i a. (exists h. h + i = k) -> ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -> exists u v. z + 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 = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1) -> exists z2. forall i a. (exists h. h + i = S k) -> ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -> exists u v. z2 + S ((S i) * c) * u = a + S ((S i) * c) * v
use beta_modulus_nonzero
use le_refl
use binary_crt_fold_step
use beta_at_exists
use beta_at_unique
use le_eq_or_lt
use le_of_succ_le_succ
intro N
intro c
intro b
intro k
intro P
intro z
intro hkN
intro hP
intro hdiv
intro hcong
intro hfuture
have hnew : ~(S ((S (S k)) * c) = 0)
specialize beta_modulus_nonzero c
specialize beta_modulus_nonzero (S k)
exact beta_modulus_nonzero
have hstrict : exists g. g + S k = S k
specialize le_refl (S k)
exact le_refl
have hcop : forall d. (exists u. P = d * u) -> (exists v. S ((S (S k)) * c) = d * v) -> d = 1
specialize hfuture (S k)
apply hfuture
exact hstrict
exact hkN
have hvalue : exists a. ((exists h. h + S a = S ((S (S k)) * c)) /\ exists q. b = q * S ((S (S k)) * c) + a)
specialize beta_at_exists b
specialize beta_at_exists c
specialize beta_at_exists (S k)
exact beta_at_exists
cases hvalue
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 (S k)) * c) * q = x + S ((S (S k)) * c) * r)
specialize binary_crt_fold_step P
specialize binary_crt_fold_step (S ((S (S k)) * c))
specialize binary_crt_fold_step z
specialize binary_crt_fold_step x
apply binary_crt_fold_step
exact hP
exact hnew
exact hcop
cases hfold
cases hfold_witness
exists x1
intro i
intro a
intro hi
intro hati
have hsplit : i = S k \/ exists r. r + S i = S k
specialize le_eq_or_lt i
specialize le_eq_or_lt (S k)
apply le_eq_or_lt
exact hi
cases hsplit
have hati_new : ((exists h. h + S a = S ((S (S k)) * c)) /\ exists q. b = q * S ((S (S k)) * c) + a)
rewrite <- hsplit_left
rewrite <- hsplit_left
exact hati
have haeq : a = x
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique (S k)
specialize beta_at_unique a
specialize beta_at_unique x
apply beta_at_unique
exact hati_new
exact hvalue_witness
rewrite hsplit_left
rewrite hsplit_left
rewrite haeq
exact hfold_witness_right
have hik : exists r. r + i = k
specialize le_of_succ_le_succ i
specialize le_of_succ_le_succ k
apply le_of_succ_le_succ
exact hsplit_right
have hmiP : exists q. P = S ((S i) * c) * q
specialize hdiv i
apply hdiv
exact hik
have hzold : exists u v. z + S ((S i) * c) * u = a + S ((S i) * c) * v
specialize hcong i
specialize hcong a
apply hcong
exact hik
exact hati
specialize hfold_witness_left (S ((S i) * c))
specialize hfold_witness_left a
apply hfold_witness_left
exact hmiP
exact hzold
qed
- Occurrences
- 7,352
- Distinct objects
- 2,564
- Reused references
- 129
- Depth
- 64
- Cuts
- 213
- Certificate SHA-256
39d62088be96…
beta_crt_prefix_invariant_stepOne full bounded beta-prefix CRT invariant step
β sequences, products & FTA
checked
One concrete induction step for the bounded beta-prefix CRT invariant.
Exact expanded PA statement
forall N c b 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 + i = k) -> exists q. P = S ((S i) * c) * q) -> (forall i a. (exists h. h + i = k) -> ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -> exists u v. z + 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 = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1) -> exists z2. (~(P * S ((S (S k)) * c) = 0) /\ ((forall i. (exists h. h + i = S k) -> exists q. P * S ((S (S k)) * c) = S ((S i) * c) * q) /\ ((forall i a. (exists h. h + i = S k) -> ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -> exists u v. z2 + S ((S i) * c) * u = a + S ((S i) * c) * v) /\ forall j. (exists g. g + S (S k) = j) -> (exists h. h + j = N) -> forall d. (exists u. P * S ((S (S k)) * c) = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1)))
Complete replay recipe: dependency imports + authored proof
pa prove forall N c b 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 + i = k) -> exists q. P = S ((S i) * c) * q) -> (forall i a. (exists h. h + i = k) -> ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -> exists u v. z + 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 = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1) -> exists z2. (~(P * S ((S (S k)) * c) = 0) /\ ((forall i. (exists h. h + i = S k) -> exists q. P * S ((S (S k)) * c) = S ((S i) * c) * q) /\ ((forall i a. (exists h. h + i = S k) -> ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -> exists u v. z2 + S ((S i) * c) * u = a + S ((S i) * c) * v) /\ forall j. (exists g. g + S (S k) = j) -> (exists h. h + j = N) -> forall d. (exists u. P * S ((S (S k)) * c) = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1)))
use beta_accumulated_product_step
use beta_crt_prefix_congruence_step
intro N
intro c
intro b
intro k
intro P
intro z
intro hcm
intro hkN
intro hP
intro hdiv
intro hcong
intro hfuture
have hproduct : (~(P * S ((S (S k)) * c) = 0) /\ ((forall i. (exists h. h + i = S k) -> exists q. P * S ((S (S k)) * c) = S ((S i) * c) * q) /\ forall j. (exists g. g + S (S k) = j) -> (exists h. h + j = N) -> forall d. (exists u. P * S ((S (S k)) * c) = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1))
specialize beta_accumulated_product_step N
specialize beta_accumulated_product_step c
specialize beta_accumulated_product_step k
specialize beta_accumulated_product_step P
apply beta_accumulated_product_step
exact hcm
exact hkN
exact hP
exact hdiv
exact hfuture
have hcodes : exists z2. forall i a. (exists h. h + i = S k) -> ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -> exists u v. z2 + S ((S i) * c) * u = a + S ((S i) * c) * v
specialize beta_crt_prefix_congruence_step N
specialize beta_crt_prefix_congruence_step c
specialize beta_crt_prefix_congruence_step b
specialize beta_crt_prefix_congruence_step k
specialize beta_crt_prefix_congruence_step P
specialize beta_crt_prefix_congruence_step z
apply beta_crt_prefix_congruence_step
exact hkN
exact hP
exact hdiv
exact hcong
exact hfuture
cases hcodes
cases hproduct
cases hproduct_right
exists x
split
exact hproduct_left
split
exact hproduct_right_left
split
exact hcodes_witness
exact hproduct_right_right
qed
- Occurrences
- 18,613
- Distinct objects
- 3,749
- Reused references
- 186
- Depth
- 70
- Cuts
- 545
- Certificate SHA-256
9cb74ed1e6aa…
bounded_beta_crt_prefix_invariantBounded beta-prefix CRT invariant
β sequences, products & FTA
checked
Concrete ordinary-induction fold of the beta CRT invariant through every bounded prefix.
Exact expanded PA statement
forall N c b. (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 + i = k) -> exists q. P = S ((S i) * c) * q) /\ ((forall i a. (exists h. h + i = k) -> ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -> exists u v. z + 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 = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1)))
Complete replay recipe: dependency imports + authored proof
pa prove forall N c b. (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 + i = k) -> exists q. P = S ((S i) * c) * q) /\ ((forall i a. (exists h. h + i = k) -> ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -> exists u v. z + 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 = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1)))
use beta_modulus_nonzero
use le_zero
use multiple_refl
use beta_at_to_mod_eq
use beta_moduli_coprime_of_lt_bounded_common_multiple
use le_succ_self
use le_trans
use beta_crt_prefix_invariant_step
intro N
intro c
intro b
intro hcm
induction k
intro hkN
exists S ((S 0) * c)
exists b
split
specialize beta_modulus_nonzero c
specialize beta_modulus_nonzero 0
exact beta_modulus_nonzero
split
intro i
intro hi
have hi0 : i = 0
specialize le_zero i
apply le_zero
exact hi
specialize multiple_refl (S ((S 0) * c))
rewrite hi0
exact multiple_refl
split
intro i
intro a
intro hi
intro hati
specialize beta_at_to_mod_eq b
specialize beta_at_to_mod_eq c
specialize beta_at_to_mod_eq i
specialize beta_at_to_mod_eq a
apply beta_at_to_mod_eq
exact hati
intro j
intro h0j
intro hjN
specialize beta_moduli_coprime_of_lt_bounded_common_multiple N
specialize beta_moduli_coprime_of_lt_bounded_common_multiple c
specialize beta_moduli_coprime_of_lt_bounded_common_multiple 0
specialize beta_moduli_coprime_of_lt_bounded_common_multiple j
apply beta_moduli_coprime_of_lt_bounded_common_multiple
exact hcm
exact h0j
exact hjN
intro hkN
have hkprev : exists h. h + k = N
have hkstep : exists h. h + k = S k
specialize le_succ_self k
exact le_succ_self
specialize le_trans k
specialize le_trans (S k)
specialize le_trans N
apply le_trans
exact hkstep
exact hkN
have hprev : exists P z. (~(P = 0) /\ ((forall i. (exists h. h + i = k) -> exists q. P = S ((S i) * c) * q) /\ ((forall i a. (exists h. h + i = k) -> ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -> exists u v. z + 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 = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1)))
apply IH
exact hkprev
cases hprev
cases hprev_witness
cases hprev_witness_witness
cases hprev_witness_witness_right
cases hprev_witness_witness_right_right
have hnext : exists z2. (~(x * S ((S (S k)) * c) = 0) /\ ((forall i. (exists h. h + i = S k) -> exists q. x * S ((S (S k)) * c) = S ((S i) * c) * q) /\ ((forall i a. (exists h. h + i = S k) -> ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -> exists u v. z2 + S ((S i) * c) * u = a + S ((S i) * c) * v) /\ forall j. (exists g. g + S (S k) = j) -> (exists h. h + j = N) -> forall d. (exists u. x * S ((S (S k)) * c) = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1)))
specialize beta_crt_prefix_invariant_step N
specialize beta_crt_prefix_invariant_step c
specialize beta_crt_prefix_invariant_step b
specialize beta_crt_prefix_invariant_step k
specialize beta_crt_prefix_invariant_step x
specialize beta_crt_prefix_invariant_step x1
apply beta_crt_prefix_invariant_step
exact hcm
exact hkN
exact hprev_witness_witness_left
exact hprev_witness_witness_right_left
exact hprev_witness_witness_right_right_left
exact hprev_witness_witness_right_right_right
cases hnext
exists x * S ((S (S k)) * c)
exists x2
exact hnext_witness
qed
- Occurrences
- 25,496
- Distinct objects
- 3,918
- Reused references
- 194
- Depth
- 78
- Cuts
- 752
- Certificate SHA-256
ef961db40c76…
bounded_beta_crt_for_existing_codeBounded CRT witness for an existing beta code
β sequences, products & FTA
checked
Fold-produced bounded CRT witness for residues decoded from an already supplied beta code.
Exact expanded PA statement
forall N c b. (forall t. (exists h. S t + S h = S N) -> exists q. c = S t * q) -> exists z. forall i a. (exists h. h + i = N) -> ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -> exists u v. z + S ((S i) * c) * u = a + S ((S i) * c) * v
Complete replay recipe: dependency imports + authored proof
pa prove forall N c b. (forall t. (exists h. S t + S h = S N) -> exists q. c = S t * q) -> exists z. forall i a. (exists h. h + i = N) -> ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -> exists u v. z + S ((S i) * c) * u = a + S ((S i) * c) * v
use bounded_beta_crt_prefix_invariant
use le_refl
intro N
intro c
intro b
intro hcm
have hfold : exists P z. (~(P = 0) /\ ((forall i. (exists h. h + i = N) -> exists q. P = S ((S i) * c) * q) /\ ((forall i a. (exists h. h + i = N) -> ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -> exists u v. z + S ((S i) * c) * u = a + S ((S i) * c) * v) /\ forall j. (exists g. g + S N = j) -> (exists h. h + j = N) -> forall d. (exists u. P = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1)))
have hall : forall k. (exists h. h + k = N) -> exists P z. (~(P = 0) /\ ((forall i. (exists h. h + i = k) -> exists q. P = S ((S i) * c) * q) /\ ((forall i a. (exists h. h + i = k) -> ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -> exists u v. z + 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 = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1)))
specialize bounded_beta_crt_prefix_invariant N
specialize bounded_beta_crt_prefix_invariant c
specialize bounded_beta_crt_prefix_invariant b
apply bounded_beta_crt_prefix_invariant
exact hcm
specialize hall N
apply hall
specialize le_refl N
exact le_refl
cases hfold
cases hfold_witness
cases hfold_witness_witness
cases hfold_witness_witness_right
cases hfold_witness_witness_right_right
exists x1
exact hfold_witness_witness_right_right_left
qed
- Occurrences
- 25,545
- Distinct objects
- 3,942
- Reused references
- 195
- Depth
- 79
- Cuts
- 755
- Certificate SHA-256
8d9242fe5e07…
prime_unboundedThere is a prime larger than every given natural
Primes
checked
Euclid's common-multiple argument constructs a prime above every natural.
Exact expanded PA statement
forall n. exists p. (exists k. k + S n = p) /\ (~(p = 1) /\ forall a b. p = a * b -> a = 1 \/ b = 1)
Complete replay recipe: dependency imports + authored proof
pa prove forall n. exists p. (exists k. k + S n = p) /\ (~(p = 1) /\ forall a b. p = a * b -> a = 1 \/ b = 1)
use bounded_common_multiple_exists
use prime_divisor_exists
use prime_nonzero
use nonzero_is_succ
use add_succ_left
use add_comm
use divides_remainder
use divisor_one
use mul_one
use le_or_lt
intro n
specialize bounded_common_multiple_exists n
have hcommon : exists c. (~(c = 0) /\ forall t. (exists h. S t + S h = S n) -> exists k. c = S t * k)
exact bounded_common_multiple_exists
cases hcommon
cases hcommon_witness
have hsucc_not_one : ~(S x = 1)
intro hsucc_one
apply hcommon_witness_left
apply PA2
exact hsucc_one
have hprime_divisor : exists p. ((~(p = 1) /\ forall a b. p = a * b -> a = 1 \/ b = 1) /\ exists k. S x = p * k)
specialize prime_divisor_exists (S x)
apply prime_divisor_exists
intro hsucc_zero
apply PA1
exact hsucc_zero
exact hsucc_not_one
cases hprime_divisor
cases hprime_divisor_witness
exists x1
split
have horder : (exists k. k + x1 = n) \/ exists k. k + S n = x1
specialize le_or_lt x1
specialize le_or_lt n
exact le_or_lt
cases horder
exfalso
have hp_nonzero : ~(x1 = 0)
intro hp_zero
specialize prime_nonzero x1
apply prime_nonzero
exact hprime_divisor_witness_left
exact hp_zero
have hp_succ : exists t. x1 = S t
specialize nonzero_is_succ x1
apply nonzero_is_succ
exact hp_nonzero
cases hp_succ
have hp_bounded : exists h. S x2 + S h = S n
cases horder_left
exists x3
rewrite hp_succ_witness at horder_left_witness
trans S (x2 + S x3)
apply add_succ_left
trans S (S (x2 + x3))
congr
apply PA4
trans S (S (x3 + x2))
congr
congr
apply add_comm
trans S (x3 + S x2)
congr
symm
apply PA4
congr
exact horder_left_witness
have hp_divides_common : exists k. x = x1 * k
specialize hcommon_witness_right x2
have hpred_divides : exists k. x = S x2 * k
apply hcommon_witness_right
exact hp_bounded
rewrite hp_succ_witness
exact hpred_divides
have hp_divides_one : exists w. 1 = x1 * w
specialize divides_remainder x1
specialize divides_remainder (S x)
specialize divides_remainder x
specialize divides_remainder 1
specialize divides_remainder 1
apply divides_remainder
exact hprime_divisor_witness_right
exact hp_divides_common
specialize mul_one x
rewrite mul_one
simp
cases hprime_divisor_witness_left
apply hprime_divisor_witness_left_left
specialize divisor_one x1
apply divisor_one
exact hp_divides_one
exact horder_right
exact hprime_divisor_witness_left
qed
- Occurrences
- 4,595
- Distinct objects
- 2,387
- Reused references
- 126
- Depth
- 82
- Cuts
- 146
- Certificate SHA-256
8a44fb2d207c…
beta_value_le_codeA decoded beta value is bounded by its code
β sequences, products & FTA
checked
Every decoded beta value is at most its code.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
intro b
intro c
intro i
intro x
intro hat
cases hat
cases hat_right
exists x1 * S ((S i) * c)
symm
exact hat_right_witness
qed
- Occurrences
- 18
- Distinct objects
- 18
- Reused references
- 0
- Depth
- 13
- Cuts
- 0
- Certificate SHA-256
f037744e9dd7…
base_le_beta_modulusThe beta base is bounded by every beta modulus
β sequences, products & FTA
checked
A beta base is at most every beta modulus over that base.
Exact expanded PA statement
forall c i. exists h. h + c = S ((S i) * c)
Complete replay recipe: dependency imports + authored proof
pa prove forall c i. exists h. h + c = S ((S i) * c)
use le_add_left
use mul_succ_left
use le_succ
intro c
intro i
have hproduct : exists h. h + c = S i * c
specialize mul_succ_left i
specialize mul_succ_left c
rewrite mul_succ_left
specialize le_add_left c
specialize le_add_left (i * c)
exact le_add_left
specialize le_succ c
specialize le_succ (S i * c)
apply le_succ
exact hproduct
qed
- Occurrences
- 233
- Distinct objects
- 189
- Reused references
- 18
- Depth
- 24
- Cuts
- 8
- Certificate SHA-256
cdc7fe6d2ef2…
le_scaled_nonzeroNonzero scaling is monotone
β sequences, products & FTA
checked
Scaling by a nonzero natural does not decrease a natural.
Exact expanded PA statement
forall C B. ~(C = 0) -> exists h. h + B = C * B
Complete replay recipe: dependency imports + authored proof
pa prove forall C B. ~(C = 0) -> exists h. h + B = C * B
use one_le_of_ne_zero
use mul_le_mul_right
use one_mul
intro C
intro B
intro hC
have h1C : exists h. h + 1 = C
specialize one_le_of_ne_zero C
apply one_le_of_ne_zero
exact hC
have hscaled : exists h. h + 1 * B = C * B
specialize mul_le_mul_right 1
specialize mul_le_mul_right C
specialize mul_le_mul_right B
apply mul_le_mul_right
exact h1C
specialize one_mul B
rewrite one_mul at hscaled
exact hscaled
qed
- Occurrences
- 407
- Distinct objects
- 338
- Reused references
- 37
- Depth
- 28
- Cuts
- 13
- Certificate SHA-256
d68bec41b222…
scaled_bounded_common_multipleScaling preserves bounded common multiples
β sequences, products & FTA
checked
A right multiple of a bounded common multiple remains such a common multiple.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use multiple_mul_right
intro N
intro C
intro B
intro hcm
intro t
intro ht
have htC : exists q. C = S t * q
specialize hcm t
apply hcm
exact ht
specialize multiple_mul_right (S t)
specialize multiple_mul_right C
specialize multiple_mul_right B
apply multiple_mul_right
exact htC
qed
- Occurrences
- 147
- Distinct objects
- 135
- Reused references
- 12
- Depth
- 19
- Cuts
- 4
- Certificate SHA-256
c4ce3a408de7…
beta_value_lt_scaled_baseOld decoded values fit the scaled target base
β sequences, products & FTA
checked
An old beta value fits every modulus after a constructive scaled-base rebase.
Exact expanded PA statement
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)))
Complete replay recipe: dependency imports + authored proof
pa prove 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)))
use beta_value_le_code
use le_add_right
use succ_le_succ
use le_trans
use le_scaled_nonzero
use base_le_beta_modulus
intro b
intro c
intro i
intro x
intro C
intro s
intro j
intro hat
intro hC
have hxb : exists h. h + x = b
specialize beta_value_le_code b
specialize beta_value_le_code c
specialize beta_value_le_code i
specialize beta_value_le_code x
apply beta_value_le_code
exact hat
have hbs : exists h. h + b = b + s
specialize le_add_right b
specialize le_add_right s
exact le_add_right
have hxs : exists h. h + x = b + s
specialize le_trans x
specialize le_trans b
specialize le_trans (b + s)
apply le_trans
exact hxb
exact hbs
have hsx : exists h. h + S x = S (b + s)
specialize succ_le_succ x
specialize succ_le_succ (b + s)
apply succ_le_succ
exact hxs
have hscale : exists h. h + S (b + s) = C * S (b + s)
specialize le_scaled_nonzero C
specialize le_scaled_nonzero (S (b + s))
apply le_scaled_nonzero
exact hC
have hxbase : exists h. h + S x = C * S (b + s)
specialize le_trans (S x)
specialize le_trans (S (b + s))
specialize le_trans (C * S (b + s))
apply le_trans
exact hsx
exact hscale
have hmod : exists h. h + C * S (b + s) = S ((S j) * (C * S (b + s)))
specialize base_le_beta_modulus (C * S (b + s))
specialize base_le_beta_modulus j
exact base_le_beta_modulus
specialize le_trans (S x)
specialize le_trans (C * S (b + s))
specialize le_trans (S ((S j) * (C * S (b + s))))
apply le_trans
exact hxbase
exact hmod
qed
- Occurrences
- 863
- Distinct objects
- 489
- Reused references
- 41
- Depth
- 33
- Cuts
- 31
- Certificate SHA-256
05aeb5bdd1f8…
new_value_lt_scaled_baseAn appended value fits the scaled target base
β sequences, products & FTA
checked
The appended value fits every modulus after the same constructive scaled-base rebase.
Exact expanded PA statement
forall b s C j. ~(C = 0) -> exists h. h + S s = S ((S j) * (C * S (b + s)))
Complete replay recipe: dependency imports + authored proof
pa prove forall b s C j. ~(C = 0) -> exists h. h + S s = S ((S j) * (C * S (b + s)))
use le_add_left
use succ_le_succ
use le_scaled_nonzero
use le_trans
use base_le_beta_modulus
intro b
intro s
intro C
intro j
intro hC
have hsb : exists h. h + s = b + s
specialize le_add_left s
specialize le_add_left b
exact le_add_left
have hss : exists h. h + S s = S (b + s)
specialize succ_le_succ s
specialize succ_le_succ (b + s)
apply succ_le_succ
exact hsb
have hscale : exists h. h + S (b + s) = C * S (b + s)
specialize le_scaled_nonzero C
specialize le_scaled_nonzero (S (b + s))
apply le_scaled_nonzero
exact hC
have hsbase : exists h. h + S s = C * S (b + s)
specialize le_trans (S s)
specialize le_trans (S (b + s))
specialize le_trans (C * S (b + s))
apply le_trans
exact hss
exact hscale
have hmod : exists h. h + C * S (b + s) = S ((S j) * (C * S (b + s)))
specialize base_le_beta_modulus (C * S (b + s))
specialize base_le_beta_modulus j
exact base_le_beta_modulus
specialize le_trans (S s)
specialize le_trans (C * S (b + s))
specialize le_trans (S ((S j) * (C * S (b + s))))
apply le_trans
exact hsbase
exact hmod
qed
- Occurrences
- 751
- Distinct objects
- 446
- Reused references
- 41
- Depth
- 31
- Cuts
- 27
- Certificate SHA-256
08fcf3a5d804…
beta_exclusive_accumulated_product_stepExtend an exclusive beta-modulus product invariant
β sequences, products & FTA
checked
Extend the accumulated target-modulus product for an exclusive prefix.
Exact expanded PA statement
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))
Complete replay recipe: dependency imports + authored proof
pa prove 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))
use mul_ne_zero
use right_factor_divides_product
use beta_modulus_nonzero
use le_of_succ_le_succ
use le_eq_or_lt
use multiple_mul_right
use le_succ_self
use le_trans
use lt_to_le
use lt_irrefl_expanded
use beta_moduli_pairwise_coprime_bounded
use coprime_mul_left
intro N
intro c
intro k
intro P
intro hcm
intro hkN
intro hP
intro hdiv
intro hfuture
have hnew : ~(S ((S k) * c) = 0)
specialize beta_modulus_nonzero c
specialize beta_modulus_nonzero k
exact beta_modulus_nonzero
split
specialize mul_ne_zero P
specialize mul_ne_zero (S ((S k) * c))
intro hzero
apply mul_ne_zero
exact hP
exact hnew
exact hzero
split
intro i
intro hi
have hik : exists r. r + i = k
specialize le_of_succ_le_succ i
specialize le_of_succ_le_succ k
apply le_of_succ_le_succ
exact hi
have hsplit : i = k \/ exists r. r + S i = k
specialize le_eq_or_lt i
specialize le_eq_or_lt k
apply le_eq_or_lt
exact hik
cases hsplit
rewrite hsplit_left
specialize right_factor_divides_product P
specialize right_factor_divides_product (S ((S k) * c))
exact right_factor_divides_product
have hiP : exists q. P = S ((S i) * c) * q
specialize hdiv i
apply hdiv
exact hsplit_right
specialize multiple_mul_right (S ((S i) * c))
specialize multiple_mul_right P
specialize multiple_mul_right (S ((S k) * c))
apply multiple_mul_right
exact hiP
intro j
intro hSkj
intro hjN
have hkj : exists r. r + k = j
have hkSk : exists r. r + k = S k
specialize le_succ_self k
exact le_succ_self
specialize le_trans k
specialize le_trans (S k)
specialize le_trans j
apply le_trans
exact hkSk
exact hSkj
have hPj : forall d. (exists u. P = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1
specialize hfuture j
apply hfuture
exact hkj
exact hjN
have hneq : ~(k = j)
intro heq
rewrite <- heq at hSkj
specialize lt_irrefl_expanded k
apply lt_irrefl_expanded
exact hSkj
have hkbound : exists r. r + k = N
specialize lt_to_le k
specialize lt_to_le N
apply lt_to_le
exact hkN
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
specialize beta_moduli_pairwise_coprime_bounded N
specialize beta_moduli_pairwise_coprime_bounded c
apply beta_moduli_pairwise_coprime_bounded
exact hcm
have hnewj : forall d. (exists u. S ((S k) * c) = d * u) -> (exists v. S ((S j) * c) = d * v) -> d = 1
specialize hpairs k
specialize hpairs j
apply hpairs
exact hneq
exact hkbound
exact hjN
specialize coprime_mul_left P
specialize coprime_mul_left (S ((S k) * c))
specialize coprime_mul_left (S ((S j) * c))
apply coprime_mul_left
exact hPj
exact hnewj
qed
- Occurrences
- 11,222
- Distinct objects
- 2,345
- Reused references
- 137
- Depth
- 70
- Cuts
- 332
- Certificate SHA-256
1833bd103225…
beta_exclusive_recode_congruence_stepExtend exclusive cross-base beta congruences
β sequences, products & FTA
checked
Add the next source value to a target-base CRT code for an exclusive prefix.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use beta_modulus_nonzero
use le_refl
use lt_to_le
use binary_crt_fold_step
use beta_at_exists
use beta_at_unique
use le_of_succ_le_succ
use le_eq_or_lt
intro N
intro c
intro b
intro e
intro k
intro P
intro z
intro hkN
intro hP
intro hdiv
intro hcong
intro hfuture
have hnew : ~(S ((S k) * c) = 0)
specialize beta_modulus_nonzero c
specialize beta_modulus_nonzero k
exact beta_modulus_nonzero
have hkbound : exists h. h + k = N
specialize lt_to_le k
specialize lt_to_le N
apply lt_to_le
exact hkN
have hcop : forall d. (exists u. P = d * u) -> (exists v. S ((S k) * c) = d * v) -> d = 1
specialize hfuture k
apply hfuture
specialize le_refl k
exact le_refl
exact hkbound
have hvalue : exists a. ((exists h. h + S a = S ((S k) * e)) /\ exists q. b = q * S ((S k) * e) + a)
specialize beta_at_exists b
specialize beta_at_exists e
specialize beta_at_exists k
exact beta_at_exists
cases hvalue
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)
specialize binary_crt_fold_step P
specialize binary_crt_fold_step (S ((S k) * c))
specialize binary_crt_fold_step z
specialize binary_crt_fold_step x
apply binary_crt_fold_step
exact hP
exact hnew
exact hcop
cases hfold
cases hfold_witness
exists x1
intro i
intro a
intro hi
intro hati
have hik : exists r. r + i = k
specialize le_of_succ_le_succ i
specialize le_of_succ_le_succ k
apply le_of_succ_le_succ
exact hi
have hsplit : i = k \/ exists r. r + S i = k
specialize le_eq_or_lt i
specialize le_eq_or_lt k
apply le_eq_or_lt
exact hik
cases hsplit
have hati_new : ((exists h. h + S a = S ((S k) * e)) /\ exists q. b = q * S ((S k) * e) + a)
rewrite <- hsplit_left
rewrite <- hsplit_left
exact hati
have haeq : a = x
specialize beta_at_unique b
specialize beta_at_unique e
specialize beta_at_unique k
specialize beta_at_unique a
specialize beta_at_unique x
apply beta_at_unique
exact hati_new
exact hvalue_witness
rewrite hsplit_left
rewrite hsplit_left
rewrite haeq
exact hfold_witness_right
have hmiP : exists q. P = S ((S i) * c) * q
specialize hdiv i
apply hdiv
exact hsplit_right
have hzold : exists u v. z + S ((S i) * c) * u = a + S ((S i) * c) * v
specialize hcong i
specialize hcong a
apply hcong
exact hsplit_right
exact hati
specialize hfold_witness_left (S ((S i) * c))
specialize hfold_witness_left a
apply hfold_witness_left
exact hmiP
exact hzold
qed
- Occurrences
- 7,398
- Distinct objects
- 2,583
- Reused references
- 130
- Depth
- 65
- Cuts
- 215
- Certificate SHA-256
282847b6bbba…
beta_exclusive_recode_invariant_stepOne exclusive beta-recoding invariant step
β sequences, products & FTA
checked
Combine modulus-product and cross-base congruence updates for an exclusive prefix.
Exact expanded PA statement
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)))
Complete replay recipe: dependency imports + authored proof
pa prove 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)))
use beta_exclusive_accumulated_product_step
use beta_exclusive_recode_congruence_step
intro N
intro c
intro b
intro e
intro k
intro P
intro z
intro hcm
intro hkN
intro hP
intro hdiv
intro hcong
intro hfuture
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))
specialize beta_exclusive_accumulated_product_step N
specialize beta_exclusive_accumulated_product_step c
specialize beta_exclusive_accumulated_product_step k
specialize beta_exclusive_accumulated_product_step P
apply beta_exclusive_accumulated_product_step
exact hcm
exact hkN
exact hP
exact hdiv
exact hfuture
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
specialize beta_exclusive_recode_congruence_step N
specialize beta_exclusive_recode_congruence_step c
specialize beta_exclusive_recode_congruence_step b
specialize beta_exclusive_recode_congruence_step e
specialize beta_exclusive_recode_congruence_step k
specialize beta_exclusive_recode_congruence_step P
specialize beta_exclusive_recode_congruence_step z
apply beta_exclusive_recode_congruence_step
exact hkN
exact hP
exact hdiv
exact hcong
exact hfuture
cases hcodes
cases hproduct
cases hproduct_right
exists x
split
exact hproduct_left
split
exact hproduct_right_left
split
exact hcodes_witness
exact hproduct_right_right
qed
- Occurrences
- 18,709
- Distinct objects
- 3,750
- Reused references
- 188
- Depth
- 71
- Cuts
- 549
- Certificate SHA-256
1057ae7a6b5e…
bounded_beta_exclusive_recode_invariantBounded exclusive beta-recoding invariant
β sequences, products & FTA
checked
Fold an empty-based, exclusive beta prefix into another base with append readiness.
Exact expanded PA statement
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)))
Complete replay recipe: dependency imports + authored proof
pa prove 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)))
use succ_ne_zero
use add_eq_zero_right
use coprime_one_left
use le_succ_self
use le_trans
use beta_exclusive_recode_invariant_step
intro N
intro c
intro b
intro e
intro hcm
induction k
intro hkN
exists 1
exists 0
split
specialize succ_ne_zero 0
exact succ_ne_zero
split
intro i
intro hi
exfalso
cases hi
have hsi0 : S i = 0
specialize add_eq_zero_right x
specialize add_eq_zero_right (S i)
apply add_eq_zero_right
exact hi_witness
specialize succ_ne_zero i
apply succ_ne_zero
exact hsi0
split
intro i
intro a
intro hi
intro hati
exfalso
cases hi
have hsi0 : S i = 0
specialize add_eq_zero_right x
specialize add_eq_zero_right (S i)
apply add_eq_zero_right
exact hi_witness
specialize succ_ne_zero i
apply succ_ne_zero
exact hsi0
intro j
intro h0j
intro hjN
intro d
intro h1
intro hm
specialize coprime_one_left (S ((S j) * c))
specialize coprime_one_left d
apply coprime_one_left
exact h1
exact hm
intro hkN
have hkprev : exists h. h + k = N
have hkstep : exists h. h + k = S k
specialize le_succ_self k
exact le_succ_self
specialize le_trans k
specialize le_trans (S k)
specialize le_trans N
apply le_trans
exact hkstep
exact hkN
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)))
apply IH
exact hkprev
cases hprev
cases hprev_witness
cases hprev_witness_witness
cases hprev_witness_witness_right
cases hprev_witness_witness_right_right
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)))
specialize beta_exclusive_recode_invariant_step N
specialize beta_exclusive_recode_invariant_step c
specialize beta_exclusive_recode_invariant_step b
specialize beta_exclusive_recode_invariant_step e
specialize beta_exclusive_recode_invariant_step k
specialize beta_exclusive_recode_invariant_step x
specialize beta_exclusive_recode_invariant_step x1
apply beta_exclusive_recode_invariant_step
exact hcm
exact hkN
exact hprev_witness_witness_left
exact hprev_witness_witness_right_left
exact hprev_witness_witness_right_right_left
exact hprev_witness_witness_right_right_right
cases hnext
exists x * S ((S k) * c)
exists x2
exact hnext_witness
qed
- Occurrences
- 19,155
- Distinct objects
- 3,873
- Reused references
- 193
- Depth
- 77
- Cuts
- 563
- Certificate SHA-256
2c9541dd49fb…
beta_prefix_extendRecode and append one exact beta-prefix value
β sequences, products & FTA
checked
Rebase an arbitrary decoded prefix and append one exact natural value.
Exact expanded PA statement
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))
Complete replay recipe: dependency imports + authored proof
pa prove 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))
use bounded_common_multiple_exists
use scaled_bounded_common_multiple
use bounded_beta_exclusive_recode_invariant
use le_refl
use beta_modulus_nonzero
use binary_crt_fold_step
use new_value_lt_scaled_base
use beta_value_lt_scaled_base
use beta_at_of_mod_eq_bound
intro k
intro b
intro e
intro s
have hC : exists C. (~(C = 0) /\ forall t. (exists h. S t + S h = S k) -> exists q. C = S t * q)
specialize bounded_common_multiple_exists k
exact bounded_common_multiple_exists
cases hC
cases hC_witness
have hcm2 : forall t. (exists h. S t + S h = S k) -> exists q. x * S (b + s) = S t * q
specialize scaled_bounded_common_multiple k
specialize scaled_bounded_common_multiple x
specialize scaled_bounded_common_multiple (S (b + s))
apply scaled_bounded_common_multiple
exact hC_witness_right
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)))
specialize bounded_beta_exclusive_recode_invariant k
specialize bounded_beta_exclusive_recode_invariant (x * S (b + s))
specialize bounded_beta_exclusive_recode_invariant b
specialize bounded_beta_exclusive_recode_invariant e
apply bounded_beta_exclusive_recode_invariant
exact hcm2
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)))
specialize hall k
apply hall
specialize le_refl k
exact le_refl
cases hinv
cases hinv_witness
cases hinv_witness_witness
cases hinv_witness_witness_right
cases hinv_witness_witness_right_right
have hcop : forall d. (exists u. x1 = d * u) -> (exists v. S ((S k) * (x * S (b + s))) = d * v) -> d = 1
specialize hinv_witness_witness_right_right_right k
apply hinv_witness_witness_right_right_right
specialize le_refl k
exact le_refl
specialize le_refl k
exact le_refl
have hnew0 : ~(S ((S k) * (x * S (b + s))) = 0)
specialize beta_modulus_nonzero (x * S (b + s))
specialize beta_modulus_nonzero k
exact beta_modulus_nonzero
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)
specialize binary_crt_fold_step x1
specialize binary_crt_fold_step (S ((S k) * (x * S (b + s))))
specialize binary_crt_fold_step x2
specialize binary_crt_fold_step s
apply binary_crt_fold_step
exact hinv_witness_witness_left
exact hnew0
exact hcop
cases hfold
cases hfold_witness
exists x3
exists x * S (b + s)
split
specialize beta_at_of_mod_eq_bound x3
specialize beta_at_of_mod_eq_bound (x * S (b + s))
specialize beta_at_of_mod_eq_bound k
specialize beta_at_of_mod_eq_bound s
apply beta_at_of_mod_eq_bound
specialize new_value_lt_scaled_base b
specialize new_value_lt_scaled_base s
specialize new_value_lt_scaled_base x
specialize new_value_lt_scaled_base k
apply new_value_lt_scaled_base
exact hC_witness_left
exact hfold_witness_right
intro i
intro a
intro hi
intro hati
have hmi : exists q. x1 = S ((S i) * (x * S (b + s))) * q
specialize hinv_witness_witness_right_left i
apply hinv_witness_witness_right_left
exact hi
have hzold : exists u v. x2 + S ((S i) * (x * S (b + s))) * u = a + S ((S i) * (x * S (b + s))) * v
specialize hinv_witness_witness_right_right_left i
specialize hinv_witness_witness_right_right_left a
apply hinv_witness_witness_right_right_left
exact hi
exact hati
have hznew : exists u v. x3 + S ((S i) * (x * S (b + s))) * u = a + S ((S i) * (x * S (b + s))) * v
specialize hfold_witness_left (S ((S i) * (x * S (b + s))))
specialize hfold_witness_left a
apply hfold_witness_left
exact hmi
exact hzold
specialize beta_at_of_mod_eq_bound x3
specialize beta_at_of_mod_eq_bound (x * S (b + s))
specialize beta_at_of_mod_eq_bound i
specialize beta_at_of_mod_eq_bound a
apply beta_at_of_mod_eq_bound
specialize beta_value_lt_scaled_base b
specialize beta_value_lt_scaled_base e
specialize beta_value_lt_scaled_base i
specialize beta_value_lt_scaled_base a
specialize beta_value_lt_scaled_base x
specialize beta_value_lt_scaled_base s
specialize beta_value_lt_scaled_base i
apply beta_value_lt_scaled_base
exact hati
exact hC_witness_left
exact hznew
qed
- Occurrences
- 29,057
- Distinct objects
- 4,508
- Reused references
- 225
- Depth
- 80
- Cuts
- 867
- Certificate SHA-256
511d3bde3fc4…
beta_prefix_product_trace_existsExact beta-coded prefix-product trace exists
β sequences, products & FTA
checked
Every decoded beta factor prefix admits a beta-coded exact prefix-product trace.
Exact expanded PA statement
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))))
Complete replay recipe: dependency imports + authored proof
pa prove 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))))
use beta_at_self_of_bound
use add_eq_zero_right
use succ_ne_zero
use beta_at_exists
use beta_prefix_extend
use zero_le
use succ_le_succ
use le_refl
use le_of_succ_le_succ
use le_eq_or_lt
use one_mul
intro b
intro c
induction l
exists 1
exists 1
split
specialize beta_at_self_of_bound 1
specialize beta_at_self_of_bound 0
specialize beta_at_self_of_bound 1
apply beta_at_self_of_bound
specialize one_mul 1
rewrite one_mul
specialize le_refl 2
exact le_refl
intro i
intro hi
exfalso
cases hi
have hsi0 : S i = 0
specialize add_eq_zero_right x
specialize add_eq_zero_right (S i)
apply add_eq_zero_right
exact hi_witness
specialize succ_ne_zero i
apply succ_ne_zero
exact hsi0
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))))
apply IH
cases htrace
cases htrace_witness
cases htrace_witness_witness
have hfactor : exists p. ((exists h. h + S p = S ((S l) * c)) /\ exists q. b = q * S ((S l) * c) + p)
specialize beta_at_exists b
specialize beta_at_exists c
specialize beta_at_exists l
exact beta_at_exists
cases hfactor
have hlast : exists r. ((exists h. h + S r = S ((S l) * x1)) /\ exists q. x = q * S ((S l) * x1) + r)
specialize beta_at_exists x
specialize beta_at_exists x1
specialize beta_at_exists l
exact beta_at_exists
cases hlast
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))
specialize beta_prefix_extend (S l)
specialize beta_prefix_extend x
specialize beta_prefix_extend x1
specialize beta_prefix_extend (x3 * x2)
exact beta_prefix_extend
cases hext
cases hext_witness
cases hext_witness_witness
exists x4
exists x5
split
specialize hext_witness_witness_right 0
specialize hext_witness_witness_right 1
apply hext_witness_witness_right
have h0 : exists h. h + S 0 = S l
have hzero : exists h. h + 0 = l
specialize zero_le l
exact zero_le
specialize succ_le_succ 0
specialize succ_le_succ l
apply succ_le_succ
exact hzero
exact h0
exact htrace_witness_witness_left
intro i
intro hi
have hil : exists h. h + i = l
specialize le_of_succ_le_succ i
specialize le_of_succ_le_succ l
apply le_of_succ_le_succ
exact hi
have hsplit : i = l \/ exists h. h + S i = l
specialize le_eq_or_lt i
specialize le_eq_or_lt l
apply le_eq_or_lt
exact hil
cases hsplit
exists x2
exists x3
exists x3 * x2
split
rewrite hsplit_left
rewrite hsplit_left
exact hfactor_witness
split
rewrite hsplit_left
rewrite hsplit_left
specialize hext_witness_witness_right l
specialize hext_witness_witness_right x3
apply hext_witness_witness_right
specialize le_refl (S l)
exact le_refl
exact hlast_witness
split
rewrite hsplit_left
rewrite hsplit_left
exact hext_witness_witness_left
refl
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)))
specialize htrace_witness_witness_right i
apply htrace_witness_witness_right
exact hsplit_right
cases hold
cases hold_witness
cases hold_witness_witness
cases hold_witness_witness_witness
cases hold_witness_witness_witness_right
cases hold_witness_witness_witness_right_right
exists x6
exists x7
exists x8
split
exact hold_witness_witness_witness_left
split
specialize hext_witness_witness_right i
specialize hext_witness_witness_right x7
apply hext_witness_witness_right
exact hi
exact hold_witness_witness_witness_right_left
split
specialize hext_witness_witness_right (S i)
specialize hext_witness_witness_right x8
apply hext_witness_witness_right
specialize succ_le_succ (S i)
specialize succ_le_succ l
apply succ_le_succ
exact hsplit_right
exact hold_witness_witness_witness_right_right_left
exact hold_witness_witness_witness_right_right_right
qed
- Occurrences
- 29,981
- Distinct objects
- 4,717
- Reused references
- 235
- Depth
- 85
- Cuts
- 899
- Certificate SHA-256
0dd19ccc0b06…
beta_product_existsRelational finite beta product exists
β sequences, products & FTA
checked
Every finite decoded beta prefix has an exact relational product and a coded trace.
Exact expanded PA statement
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)))))
Complete replay recipe: dependency imports + authored proof
pa prove 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)))))
use beta_prefix_product_trace_exists
use beta_at_exists
intro b
intro c
intro l
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))))
specialize beta_prefix_product_trace_exists b
specialize beta_prefix_product_trace_exists c
specialize beta_prefix_product_trace_exists l
exact beta_prefix_product_trace_exists
cases htrace
cases htrace_witness
cases htrace_witness_witness
have hterminal : exists n. ((exists h. h + S n = S ((S l) * x1)) /\ exists q. x = q * S ((S l) * x1) + n)
specialize beta_at_exists x
specialize beta_at_exists x1
specialize beta_at_exists l
exact beta_at_exists
cases hterminal
exists x2
exists x
exists x1
split
exact htrace_witness_witness_left
split
exact hterminal_witness
exact htrace_witness_witness_right
qed
- Occurrences
- 30,487
- Distinct objects
- 4,744
- Reused references
- 236
- Depth
- 86
- Cuts
- 916
- Certificate SHA-256
6656c8e6b7f3…
beta_product_functionalFinite beta Product is functional
β sequences, products & FTA
checked
The fully expanded beta-coded Product relation is functional in its terminal product.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use beta_at_unique
use le_refl
use le_succ
use mul_congr
intro b
intro c
induction l
intro n
intro u
intro v
intro m
intro w
intro d
intro h1
intro h2
cases h1
cases h1_right
cases h2
cases h2_right
have hn : n = 1
specialize beta_at_unique u
specialize beta_at_unique v
specialize beta_at_unique 0
specialize beta_at_unique n
specialize beta_at_unique 1
apply beta_at_unique
exact h1_right_left
exact h1_left
have hm : m = 1
specialize beta_at_unique w
specialize beta_at_unique d
specialize beta_at_unique 0
specialize beta_at_unique m
specialize beta_at_unique 1
apply beta_at_unique
exact h2_right_left
exact h2_left
trans 1
exact hn
symm
exact hm
intro n
intro u
intro v
intro m
intro w
intro d
intro h1
intro h2
cases h1
cases h1_right
cases h2
cases h2_right
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)))
specialize h1_right_right l
apply h1_right_right
specialize le_refl (S l)
exact le_refl
cases hstep1
cases hstep1_witness
cases hstep1_witness_witness
cases hstep1_witness_witness_witness
cases hstep1_witness_witness_witness_right
cases hstep1_witness_witness_witness_right_right
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)))
specialize h2_right_right l
apply h2_right_right
specialize le_refl (S l)
exact le_refl
cases hstep2
cases hstep2_witness
cases hstep2_witness_witness
cases hstep2_witness_witness_witness
cases hstep2_witness_witness_witness_right
cases hstep2_witness_witness_witness_right_right
have hn : n = x2
specialize beta_at_unique u
specialize beta_at_unique v
specialize beta_at_unique (S l)
specialize beta_at_unique n
specialize beta_at_unique x2
apply beta_at_unique
exact h1_right_left
exact hstep1_witness_witness_witness_right_right_left
have hm : m = x5
specialize beta_at_unique w
specialize beta_at_unique d
specialize beta_at_unique (S l)
specialize beta_at_unique m
specialize beta_at_unique x5
apply beta_at_unique
exact h2_right_left
exact hstep2_witness_witness_witness_right_right_left
have hp : x = x3
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique l
specialize beta_at_unique x
specialize beta_at_unique x3
apply beta_at_unique
exact hstep1_witness_witness_witness_left
exact hstep2_witness_witness_witness_left
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)))))
split
exact h1_left
split
exact hstep1_witness_witness_witness_right_left
intro i
intro hi
specialize h1_right_right i
apply h1_right_right
specialize le_succ (S i)
specialize le_succ l
apply le_succ
exact hi
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)))))
split
exact h2_left
split
exact hstep2_witness_witness_witness_right_left
intro i
intro hi
specialize h2_right_right i
apply h2_right_right
specialize le_succ (S i)
specialize le_succ l
apply le_succ
exact hi
have hprev : x1 = x4
specialize IH x1
specialize IH u
specialize IH v
specialize IH x4
specialize IH w
specialize IH d
apply IH
exact hprod1
exact hprod2
have hmul : x1 * x = x4 * x3
specialize mul_congr x1
specialize mul_congr x4
specialize mul_congr x
specialize mul_congr x3
apply mul_congr
exact hprev
exact hp
trans x2
exact hn
trans x1 * x
exact hstep1_witness_witness_witness_right_right_right
trans x4 * x3
exact hmul
trans x5
symm
exact hstep2_witness_witness_witness_right_right_right
symm
exact hm
qed
- Occurrences
- 1,382
- Distinct objects
- 909
- Reused references
- 39
- Depth
- 60
- Cuts
- 36
- Certificate SHA-256
12a5727a4593…
beta_product_exists_uniqueA unique finite beta Product exists
β sequences, products & FTA
checked
Every finite decoded beta prefix has exactly one relational product value.
Exact expanded PA statement
forall b c l. exists 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 m. (exists w d. (((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)
Complete replay recipe: dependency imports + authored proof
pa prove forall b c l. exists 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 m. (exists w d. (((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)
use beta_product_exists
use beta_product_functional
intro b
intro c
intro l
have hex : 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)))))
specialize beta_product_exists b
specialize beta_product_exists c
specialize beta_product_exists l
exact beta_product_exists
cases hex
cases hex_witness
cases hex_witness_witness
exists x
split
exists x1
exists x2
exact hex_witness_witness_witness
intro m
intro hm
cases hm
cases hm_witness
specialize beta_product_functional b
specialize beta_product_functional c
specialize beta_product_functional l
specialize beta_product_functional x
specialize beta_product_functional x1
specialize beta_product_functional x2
specialize beta_product_functional m
specialize beta_product_functional x3
specialize beta_product_functional x4
apply beta_product_functional
exact hex_witness_witness_witness
exact hm_witness_witness
qed
- Occurrences
- 31,908
- Distinct objects
- 4,979
- Reused references
- 239
- Depth
- 87
- Cuts
- 954
- Certificate SHA-256
7a2e26c9d930…
beta_product_zeroThe empty beta Product is one
β sequences, products & FTA
checked
The product of an empty decoded prefix is one.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use beta_at_unique
intro b
intro c
intro n
intro hproduct
cases hproduct
cases hproduct_witness
cases hproduct_witness_witness
cases hproduct_witness_witness_right
specialize beta_at_unique x
specialize beta_at_unique x1
specialize beta_at_unique 0
specialize beta_at_unique n
specialize beta_at_unique 1
apply beta_at_unique
exact hproduct_witness_witness_right_left
exact hproduct_witness_witness_left
qed
- Occurrences
- 1,171
- Distinct objects
- 742
- Reused references
- 37
- Depth
- 60
- Cuts
- 31
- Certificate SHA-256
63088511aac2…
beta_product_succ_decomposeDecompose a successor beta Product
β sequences, products & FTA
checked
A successor product decomposes into its prefix product and final decoded factor.
Exact expanded PA statement
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))
Complete replay recipe: dependency imports + authored proof
pa prove 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))
use le_refl
use le_succ
use beta_at_unique
intro b
intro c
intro l
intro n
intro hproduct
cases hproduct
cases hproduct_witness
cases hproduct_witness_witness
cases hproduct_witness_witness_right
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)))
specialize hproduct_witness_witness_right_right l
apply hproduct_witness_witness_right_right
specialize le_refl (S l)
exact le_refl
cases hstep
cases hstep_witness
cases hstep_witness_witness
cases hstep_witness_witness_witness
cases hstep_witness_witness_witness_right
cases hstep_witness_witness_witness_right_right
have hn : n = x4
specialize beta_at_unique x
specialize beta_at_unique x1
specialize beta_at_unique (S l)
specialize beta_at_unique n
specialize beta_at_unique x4
apply beta_at_unique
exact hproduct_witness_witness_right_left
exact hstep_witness_witness_witness_right_right_left
exists x2
exists x3
split
exact hstep_witness_witness_witness_left
split
exists x
exists x1
split
exact hproduct_witness_witness_left
split
exact hstep_witness_witness_witness_right_left
intro i
intro hi
specialize hproduct_witness_witness_right_right i
apply hproduct_witness_witness_right_right
specialize le_succ (S i)
specialize le_succ l
apply le_succ
exact hi
trans x4
exact hn
exact hstep_witness_witness_witness_right_right_right
qed
- Occurrences
- 1,257
- Distinct objects
- 784
- Reused references
- 39
- Depth
- 62
- Cuts
- 35
- Certificate SHA-256
2a5502bdcf73…
beta_product_succ_appendAppend one factor to a beta Product
β sequences, products & FTA
checked
Append one decoded factor to an existing fully expanded Product witness.
Exact expanded PA statement
forall b c l r 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)))))) -> ((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 * p) = S ((S S l) * v)) /\ exists q. u = q * S ((S S l) * v) + (r * p)) /\ 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))))))
Complete replay recipe: dependency imports + authored proof
pa prove forall b c l r 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)))))) -> ((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 * p) = S ((S S l) * v)) /\ exists q. u = q * S ((S S l) * v) + (r * p)) /\ 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))))))
use beta_prefix_extend
use zero_le
use succ_le_succ
use le_refl
use le_of_succ_le_succ
use le_eq_or_lt
intro b
intro c
intro l
intro r
intro p
intro hproduct
intro hp
cases hproduct
cases hproduct_witness
cases hproduct_witness_witness
cases hproduct_witness_witness_right
have hext : exists z d. (((exists h. h + S (r * p) = S ((S S l) * d)) /\ exists q. z = q * S ((S S l) * d) + (r * p)) /\ 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) * d)) /\ exists q. z = q * S ((S i) * d) + a))
specialize beta_prefix_extend (S l)
specialize beta_prefix_extend x
specialize beta_prefix_extend x1
specialize beta_prefix_extend (r * p)
exact beta_prefix_extend
cases hext
cases hext_witness
cases hext_witness_witness
exists x2
exists x3
split
specialize hext_witness_witness_right 0
specialize hext_witness_witness_right 1
apply hext_witness_witness_right
have hzero : exists h. h + 0 = l
specialize zero_le l
exact zero_le
specialize succ_le_succ 0
specialize succ_le_succ l
apply succ_le_succ
exact hzero
exact hproduct_witness_witness_left
split
exact hext_witness_witness_left
intro i
intro hi
have hil : exists h. h + i = l
specialize le_of_succ_le_succ i
specialize le_of_succ_le_succ l
apply le_of_succ_le_succ
exact hi
have hsplit : i = l \/ exists h. h + S i = l
specialize le_eq_or_lt i
specialize le_eq_or_lt l
apply le_eq_or_lt
exact hil
cases hsplit
exists p
exists r
exists r * p
split
rewrite hsplit_left
rewrite hsplit_left
exact hp
split
rewrite hsplit_left
rewrite hsplit_left
specialize hext_witness_witness_right l
specialize hext_witness_witness_right r
apply hext_witness_witness_right
specialize le_refl (S l)
exact le_refl
exact hproduct_witness_witness_right_left
split
rewrite hsplit_left
rewrite hsplit_left
exact hext_witness_witness_left
refl
have hold : exists p0 r0 s0. (((exists h. h + S p0 = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p0) /\ (((exists h. h + S r0 = S ((S i) * x1)) /\ exists q. x = q * S ((S i) * x1) + r0) /\ (((exists h. h + S s0 = S ((S S i) * x1)) /\ exists q. x = q * S ((S S i) * x1) + s0) /\ s0 = r0 * p0)))
specialize hproduct_witness_witness_right_right i
apply hproduct_witness_witness_right_right
exact hsplit_right
cases hold
cases hold_witness
cases hold_witness_witness
cases hold_witness_witness_witness
cases hold_witness_witness_witness_right
cases hold_witness_witness_witness_right_right
exists x4
exists x5
exists x6
split
exact hold_witness_witness_witness_left
split
specialize hext_witness_witness_right i
specialize hext_witness_witness_right x5
apply hext_witness_witness_right
exact hi
exact hold_witness_witness_witness_right_left
split
specialize hext_witness_witness_right (S i)
specialize hext_witness_witness_right x6
apply hext_witness_witness_right
specialize succ_le_succ (S i)
specialize succ_le_succ l
apply succ_le_succ
exact hsplit_right
exact hold_witness_witness_witness_right_right_left
exact hold_witness_witness_witness_right_right_right
qed
- Occurrences
- 29,360
- Distinct objects
- 4,659
- Reused references
- 229
- Depth
- 81
- Cuts
- 877
- Certificate SHA-256
ffa7ace29cd7…
beta_product_transport_prefixTransport Product across an extensionally preserved factor prefix
β sequences, products & FTA
checked
One-way extensional factor-prefix preservation transports Product without changing its trace.
Exact expanded PA statement
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))))))
Complete replay recipe: dependency imports + authored proof
pa prove 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))))))
intro b
intro c
intro z
intro e
intro l
intro n
intro hproduct
intro hpres
cases hproduct
cases hproduct_witness
cases hproduct_witness_witness
cases hproduct_witness_witness_right
exists x
exists x1
split
exact hproduct_witness_witness_left
split
exact hproduct_witness_witness_right_left
intro i
intro hi
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)))
specialize hproduct_witness_witness_right_right i
apply hproduct_witness_witness_right_right
exact hi
cases hstep
cases hstep_witness
cases hstep_witness_witness
cases hstep_witness_witness_witness
cases hstep_witness_witness_witness_right
cases hstep_witness_witness_witness_right_right
exists x2
exists x3
exists x4
split
specialize hpres i
specialize hpres x2
apply hpres
exact hi
exact hstep_witness_witness_witness_left
split
exact hstep_witness_witness_witness_right_left
split
exact hstep_witness_witness_witness_right_right_left
exact hstep_witness_witness_witness_right_right_right
qed
- Occurrences
- 59
- Distinct objects
- 59
- Reused references
- 0
- Depth
- 29
- Cuts
- 0
- Certificate SHA-256
4c40f0a22c7a…
beta_factor_prefix_product_appendExtend a factor prefix and Product together
β sequences, products & FTA
checked
Extend a factor prefix by p and simultaneously append p to its exact Product.
Exact expanded PA statement
forall b c l r 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)))))) -> exists z e. (((exists h. h + S p = S ((S l) * e)) /\ exists q. z = q * S ((S l) * e) + 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 (r * p) = S ((S S l) * v)) /\ exists q. u = q * S ((S S l) * v) + (r * p)) /\ forall i. (exists h. h + S i = S 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))))))))
Complete replay recipe: dependency imports + authored proof
pa prove forall b c l r 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)))))) -> exists z e. (((exists h. h + S p = S ((S l) * e)) /\ exists q. z = q * S ((S l) * e) + 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 (r * p) = S ((S S l) * v)) /\ exists q. u = q * S ((S S l) * v) + (r * p)) /\ forall i. (exists h. h + S i = S 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))))))))
use beta_prefix_extend
use beta_product_transport_prefix
use zero_le
use succ_le_succ
use le_refl
use le_of_succ_le_succ
use le_eq_or_lt
intro b
intro c
intro l
intro r
intro p
intro hproduct
have hfactor_ext : exists z e. (((exists h. h + S p = S ((S l) * e)) /\ exists q. z = q * S ((S l) * e) + 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))
specialize beta_prefix_extend l
specialize beta_prefix_extend b
specialize beta_prefix_extend c
specialize beta_prefix_extend p
exact beta_prefix_extend
cases hfactor_ext
cases hfactor_ext_witness
cases hfactor_ext_witness_witness
have htransport : 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) * x1)) /\ exists q. x = q * S ((S i) * x1) + 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)))))
specialize beta_product_transport_prefix b
specialize beta_product_transport_prefix c
specialize beta_product_transport_prefix x
specialize beta_product_transport_prefix x1
specialize beta_product_transport_prefix l
specialize beta_product_transport_prefix r
apply beta_product_transport_prefix
exact hproduct
exact hfactor_ext_witness_witness_right
cases htransport
cases htransport_witness
cases htransport_witness_witness
cases htransport_witness_witness_right
have htrace_ext : exists u v. (((exists h. h + S (r * p) = S ((S S l) * v)) /\ exists q. u = q * S ((S S l) * v) + (r * p)) /\ forall i a. (exists h. h + S i = S l) -> ((exists h. h + S a = S ((S i) * x3)) /\ exists q. x2 = q * S ((S i) * x3) + a) -> ((exists h. h + S a = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + a))
specialize beta_prefix_extend (S l)
specialize beta_prefix_extend x2
specialize beta_prefix_extend x3
specialize beta_prefix_extend (r * p)
exact beta_prefix_extend
cases htrace_ext
cases htrace_ext_witness
cases htrace_ext_witness_witness
exists x
exists x1
split
exact hfactor_ext_witness_witness_left
split
exact hfactor_ext_witness_witness_right
exists x4
exists x5
split
specialize htrace_ext_witness_witness_right 0
specialize htrace_ext_witness_witness_right 1
apply htrace_ext_witness_witness_right
have hzero : exists h. h + 0 = l
specialize zero_le l
exact zero_le
specialize succ_le_succ 0
specialize succ_le_succ l
apply succ_le_succ
exact hzero
exact htransport_witness_witness_left
split
exact htrace_ext_witness_witness_left
intro i
intro hi
have hil : exists h. h + i = l
specialize le_of_succ_le_succ i
specialize le_of_succ_le_succ l
apply le_of_succ_le_succ
exact hi
have hsplit : i = l \/ exists h. h + S i = l
specialize le_eq_or_lt i
specialize le_eq_or_lt l
apply le_eq_or_lt
exact hil
cases hsplit
exists p
exists r
exists r * p
split
rewrite hsplit_left
rewrite hsplit_left
exact hfactor_ext_witness_witness_left
split
rewrite hsplit_left
rewrite hsplit_left
specialize htrace_ext_witness_witness_right l
specialize htrace_ext_witness_witness_right r
apply htrace_ext_witness_witness_right
specialize le_refl (S l)
exact le_refl
exact htransport_witness_witness_right_left
split
rewrite hsplit_left
rewrite hsplit_left
exact htrace_ext_witness_witness_left
refl
have hold : exists p0 r0 s0. (((exists h. h + S p0 = S ((S i) * x1)) /\ exists q. x = q * S ((S i) * x1) + p0) /\ (((exists h. h + S r0 = S ((S i) * x3)) /\ exists q. x2 = q * S ((S i) * x3) + r0) /\ (((exists h. h + S s0 = S ((S S i) * x3)) /\ exists q. x2 = q * S ((S S i) * x3) + s0) /\ s0 = r0 * p0)))
specialize htransport_witness_witness_right_right i
apply htransport_witness_witness_right_right
exact hsplit_right
cases hold
cases hold_witness
cases hold_witness_witness
cases hold_witness_witness_witness
cases hold_witness_witness_witness_right
cases hold_witness_witness_witness_right_right
exists x6
exists x7
exists x8
split
exact hold_witness_witness_witness_left
split
specialize htrace_ext_witness_witness_right i
specialize htrace_ext_witness_witness_right x7
apply htrace_ext_witness_witness_right
exact hi
exact hold_witness_witness_witness_right_left
split
specialize htrace_ext_witness_witness_right (S i)
specialize htrace_ext_witness_witness_right x8
apply htrace_ext_witness_witness_right
specialize succ_le_succ (S i)
specialize succ_le_succ l
apply succ_le_succ
exact hsplit_right
exact hold_witness_witness_witness_right_right_left
exact hold_witness_witness_witness_right_right_right
qed
- Occurrences
- 29,447
- Distinct objects
- 4,746
- Reused references
- 229
- Depth
- 81
- Cuts
- 878
- Certificate SHA-256
ee15cbf39071…
all_prime_emptyAllPrime holds on the empty beta prefix
β sequences, products & FTA
checked
The fully expanded AllPrime predicate holds vacuously on the empty prefix.
Exact expanded PA statement
forall b c. (forall i. (exists h. h + S i = 0) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1)))
Complete replay recipe: dependency imports + authored proof
pa prove forall b c. (forall i. (exists h. h + S i = 0) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1)))
use add_eq_zero_right
use succ_ne_zero
intro b
intro c
intro i
intro hi
exfalso
cases hi
have hzero : S i = 0
specialize add_eq_zero_right x
specialize add_eq_zero_right (S i)
apply add_eq_zero_right
exact hi_witness
specialize succ_ne_zero i
apply succ_ne_zero
exact hzero
qed
- Occurrences
- 37
- Distinct objects
- 37
- Reused references
- 0
- Depth
- 13
- Cuts
- 2
- Certificate SHA-256
17228ed7fa9b…
all_prime_succ_introExtend AllPrime across one beta entry
β sequences, products & FTA
checked
Append one explicitly decoded prime to an AllPrime prefix.
Exact expanded PA statement
forall b c l p. (forall i. (exists h. h + S i = l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) -> (((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1)) -> (forall i. (exists h. h + S i = S l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1)))
Complete replay recipe: dependency imports + authored proof
pa prove forall b c l p. (forall i. (exists h. h + S i = l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) -> (((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1)) -> (forall i. (exists h. h + S i = S l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1)))
use le_of_succ_le_succ
use le_eq_or_lt
intro b
intro c
intro l
intro p
intro hprev
intro hlast
cases hlast
intro i
intro hi
have hil : exists h. h + i = l
specialize le_of_succ_le_succ i
specialize le_of_succ_le_succ l
apply le_of_succ_le_succ
exact hi
have hsplit : i = l \/ exists h. h + S i = l
specialize le_eq_or_lt i
specialize le_eq_or_lt l
apply le_eq_or_lt
exact hil
cases hsplit
exists p
split
rewrite hsplit_left
rewrite hsplit_left
exact hlast_left
exact hlast_right
specialize hprev i
apply hprev
exact hsplit_right
qed
- Occurrences
- 150
- Distinct objects
- 146
- Reused references
- 4
- Depth
- 21
- Cuts
- 5
- Certificate SHA-256
7905f0e448fd…
all_prime_succ_elim_prefixProject AllPrime to the previous beta prefix
β sequences, products & FTA
checked
Restrict an AllPrime successor prefix to its old prefix.
Exact expanded PA statement
forall b c l. (forall i. (exists h. h + S i = S l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) -> (forall i. (exists h. h + S i = l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1)))
Complete replay recipe: dependency imports + authored proof
pa prove forall b c l. (forall i. (exists h. h + S i = S l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) -> (forall i. (exists h. h + S i = l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1)))
use le_succ
intro b
intro c
intro l
intro hall
intro i
intro hi
specialize hall i
apply hall
specialize le_succ (S i)
specialize le_succ l
apply le_succ
exact hi
qed
- Occurrences
- 64
- Distinct objects
- 62
- Reused references
- 2
- Depth
- 16
- Cuts
- 2
- Certificate SHA-256
0126509667dc…
all_prime_succ_elim_lastExtract the last prime from AllPrime
β sequences, products & FTA
checked
Extract the final decoded prime from an AllPrime successor prefix.
Exact expanded PA statement
forall b c l. (forall i. (exists h. h + S i = S l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) -> exists p. (((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))
Complete replay recipe: dependency imports + authored proof
pa prove forall b c l. (forall i. (exists h. h + S i = S l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) -> exists p. (((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))
use le_refl
intro b
intro c
intro l
intro hall
specialize hall l
apply hall
specialize le_refl (S l)
exact le_refl
qed
- Occurrences
- 41
- Distinct objects
- 41
- Reused references
- 0
- Depth
- 11
- Cuts
- 2
- Certificate SHA-256
a36af944a569…
all_prime_transportTransport AllPrime across beta recoding
β sequences, products & FTA
checked
Transport AllPrime across pointwise value-preserving beta recoding.
Exact expanded PA statement
forall b c z d l. (forall i. (exists h. h + S i = l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) -> (forall i p. (exists h. h + S i = l) -> ((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) -> ((exists h. h + S p = S ((S i) * d)) /\ exists w. z = w * S ((S i) * d) + p)) -> (forall i. (exists h. h + S i = l) -> exists p. (((exists h. h + S p = S ((S i) * d)) /\ exists w. z = w * S ((S i) * d) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1)))
Complete replay recipe: dependency imports + authored proof
pa prove forall b c z d l. (forall i. (exists h. h + S i = l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) -> (forall i p. (exists h. h + S i = l) -> ((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) -> ((exists h. h + S p = S ((S i) * d)) /\ exists w. z = w * S ((S i) * d) + p)) -> (forall i. (exists h. h + S i = l) -> exists p. (((exists h. h + S p = S ((S i) * d)) /\ exists w. z = w * S ((S i) * d) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1)))
intro b
intro c
intro z
intro d
intro l
intro hall
intro htransport
intro i
intro hi
have hp : exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))
specialize hall i
apply hall
exact hi
cases hp
cases hp_witness
exists x
split
specialize htransport i
specialize htransport x
apply htransport
exact hi
exact hp_witness_left
exact hp_witness_right
qed
- Occurrences
- 26
- Distinct objects
- 26
- Reused references
- 0
- Depth
- 17
- Cuts
- 0
- Certificate SHA-256
4abed2d820d8…
sorted_emptyAdjacent Sorted holds on the empty beta prefix
β sequences, products & FTA
checked
The fully expanded Sorted predicate holds vacuously on the empty prefix.
Exact expanded PA statement
forall b c. (forall i. (exists h. h + S (S i) = 0) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))
Complete replay recipe: dependency imports + authored proof
pa prove forall b c. (forall i. (exists h. h + S (S i) = 0) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))
use le_zero
use succ_ne_zero
intro b
intro c
intro i
intro hi
exfalso
have hzero : S (S i) = 0
specialize le_zero (S (S i))
apply le_zero
exact hi
specialize succ_ne_zero (S i)
apply succ_ne_zero
exact hzero
qed
- Occurrences
- 44
- Distinct objects
- 44
- Reused references
- 0
- Depth
- 14
- Cuts
- 3
- Certificate SHA-256
a3dc87fe88e5…
sorted_singletonAdjacent Sorted holds on a singleton beta prefix
β sequences, products & FTA
checked
The fully expanded Sorted predicate holds vacuously on every singleton prefix.
Exact expanded PA statement
forall b c. (forall i. (exists h. h + S (S i) = 1) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))
Complete replay recipe: dependency imports + authored proof
pa prove forall b c. (forall i. (exists h. h + S (S i) = 1) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))
use le_of_succ_le_succ
use le_zero
use succ_ne_zero
intro b
intro c
intro i
intro hi
exfalso
have hzero_le : exists h. h + S i = 0
specialize le_of_succ_le_succ (S i)
specialize le_of_succ_le_succ 0
apply le_of_succ_le_succ
exact hi
have hzero : S i = 0
specialize le_zero (S i)
apply le_zero
exact hzero_le
specialize succ_ne_zero i
apply succ_ne_zero
exact hzero
qed
- Occurrences
- 65
- Distinct objects
- 65
- Reused references
- 0
- Depth
- 15
- Cuts
- 4
- Certificate SHA-256
844e77f2d4bb…
sorted_succ_introExtend adjacent Sorted across one beta entry
β sequences, products & FTA
checked
Append one ordered adjacent pair to a nonempty Sorted prefix.
Exact expanded PA statement
forall b c l p q. (forall i. (exists h. h + S (S i) = S l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -> ((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) -> ((exists h. h + S q = S ((S S l) * c)) /\ exists w. b = w * S ((S S l) * c) + q) -> (exists h. h + p = q) -> (forall i. (exists h. h + S (S i) = S (S l)) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))
Complete replay recipe: dependency imports + authored proof
pa prove forall b c l p q. (forall i. (exists h. h + S (S i) = S l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -> ((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) -> ((exists h. h + S q = S ((S S l) * c)) /\ exists w. b = w * S ((S S l) * c) + q) -> (exists h. h + p = q) -> (forall i. (exists h. h + S (S i) = S (S l)) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))
use le_of_succ_le_succ
use le_eq_or_lt
use succ_le_succ
intro b
intro c
intro l
intro p
intro q
intro hprev
intro hp
intro hq
intro hpq
intro i
intro hi
have hisl : exists h. h + S i = S l
specialize le_of_succ_le_succ (S i)
specialize le_of_succ_le_succ (S l)
apply le_of_succ_le_succ
exact hi
have hil : exists h. h + i = l
specialize le_of_succ_le_succ i
specialize le_of_succ_le_succ l
apply le_of_succ_le_succ
exact hisl
have hsplit : i = l \/ exists h. h + S i = l
specialize le_eq_or_lt i
specialize le_eq_or_lt l
apply le_eq_or_lt
exact hil
cases hsplit
exists p
exists q
split
rewrite hsplit_left
rewrite hsplit_left
exact hp
split
rewrite hsplit_left
rewrite hsplit_left
exact hq
exact hpq
specialize hprev i
apply hprev
specialize succ_le_succ (S i)
specialize succ_le_succ l
apply succ_le_succ
exact hsplit_right
qed
- Occurrences
- 182
- Distinct objects
- 178
- Reused references
- 4
- Depth
- 23
- Cuts
- 6
- Certificate SHA-256
8c5d249ae99a…
sorted_succ_elim_prefixProject adjacent Sorted to the previous beta prefix
β sequences, products & FTA
checked
Restrict a Sorted successor prefix to its old prefix.
Exact expanded PA statement
forall b c l. (forall i. (exists h. h + S (S i) = S l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -> (forall i. (exists h. h + S (S i) = l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))
Complete replay recipe: dependency imports + authored proof
pa prove forall b c l. (forall i. (exists h. h + S (S i) = S l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -> (forall i. (exists h. h + S (S i) = l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))
use le_succ
intro b
intro c
intro l
intro hsorted
intro i
intro hi
specialize hsorted i
apply hsorted
specialize le_succ (S (S i))
specialize le_succ l
apply le_succ
exact hi
qed
- Occurrences
- 64
- Distinct objects
- 62
- Reused references
- 2
- Depth
- 16
- Cuts
- 2
- Certificate SHA-256
1fe322c40f9f…
sorted_succ_elim_lastExtract the last adjacent order witness
β sequences, products & FTA
checked
Extract the final adjacent ordered pair from a Sorted prefix of length at least two.
Exact expanded PA statement
forall b c l. (forall i. (exists h. h + S (S i) = S (S l)) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -> exists p q. (((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) /\ (((exists h. h + S q = S ((S S l) * c)) /\ exists w. b = w * S ((S S l) * c) + q) /\ (exists h. h + p = q)))
Complete replay recipe: dependency imports + authored proof
pa prove forall b c l. (forall i. (exists h. h + S (S i) = S (S l)) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -> exists p q. (((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) /\ (((exists h. h + S q = S ((S S l) * c)) /\ exists w. b = w * S ((S S l) * c) + q) /\ (exists h. h + p = q)))
use le_refl
intro b
intro c
intro l
intro hsorted
specialize hsorted l
apply hsorted
specialize le_refl (S (S l))
exact le_refl
qed
- Occurrences
- 41
- Distinct objects
- 41
- Reused references
- 0
- Depth
- 11
- Cuts
- 2
- Certificate SHA-256
96d1e00a0d95…
sorted_transportTransport adjacent Sorted across beta recoding
β sequences, products & FTA
checked
Transport Sorted across pointwise value-preserving beta recoding.
Exact expanded PA statement
forall b c z d l. (forall i. (exists h. h + S (S i) = l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -> (forall i p. (exists h. h + S i = l) -> ((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) -> ((exists h. h + S p = S ((S i) * d)) /\ exists w. z = w * S ((S i) * d) + p)) -> (forall i. (exists h. h + S (S i) = l) -> exists p q. (((exists h. h + S p = S ((S i) * d)) /\ exists w. z = w * S ((S i) * d) + p) /\ (((exists h. h + S q = S ((S S i) * d)) /\ exists w. z = w * S ((S S i) * d) + q) /\ (exists h. h + p = q))))
Complete replay recipe: dependency imports + authored proof
pa prove forall b c z d l. (forall i. (exists h. h + S (S i) = l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -> (forall i p. (exists h. h + S i = l) -> ((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) -> ((exists h. h + S p = S ((S i) * d)) /\ exists w. z = w * S ((S i) * d) + p)) -> (forall i. (exists h. h + S (S i) = l) -> exists p q. (((exists h. h + S p = S ((S i) * d)) /\ exists w. z = w * S ((S i) * d) + p) /\ (((exists h. h + S q = S ((S S i) * d)) /\ exists w. z = w * S ((S S i) * d) + q) /\ (exists h. h + p = q))))
use lt_to_le
intro b
intro c
intro z
intro d
intro l
intro hsorted
intro htransport
intro i
intro hi
have hpq : exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))
specialize hsorted i
apply hsorted
exact hi
cases hpq
cases hpq_witness
cases hpq_witness_witness
cases hpq_witness_witness_right
have hii : exists h. h + S i = l
specialize lt_to_le (S i)
specialize lt_to_le l
apply lt_to_le
exact hi
exists x
exists x1
split
specialize htransport i
specialize htransport x
apply htransport
exact hii
exact hpq_witness_witness_left
split
specialize htransport (S i)
specialize htransport x1
apply htransport
exact hi
exact hpq_witness_witness_right_left
exact hpq_witness_witness_right_right
qed
- Occurrences
- 89
- Distinct objects
- 87
- Reused references
- 2
- Depth
- 21
- Cuts
- 2
- Certificate SHA-256
a9cf8c461f4f…
beta_prefix_extend_all_primeRecode a beta prefix and preserve AllPrime
β sequences, products & FTA
checked
Recode a beta prefix, preserve all old primes, and append one exact prime.
Exact expanded PA statement
forall k b e s. (forall i. (exists h. h + S i = k) -> exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. b = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) -> (~(s = 1) /\ forall a d. s = a * d -> a = 1 \/ d = 1) -> exists z c. ((((exists h. h + S s = S ((S k) * c)) /\ exists w. z = w * S ((S k) * c) + s) /\ forall i a. (exists h. h + S i = k) -> ((exists h. h + S a = S ((S i) * e)) /\ exists w. b = w * S ((S i) * e) + a) -> ((exists h. h + S a = S ((S i) * c)) /\ exists w. z = w * S ((S i) * c) + a)) /\ (forall i. (exists h. h + S i = S k) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. z = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))))
Complete replay recipe: dependency imports + authored proof
pa prove forall k b e s. (forall i. (exists h. h + S i = k) -> exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. b = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) -> (~(s = 1) /\ forall a d. s = a * d -> a = 1 \/ d = 1) -> exists z c. ((((exists h. h + S s = S ((S k) * c)) /\ exists w. z = w * S ((S k) * c) + s) /\ forall i a. (exists h. h + S i = k) -> ((exists h. h + S a = S ((S i) * e)) /\ exists w. b = w * S ((S i) * e) + a) -> ((exists h. h + S a = S ((S i) * c)) /\ exists w. z = w * S ((S i) * c) + a)) /\ (forall i. (exists h. h + S i = S k) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. z = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))))
use beta_prefix_extend
use all_prime_transport
use all_prime_succ_intro
intro k
intro b
intro e
intro s
intro hall
intro hs
have hext : exists z c. (((exists h. h + S s = S ((S k) * c)) /\ exists w. z = w * S ((S k) * c) + s) /\ forall i a. (exists h. h + S i = k) -> ((exists h. h + S a = S ((S i) * e)) /\ exists w. b = w * S ((S i) * e) + a) -> ((exists h. h + S a = S ((S i) * c)) /\ exists w. z = w * S ((S i) * c) + a))
specialize beta_prefix_extend k
specialize beta_prefix_extend b
specialize beta_prefix_extend e
specialize beta_prefix_extend s
exact beta_prefix_extend
cases hext
cases hext_witness
cases hext_witness_witness
have hnew : (forall i. (exists h. h + S i = k) -> exists p. (((exists h. h + S p = S ((S i) * x1)) /\ exists w. x = w * S ((S i) * x1) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1)))
specialize all_prime_transport b
specialize all_prime_transport e
specialize all_prime_transport x
specialize all_prime_transport x1
specialize all_prime_transport k
apply all_prime_transport
exact hall
exact hext_witness_witness_right
exists x
exists x1
split
split
exact hext_witness_witness_left
exact hext_witness_witness_right
specialize all_prime_succ_intro x
specialize all_prime_succ_intro x1
specialize all_prime_succ_intro k
specialize all_prime_succ_intro s
apply all_prime_succ_intro
exact hnew
split
exact hext_witness_witness_left
exact hs
qed
- Occurrences
- 29,280
- Distinct objects
- 4,617
- Reused references
- 227
- Depth
- 81
- Cuts
- 875
- Certificate SHA-256
c99644a6fbf8…
beta_prefix_extend_sorted_singletonRecode an empty prefix into a sorted singleton
β sequences, products & FTA
checked
Append the first value to an empty code; the resulting singleton is Sorted.
Exact expanded PA statement
forall b e s. exists z c. ((((exists h. h + S s = S ((S 0) * c)) /\ exists w. z = w * S ((S 0) * c) + s) /\ forall i a. (exists h. h + S i = 0) -> ((exists h. h + S a = S ((S i) * e)) /\ exists w. b = w * S ((S i) * e) + a) -> ((exists h. h + S a = S ((S i) * c)) /\ exists w. z = w * S ((S i) * c) + a)) /\ (forall i. (exists h. h + S (S i) = 1) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. z = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. z = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))))
Complete replay recipe: dependency imports + authored proof
pa prove forall b e s. exists z c. ((((exists h. h + S s = S ((S 0) * c)) /\ exists w. z = w * S ((S 0) * c) + s) /\ forall i a. (exists h. h + S i = 0) -> ((exists h. h + S a = S ((S i) * e)) /\ exists w. b = w * S ((S i) * e) + a) -> ((exists h. h + S a = S ((S i) * c)) /\ exists w. z = w * S ((S i) * c) + a)) /\ (forall i. (exists h. h + S (S i) = 1) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. z = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. z = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))))
use beta_prefix_extend
use sorted_singleton
intro b
intro e
intro s
have hext : exists z c. (((exists h. h + S s = S ((S 0) * c)) /\ exists w. z = w * S ((S 0) * c) + s) /\ forall i a. (exists h. h + S i = 0) -> ((exists h. h + S a = S ((S i) * e)) /\ exists w. b = w * S ((S i) * e) + a) -> ((exists h. h + S a = S ((S i) * c)) /\ exists w. z = w * S ((S i) * c) + a))
specialize beta_prefix_extend 0
specialize beta_prefix_extend b
specialize beta_prefix_extend e
specialize beta_prefix_extend s
exact beta_prefix_extend
cases hext
cases hext_witness
cases hext_witness_witness
exists x
exists x1
split
split
exact hext_witness_witness_left
exact hext_witness_witness_right
specialize sorted_singleton x
specialize sorted_singleton x1
exact sorted_singleton
qed
- Occurrences
- 29,146
- Distinct objects
- 4,551
- Reused references
- 228
- Depth
- 81
- Cuts
- 873
- Certificate SHA-256
5750ecab9c2a…
beta_prefix_extend_sorted_succRecode a nonempty prefix and preserve adjacent Sorted
β sequences, products & FTA
checked
Recode a nonempty Sorted prefix and append a value above its former last value.
Exact expanded PA statement
forall l b e s p. (forall i. (exists h. h + S (S i) = S l) -> exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. b = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. b = w * S ((S S i) * e) + q) /\ (exists h. h + p = q)))) -> ((exists h. h + S p = S ((S l) * e)) /\ exists w. b = w * S ((S l) * e) + p) -> (exists h. h + p = s) -> exists z c. ((((exists h. h + S s = S ((S S l) * c)) /\ exists w. z = w * S ((S S l) * c) + s) /\ forall i a. (exists h. h + S i = S l) -> ((exists h. h + S a = S ((S i) * e)) /\ exists w. b = w * S ((S i) * e) + a) -> ((exists h. h + S a = S ((S i) * c)) /\ exists w. z = w * S ((S i) * c) + a)) /\ (forall i. (exists h. h + S (S i) = S (S l)) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. z = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. z = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))))
Complete replay recipe: dependency imports + authored proof
pa prove forall l b e s p. (forall i. (exists h. h + S (S i) = S l) -> exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. b = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. b = w * S ((S S i) * e) + q) /\ (exists h. h + p = q)))) -> ((exists h. h + S p = S ((S l) * e)) /\ exists w. b = w * S ((S l) * e) + p) -> (exists h. h + p = s) -> exists z c. ((((exists h. h + S s = S ((S S l) * c)) /\ exists w. z = w * S ((S S l) * c) + s) /\ forall i a. (exists h. h + S i = S l) -> ((exists h. h + S a = S ((S i) * e)) /\ exists w. b = w * S ((S i) * e) + a) -> ((exists h. h + S a = S ((S i) * c)) /\ exists w. z = w * S ((S i) * c) + a)) /\ (forall i. (exists h. h + S (S i) = S (S l)) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. z = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. z = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))))
use beta_prefix_extend
use sorted_transport
use sorted_succ_intro
use le_refl
intro l
intro b
intro e
intro s
intro p
intro hsorted
intro hp
intro hps
have hext : exists z c. (((exists h. h + S s = S ((S S l) * c)) /\ exists w. z = w * S ((S S l) * c) + s) /\ forall i a. (exists h. h + S i = S l) -> ((exists h. h + S a = S ((S i) * e)) /\ exists w. b = w * S ((S i) * e) + a) -> ((exists h. h + S a = S ((S i) * c)) /\ exists w. z = w * S ((S i) * c) + a))
specialize beta_prefix_extend (S l)
specialize beta_prefix_extend b
specialize beta_prefix_extend e
specialize beta_prefix_extend s
exact beta_prefix_extend
cases hext
cases hext_witness
cases hext_witness_witness
have hnewsorted : (forall i. (exists h. h + S (S i) = S l) -> exists p q. (((exists h. h + S p = S ((S i) * x1)) /\ exists w. x = w * S ((S i) * x1) + p) /\ (((exists h. h + S q = S ((S S i) * x1)) /\ exists w. x = w * S ((S S i) * x1) + q) /\ (exists h. h + p = q))))
specialize sorted_transport b
specialize sorted_transport e
specialize sorted_transport x
specialize sorted_transport x1
specialize sorted_transport (S l)
apply sorted_transport
exact hsorted
exact hext_witness_witness_right
have hnewp : ((exists h. h + S p = S ((S l) * x1)) /\ exists w. x = w * S ((S l) * x1) + p)
specialize hext_witness_witness_right l
specialize hext_witness_witness_right p
apply hext_witness_witness_right
specialize le_refl (S l)
exact le_refl
exact hp
exists x
exists x1
split
split
exact hext_witness_witness_left
exact hext_witness_witness_right
specialize sorted_succ_intro x
specialize sorted_succ_intro x1
specialize sorted_succ_intro l
specialize sorted_succ_intro p
specialize sorted_succ_intro s
apply sorted_succ_intro
exact hnewsorted
exact hnewp
exact hext_witness_witness_left
exact hps
qed
- Occurrences
- 29,414
- Distinct objects
- 4,669
- Reused references
- 230
- Depth
- 81
- Cuts
- 880
- Certificate SHA-256
eb120eb89de0…
beta_canonical_append_emptyCanonical first-prime append
β sequences, products & FTA
checked
Append the first prime using the canonical shared-code factor/Product append helper.
Exact expanded PA statement
forall b c s. (~(s = 1) /\ forall a d. s = a * d -> a = 1 \/ d = 1) -> (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ forall i. (exists h. h + S i = 0) -> exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -> exists z e. (((exists h. h + S s = S ((S 0) * e)) /\ exists w. z = w * S ((S 0) * e) + s) /\ ((forall i a. (exists h. h + S i = 0) -> ((exists h. h + S a = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + a) -> ((exists h. h + S a = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + a)) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S s = S ((S 1) * v)) /\ exists w. u = w * S ((S 1) * v) + s) /\ forall i. (exists h. h + S i = 1) -> exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = 1) -> exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S (S i) = 1) -> exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. z = w * S ((S S i) * e) + q) /\ (exists h. h + p = q))))))))
Complete replay recipe: dependency imports + authored proof
pa prove forall b c s. (~(s = 1) /\ forall a d. s = a * d -> a = 1 \/ d = 1) -> (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ forall i. (exists h. h + S i = 0) -> exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -> exists z e. (((exists h. h + S s = S ((S 0) * e)) /\ exists w. z = w * S ((S 0) * e) + s) /\ ((forall i a. (exists h. h + S i = 0) -> ((exists h. h + S a = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + a) -> ((exists h. h + S a = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + a)) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S s = S ((S 1) * v)) /\ exists w. u = w * S ((S 1) * v) + s) /\ forall i. (exists h. h + S i = 1) -> exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = 1) -> exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S (S i) = 1) -> exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. z = w * S ((S S i) * e) + q) /\ (exists h. h + p = q))))))))
use beta_factor_prefix_product_append
use all_prime_empty
use all_prime_succ_intro
use sorted_singleton
use one_mul
intro b
intro c
intro s
intro hs
intro hproduct
have hext : exists z e. (((exists h. h + S s = S ((S 0) * e)) /\ exists w. z = w * S ((S 0) * e) + s) /\ ((forall i a. (exists h. h + S i = 0) -> ((exists h. h + S a = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + a) -> ((exists h. h + S a = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + a)) /\ (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S (1 * s) = S ((S 1) * v)) /\ exists w. u = w * S ((S 1) * v) + (1 * s)) /\ forall i. (exists h. h + S i = 1) -> exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p))))))))
specialize beta_factor_prefix_product_append b
specialize beta_factor_prefix_product_append c
specialize beta_factor_prefix_product_append 0
specialize beta_factor_prefix_product_append 1
specialize beta_factor_prefix_product_append s
apply beta_factor_prefix_product_append
exact hproduct
cases hext
cases hext_witness
cases hext_witness_witness
cases hext_witness_witness_right
have hproduct_s : exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S s = S ((S 1) * v)) /\ exists w. u = w * S ((S 1) * v) + s) /\ forall i. (exists h. h + S i = 1) -> exists p r s. (((exists h. h + S p = S ((S i) * x1)) /\ exists w. x = w * S ((S i) * x1) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))
specialize one_mul s
rewrite one_mul at hext_witness_witness_right_right
rewrite one_mul at hext_witness_witness_right_right
exact hext_witness_witness_right_right
have hall : (forall i. (exists h. h + S i = 1) -> exists p. (((exists h. h + S p = S ((S i) * x1)) /\ exists w. x = w * S ((S i) * x1) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1)))
specialize all_prime_succ_intro x
specialize all_prime_succ_intro x1
specialize all_prime_succ_intro 0
specialize all_prime_succ_intro s
apply all_prime_succ_intro
specialize all_prime_empty x
specialize all_prime_empty x1
exact all_prime_empty
split
exact hext_witness_witness_left
exact hs
exists x
exists x1
split
exact hext_witness_witness_left
split
exact hext_witness_witness_right_left
split
exact hproduct_s
split
exact hall
specialize sorted_singleton x
specialize sorted_singleton x1
exact sorted_singleton
qed
- Occurrences
- 29,783
- Distinct objects
- 4,876
- Reused references
- 237
- Depth
- 82
- Cuts
- 894
- Certificate SHA-256
e89975bab8db…
beta_canonical_append_succCanonical ordered-prime append
β sequences, products & FTA
checked
Append one ordered prime using the canonical shared-code factor/Product append helper.
Exact expanded PA statement
forall l b c n s p. (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S S l) * v)) /\ exists w. u = w * 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 w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -> (forall i. (exists h. h + S i = S l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) -> (forall i. (exists h. h + S (S i) = S l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -> ((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) -> (exists h. h + p = s) -> (~(s = 1) /\ forall a d. s = a * d -> a = 1 \/ d = 1) -> exists z e. (((exists h. h + S s = S ((S S l) * e)) /\ exists w. z = w * S ((S S l) * e) + s) /\ ((forall i a. (exists h. h + S i = S l) -> ((exists h. h + S a = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + a) -> ((exists h. h + S a = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + a)) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S (n * s) = S ((S S (S l)) * v)) /\ exists w. u = w * S ((S S (S l)) * v) + (n * s)) /\ forall i. (exists h. h + S i = S (S l)) -> exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = S (S l)) -> exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S (S i) = S (S l)) -> exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. z = w * S ((S S i) * e) + q) /\ (exists h. h + p = q))))))))
Complete replay recipe: dependency imports + authored proof
pa prove forall l b c n s p. (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S S l) * v)) /\ exists w. u = w * 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 w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -> (forall i. (exists h. h + S i = S l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) -> (forall i. (exists h. h + S (S i) = S l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -> ((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) -> (exists h. h + p = s) -> (~(s = 1) /\ forall a d. s = a * d -> a = 1 \/ d = 1) -> exists z e. (((exists h. h + S s = S ((S S l) * e)) /\ exists w. z = w * S ((S S l) * e) + s) /\ ((forall i a. (exists h. h + S i = S l) -> ((exists h. h + S a = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + a) -> ((exists h. h + S a = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + a)) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S (n * s) = S ((S S (S l)) * v)) /\ exists w. u = w * S ((S S (S l)) * v) + (n * s)) /\ forall i. (exists h. h + S i = S (S l)) -> exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = S (S l)) -> exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S (S i) = S (S l)) -> exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. z = w * S ((S S i) * e) + q) /\ (exists h. h + p = q))))))))
use beta_factor_prefix_product_append
use all_prime_transport
use all_prime_succ_intro
use sorted_transport
use sorted_succ_intro
use le_refl
intro l
intro b
intro c
intro n
intro s
intro p
intro hproduct
intro hall
intro hsorted
intro hp
intro hps
intro hs
have hext : exists z e. (((exists h. h + S s = S ((S S l) * e)) /\ exists w. z = w * S ((S S l) * e) + s) /\ ((forall i a. (exists h. h + S i = S l) -> ((exists h. h + S a = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + a) -> ((exists h. h + S a = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + a)) /\ (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S (n * s) = S ((S S (S l)) * v)) /\ exists w. u = w * S ((S S (S l)) * v) + (n * s)) /\ forall i. (exists h. h + S i = S (S l)) -> exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p))))))))
specialize beta_factor_prefix_product_append b
specialize beta_factor_prefix_product_append c
specialize beta_factor_prefix_product_append (S l)
specialize beta_factor_prefix_product_append n
specialize beta_factor_prefix_product_append s
apply beta_factor_prefix_product_append
exact hproduct
cases hext
cases hext_witness
cases hext_witness_witness
cases hext_witness_witness_right
have hnew_all_prefix : (forall i. (exists h. h + S i = S l) -> exists p. (((exists h. h + S p = S ((S i) * x1)) /\ exists w. x = w * S ((S i) * x1) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1)))
specialize all_prime_transport b
specialize all_prime_transport c
specialize all_prime_transport x
specialize all_prime_transport x1
specialize all_prime_transport (S l)
apply all_prime_transport
exact hall
exact hext_witness_witness_right_left
have hnew_all : (forall i. (exists h. h + S i = S (S l)) -> exists p. (((exists h. h + S p = S ((S i) * x1)) /\ exists w. x = w * S ((S i) * x1) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1)))
specialize all_prime_succ_intro x
specialize all_prime_succ_intro x1
specialize all_prime_succ_intro (S l)
specialize all_prime_succ_intro s
apply all_prime_succ_intro
exact hnew_all_prefix
split
exact hext_witness_witness_left
exact hs
have hnew_sorted_prefix : (forall i. (exists h. h + S (S i) = S l) -> exists p q. (((exists h. h + S p = S ((S i) * x1)) /\ exists w. x = w * S ((S i) * x1) + p) /\ (((exists h. h + S q = S ((S S i) * x1)) /\ exists w. x = w * S ((S S i) * x1) + q) /\ (exists h. h + p = q))))
specialize sorted_transport b
specialize sorted_transport c
specialize sorted_transport x
specialize sorted_transport x1
specialize sorted_transport (S l)
apply sorted_transport
exact hsorted
exact hext_witness_witness_right_left
have hnewp : ((exists h. h + S p = S ((S l) * x1)) /\ exists w. x = w * S ((S l) * x1) + p)
specialize hext_witness_witness_right_left l
specialize hext_witness_witness_right_left p
apply hext_witness_witness_right_left
specialize le_refl (S l)
exact le_refl
exact hp
have hnew_sorted : (forall i. (exists h. h + S (S i) = S (S l)) -> exists p q. (((exists h. h + S p = S ((S i) * x1)) /\ exists w. x = w * S ((S i) * x1) + p) /\ (((exists h. h + S q = S ((S S i) * x1)) /\ exists w. x = w * S ((S S i) * x1) + q) /\ (exists h. h + p = q))))
specialize sorted_succ_intro x
specialize sorted_succ_intro x1
specialize sorted_succ_intro l
specialize sorted_succ_intro p
specialize sorted_succ_intro s
apply sorted_succ_intro
exact hnew_sorted_prefix
exact hnewp
exact hext_witness_witness_left
exact hps
exists x
exists x1
split
exact hext_witness_witness_left
split
exact hext_witness_witness_right_left
split
exact hext_witness_witness_right_right
split
exact hnew_all
exact hnew_sorted
qed
- Occurrences
- 30,020
- Distinct objects
- 5,009
- Reused references
- 236
- Depth
- 82
- Cuts
- 898
- Certificate SHA-256
618288aae5fa…
prime_divides_decidablePrime divisibility is constructively decidable
β sequences, products & FTA
checked
The concrete property of being a prime divisor is constructively decidable.
Exact expanded PA statement
forall p n. ((~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1) /\ (exists k. n = p * k)) \/ ~(((~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1) /\ (exists k. n = p * k)))
Complete replay recipe: dependency imports + authored proof
pa prove forall p n. ((~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1) /\ (exists k. n = p * k)) \/ ~(((~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1) /\ (exists k. n = p * k)))
use prime_decidable
use multiple_decidable
intro p
intro n
have hp : (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1) \/ ~((~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))
specialize prime_decidable p
exact prime_decidable
cases hp
have hd : (exists k. n = p * k) \/ ~((exists k. n = p * k))
specialize multiple_decidable p
specialize multiple_decidable n
exact multiple_decidable
cases hd
left
split
exact hp_left
exact hd_left
right
intro hpd
cases hpd
apply hd_right
exact hpd_right
right
intro hpd
cases hpd
apply hp_right
exact hpd_left
qed
- Occurrences
- 3,573
- Distinct objects
- 1,539
- Reused references
- 66
- Depth
- 74
- Cuts
- 101
- Certificate SHA-256
44c96dfc214f…
greatest_prime_divisor_searchBounded greatest-prime-divisor search
β sequences, products & FTA
checked
Bounded search either excludes all prime divisors or returns a greatest one in the bound.
Exact expanded PA statement
forall B n. ((forall r. (exists h. h + r = B) -> ~(((~(r = 1) /\ forall a d. r = a * d -> a = 1 \/ d = 1) /\ (exists k. n = r * k)))) \/ exists p. (((exists h. h + p = B) /\ ((~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1) /\ (exists k. n = p * k))) /\ forall r. (exists h. h + r = B) -> ((~(r = 1) /\ forall a d. r = a * d -> a = 1 \/ d = 1) /\ (exists k. n = r * k)) -> (exists h. h + r = p)))
Complete replay recipe: dependency imports + authored proof
pa prove forall B n. ((forall r. (exists h. h + r = B) -> ~(((~(r = 1) /\ forall a d. r = a * d -> a = 1 \/ d = 1) /\ (exists k. n = r * k)))) \/ exists p. (((exists h. h + p = B) /\ ((~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1) /\ (exists k. n = p * k))) /\ forall r. (exists h. h + r = B) -> ((~(r = 1) /\ forall a d. r = a * d -> a = 1 \/ d = 1) /\ (exists k. n = r * k)) -> (exists h. h + r = p)))
use prime_nonzero
use le_zero
use prime_divides_decidable
use le_refl
use le_eq_or_lt
use le_of_succ_le_succ
use le_succ
induction B
intro n
left
intro r
intro hr
intro hpd
cases hpd
have hr0 : r = 0
specialize le_zero r
apply le_zero
exact hr
specialize prime_nonzero r
apply prime_nonzero
exact hpd_left
exact hr0
intro n
have hboundary : ((~(S B = 1) /\ forall a d. S B = a * d -> a = 1 \/ d = 1) /\ (exists k. n = S B * k)) \/ ~(((~(S B = 1) /\ forall a d. S B = a * d -> a = 1 \/ d = 1) /\ (exists k. n = S B * k)))
specialize prime_divides_decidable (S B)
specialize prime_divides_decidable n
exact prime_divides_decidable
cases hboundary
right
exists S B
split
split
specialize le_refl (S B)
exact le_refl
exact hboundary_left
intro r
intro hr
intro hpd
exact hr
have hprev : ((forall r. (exists h. h + r = B) -> ~(((~(r = 1) /\ forall a d. r = a * d -> a = 1 \/ d = 1) /\ (exists k. n = r * k)))) \/ exists p. (((exists h. h + p = B) /\ ((~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1) /\ (exists k. n = p * k))) /\ forall r. (exists h. h + r = B) -> ((~(r = 1) /\ forall a d. r = a * d -> a = 1 \/ d = 1) /\ (exists k. n = r * k)) -> (exists h. h + r = p)))
specialize IH n
exact IH
cases hprev
left
intro r
intro hr
intro hpd
have hsplit : r = S B \/ exists h. h + S r = S B
specialize le_eq_or_lt r
specialize le_eq_or_lt (S B)
apply le_eq_or_lt
exact hr
cases hsplit
apply hboundary_right
rewrite hsplit_left at hpd
rewrite hsplit_left at hpd
rewrite hsplit_left at hpd
exact hpd
specialize hprev_left r
apply hprev_left
specialize le_of_succ_le_succ r
specialize le_of_succ_le_succ B
apply le_of_succ_le_succ
exact hsplit_right
exact hpd
right
cases hprev_right
cases hprev_right_witness
cases hprev_right_witness_left
exists x
split
split
specialize le_succ x
specialize le_succ B
apply le_succ
exact hprev_right_witness_left_left
exact hprev_right_witness_left_right
intro r
intro hr
intro hpd
have hsplit2 : r = S B \/ exists h. h + S r = S B
specialize le_eq_or_lt r
specialize le_eq_or_lt (S B)
apply le_eq_or_lt
exact hr
cases hsplit2
exfalso
apply hboundary_right
rewrite hsplit2_left at hpd
rewrite hsplit2_left at hpd
rewrite hsplit2_left at hpd
exact hpd
specialize hprev_right_witness_right r
apply hprev_right_witness_right
specialize le_of_succ_le_succ r
specialize le_of_succ_le_succ B
apply le_of_succ_le_succ
exact hsplit2_right
exact hpd
qed
- Occurrences
- 3,949
- Distinct objects
- 1,658
- Reused references
- 72
- Depth
- 77
- Cuts
- 116
- Certificate SHA-256
6ea4e6870350…
greatest_prime_divisor_existsA greatest prime divisor exists
β sequences, products & FTA
checked
Every nonzero nonunit has a greatest prime divisor in the ordinary natural order.
Exact expanded PA statement
forall n. ~(n = 0) -> ~(n = 1) -> exists p. (((~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1) /\ (exists k. n = p * k)) /\ forall r. ((~(r = 1) /\ forall a d. r = a * d -> a = 1 \/ d = 1) /\ (exists k. n = r * k)) -> (exists h. h + r = p))
Complete replay recipe: dependency imports + authored proof
pa prove forall n. ~(n = 0) -> ~(n = 1) -> exists p. (((~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1) /\ (exists k. n = p * k)) /\ forall r. ((~(r = 1) /\ forall a d. r = a * d -> a = 1 \/ d = 1) /\ (exists k. n = r * k)) -> (exists h. h + r = p))
use prime_divisor_exists
use divisor_le_nonzero
use greatest_prime_divisor_search
intro n
intro hn0
intro hn1
have hsome : exists p. ((~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1) /\ (exists k. n = p * k))
specialize prime_divisor_exists n
apply prime_divisor_exists
exact hn0
exact hn1
cases hsome
cases hsome_witness
have hxle : (exists h. h + x = n)
specialize divisor_le_nonzero x
specialize divisor_le_nonzero n
apply divisor_le_nonzero
exact hn0
exact hsome_witness_right
have hsearch : ((forall r. (exists h. h + r = n) -> ~(((~(r = 1) /\ forall a d. r = a * d -> a = 1 \/ d = 1) /\ (exists k. n = r * k)))) \/ exists p. (((exists h. h + p = n) /\ ((~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1) /\ (exists k. n = p * k))) /\ forall r. (exists h. h + r = n) -> ((~(r = 1) /\ forall a d. r = a * d -> a = 1 \/ d = 1) /\ (exists k. n = r * k)) -> (exists h. h + r = p)))
specialize greatest_prime_divisor_search n
specialize greatest_prime_divisor_search n
exact greatest_prime_divisor_search
cases hsearch
exfalso
specialize hsearch_left x
apply hsearch_left
exact hxle
split
exact hsome_witness_left
exact hsome_witness_right
cases hsearch_right
cases hsearch_right_witness
cases hsearch_right_witness_left
exists x1
split
exact hsearch_right_witness_left_right
intro r
intro hrpd
cases hrpd
specialize hsearch_right_witness_right r
apply hsearch_right_witness_right
specialize divisor_le_nonzero r
specialize divisor_le_nonzero n
apply divisor_le_nonzero
exact hn0
exact hrpd_right
split
exact hrpd_left
exact hrpd_right
qed
- Occurrences
- 7,052
- Distinct objects
- 2,015
- Reused references
- 92
- Depth
- 81
- Cuts
- 214
- Certificate SHA-256
4ee7dca9d7ad…
greatest_prime_divisor_quotient_boundPrime divisors of the quotient are bounded
β sequences, products & FTA
checked
Every prime divisor of the quotient by a greatest prime divisor is bounded by that divisor.
Exact expanded PA statement
forall n p q. n = p * q -> (((~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1) /\ (exists k. n = p * k)) /\ forall r. ((~(r = 1) /\ forall a d. r = a * d -> a = 1 \/ d = 1) /\ (exists k. n = r * k)) -> (exists h. h + r = p)) -> forall r. (~(r = 1) /\ forall a d. r = a * d -> a = 1 \/ d = 1) -> (exists k. q = r * k) -> (exists h. h + r = p)
Complete replay recipe: dependency imports + authored proof
pa prove forall n p q. n = p * q -> (((~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1) /\ (exists k. n = p * k)) /\ forall r. ((~(r = 1) /\ forall a d. r = a * d -> a = 1 \/ d = 1) /\ (exists k. n = r * k)) -> (exists h. h + r = p)) -> forall r. (~(r = 1) /\ forall a d. r = a * d -> a = 1 \/ d = 1) -> (exists k. q = r * k) -> (exists h. h + r = p)
use mul_comm
use multiple_trans
intro n
intro p
intro q
intro hfactor
intro hgreat
intro r
intro hrprime
intro hrdq
cases hgreat
have hqdn : (exists k. n = q * k)
exists p
trans p * q
exact hfactor
apply mul_comm
have hrdn : (exists k. n = r * k)
specialize multiple_trans q
specialize multiple_trans r
specialize multiple_trans n
apply multiple_trans
exact hqdn
exact hrdq
specialize hgreat_right r
apply hgreat_right
split
exact hrprime
exact hrdn
qed
- Occurrences
- 388
- Distinct objects
- 322
- Reused references
- 34
- Depth
- 25
- Cuts
- 11
- Certificate SHA-256
3c331ed30837…
greatest_prime_divisor_descentGreatest-prime-divisor quotient descent
β sequences, products & FTA
checked
Choose a greatest prime factor with a nonzero strict quotient and the exact append-order bound.
Exact expanded PA statement
forall n. ~(n = 0) -> ~(n = 1) -> exists p q. (((~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1) /\ n = p * q) /\ (~(q = 0) /\ ((exists h. h + S q = n) /\ forall r. (~(r = 1) /\ forall a d. r = a * d -> a = 1 \/ d = 1) -> (exists k. q = r * k) -> (exists h. h + r = p))))
Complete replay recipe: dependency imports + authored proof
pa prove forall n. ~(n = 0) -> ~(n = 1) -> exists p q. (((~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1) /\ n = p * q) /\ (~(q = 0) /\ ((exists h. h + S q = n) /\ forall r. (~(r = 1) /\ forall a d. r = a * d -> a = 1 \/ d = 1) -> (exists k. q = r * k) -> (exists h. h + r = p))))
use greatest_prime_divisor_exists
use mul_comm
use factor_nonzero_left
use proper_factor_lt
use greatest_prime_divisor_quotient_bound
intro n
intro hn0
intro hn1
have hgreat : exists p. (((~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1) /\ (exists k. n = p * k)) /\ forall r. ((~(r = 1) /\ forall a d. r = a * d -> a = 1 \/ d = 1) /\ (exists k. n = r * k)) -> (exists h. h + r = p))
specialize greatest_prime_divisor_exists n
apply greatest_prime_divisor_exists
exact hn0
exact hn1
cases hgreat
cases hgreat_witness
cases hgreat_witness_left
cases hgreat_witness_left_left
cases hgreat_witness_left_right
have hqp : n = x1 * x
trans x * x1
exact hgreat_witness_left_right_witness
apply mul_comm
have hq0 : ~(x1 = 0)
intro hx10
specialize factor_nonzero_left n
specialize factor_nonzero_left x1
specialize factor_nonzero_left x
apply factor_nonzero_left
exact hn0
exact hqp
exact hx10
have hqlt : (exists h. h + S x1 = n)
specialize proper_factor_lt n
specialize proper_factor_lt x1
specialize proper_factor_lt x
apply proper_factor_lt
exact hn0
exact hqp
exact hgreat_witness_left_left_left
have hbound : forall r. (~(r = 1) /\ forall a d. r = a * d -> a = 1 \/ d = 1) -> (exists k. x1 = r * k) -> (exists h. h + r = x)
specialize greatest_prime_divisor_quotient_bound n
specialize greatest_prime_divisor_quotient_bound x
specialize greatest_prime_divisor_quotient_bound x1
apply greatest_prime_divisor_quotient_bound
exact hgreat_witness_left_right_witness
split
split
split
exact hgreat_witness_left_left_left
exact hgreat_witness_left_left_right
exists x1
exact hgreat_witness_left_right_witness
exact hgreat_witness_right
exists x
exists x1
split
split
split
exact hgreat_witness_left_left_left
exact hgreat_witness_left_left_right
exact hgreat_witness_left_right_witness
split
exact hq0
split
exact hqlt
exact hbound
qed
- Occurrences
- 8,256
- Distinct objects
- 2,234
- Reused references
- 109
- Depth
- 82
- Cuts
- 253
- Certificate SHA-256
136a861b3f30…
beta_factor_divides_productEvery decoded factor divides its Product
β sequences, products & FTA
checked
Every decoded factor inside an exact beta Product divides its terminal product.
Exact expanded PA statement
forall b c l n i p. (exists h. h + S i = l) -> ((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * 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 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 q. n = p * q
Complete replay recipe: dependency imports + authored proof
pa prove forall b c l n i p. (exists h. h + S i = l) -> ((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * 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 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 q. n = p * q
use add_eq_zero_right
use succ_ne_zero
use beta_product_succ_decompose
use le_of_succ_le_succ
use le_eq_or_lt
use beta_at_unique
use mul_comm
use multiple_mul_right
intro b
intro c
induction l
intro n
intro i
intro p
intro hi
intro hp
intro hproduct
exfalso
cases hi
have hsi0 : S i = 0
specialize add_eq_zero_right x
specialize add_eq_zero_right (S i)
apply add_eq_zero_right
exact hi_witness
specialize succ_ne_zero i
apply succ_ne_zero
exact hsi0
intro n
intro i
intro p
intro hi
intro hp
intro hproduct
have hdecomp : exists a r. (((exists h. h + S a = S ((S l) * c)) /\ exists q. b = q * S ((S l) * c) + 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 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 * a))
specialize beta_product_succ_decompose b
specialize beta_product_succ_decompose c
specialize beta_product_succ_decompose l
specialize beta_product_succ_decompose n
apply beta_product_succ_decompose
exact hproduct
cases hdecomp
cases hdecomp_witness
cases hdecomp_witness_witness
cases hdecomp_witness_witness_right
have hil : exists h. h + i = l
specialize le_of_succ_le_succ i
specialize le_of_succ_le_succ l
apply le_of_succ_le_succ
exact hi
have hsplit : i = l \/ exists h. h + S i = l
specialize le_eq_or_lt i
specialize le_eq_or_lt l
apply le_eq_or_lt
exact hil
cases hsplit
have hpa : p = x
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique l
specialize beta_at_unique p
specialize beta_at_unique x
apply beta_at_unique
rewrite hsplit_left at hp
rewrite hsplit_left at hp
exact hp
exact hdecomp_witness_witness_left
exists x1
trans x1 * x
exact hdecomp_witness_witness_right_right
rewrite hpa
apply mul_comm
have hidiv : exists q. x1 = p * q
specialize IH x1
specialize IH i
specialize IH p
apply IH
exact hsplit_right
exact hp
exact hdecomp_witness_witness_right_left
have hmul : exists q. x1 * x = p * q
specialize multiple_mul_right p
specialize multiple_mul_right x1
specialize multiple_mul_right x
apply multiple_mul_right
exact hidiv
cases hmul
exists x2
trans x1 * x
exact hdecomp_witness_witness_right_right
exact hmul_witness
qed
- Occurrences
- 2,970
- Distinct objects
- 1,020
- Reused references
- 50
- Depth
- 65
- Cuts
- 85
- Certificate SHA-256
1584e62c8f35…
beta_canonical_append_generalAppend one prime to any canonical beta prefix
β sequences, products & FTA
checked
Append one prime to any canonical prefix using one shared beta append certificate.
Exact expanded PA statement
forall l b c n s. (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists w. u = w * 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 w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -> (forall i. (exists h. h + S i = l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) -> (forall i. (exists h. h + S S i = l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -> (~(s = 1) /\ forall a d. s = a * d -> a = 1 \/ d = 1) -> (forall r. (~(r = 1) /\ forall a d. r = a * d -> a = 1 \/ d = 1) -> (exists k. n = r * k) -> (exists h. h + r = s)) -> exists z e. (((exists h. h + S s = S ((S l) * e)) /\ exists w. z = w * S ((S l) * e) + s) /\ ((forall i a. (exists h. h + S i = l) -> ((exists h. h + S a = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + a) -> ((exists h. h + S a = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + a)) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S (n * s) = S ((S S l) * v)) /\ exists w. u = w * S ((S S l) * v) + (n * s)) /\ forall i. (exists h. h + S i = S l) -> exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = S l) -> exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = S l) -> exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. z = w * S ((S S i) * e) + q) /\ (exists h. h + p = q))))))))
Complete replay recipe: dependency imports + authored proof
pa prove forall l b c n s. (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists w. u = w * 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 w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -> (forall i. (exists h. h + S i = l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) -> (forall i. (exists h. h + S S i = l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -> (~(s = 1) /\ forall a d. s = a * d -> a = 1 \/ d = 1) -> (forall r. (~(r = 1) /\ forall a d. r = a * d -> a = 1 \/ d = 1) -> (exists k. n = r * k) -> (exists h. h + r = s)) -> exists z e. (((exists h. h + S s = S ((S l) * e)) /\ exists w. z = w * S ((S l) * e) + s) /\ ((forall i a. (exists h. h + S i = l) -> ((exists h. h + S a = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + a) -> ((exists h. h + S a = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + a)) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S (n * s) = S ((S S l) * v)) /\ exists w. u = w * S ((S S l) * v) + (n * s)) /\ forall i. (exists h. h + S i = S l) -> exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = S l) -> exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = S l) -> exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. z = w * S ((S S i) * e) + q) /\ (exists h. h + p = q))))))))
use beta_factor_prefix_product_append
use all_prime_transport
use all_prime_succ_intro
use zero_or_succ
use sorted_singleton
use sorted_transport
use all_prime_succ_elim_last
use beta_factor_divides_product
use le_refl
use sorted_succ_intro
intro l
intro b
intro c
intro n
intro s
intro hproduct
intro hall
intro hsorted
intro hs
intro hbound
have hext : exists z e. (((exists h. h + S s = S ((S l) * e)) /\ exists w. z = w * S ((S l) * e) + s) /\ ((forall i a. (exists h. h + S i = l) -> ((exists h. h + S a = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + a) -> ((exists h. h + S a = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + a)) /\ (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S (n * s) = S ((S S l) * v)) /\ exists w. u = w * S ((S S l) * v) + (n * s)) /\ forall i. (exists h. h + S i = S l) -> exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p))))))))
specialize beta_factor_prefix_product_append b
specialize beta_factor_prefix_product_append c
specialize beta_factor_prefix_product_append l
specialize beta_factor_prefix_product_append n
specialize beta_factor_prefix_product_append s
apply beta_factor_prefix_product_append
exact hproduct
cases hext
cases hext_witness
cases hext_witness_witness
cases hext_witness_witness_right
have hnew_all_prefix : (forall i. (exists h. h + S i = l) -> exists p. (((exists h. h + S p = S ((S i) * x1)) /\ exists w. x = w * S ((S i) * x1) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1)))
specialize all_prime_transport b
specialize all_prime_transport c
specialize all_prime_transport x
specialize all_prime_transport x1
specialize all_prime_transport l
apply all_prime_transport
exact hall
exact hext_witness_witness_right_left
have hnew_all : (forall i. (exists h. h + S i = S l) -> exists p. (((exists h. h + S p = S ((S i) * x1)) /\ exists w. x = w * S ((S i) * x1) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1)))
specialize all_prime_succ_intro x
specialize all_prime_succ_intro x1
specialize all_prime_succ_intro l
specialize all_prime_succ_intro s
apply all_prime_succ_intro
exact hnew_all_prefix
split
exact hext_witness_witness_left
exact hs
have hnew_sorted_prefix : (forall i. (exists h. h + S S i = l) -> exists p q. (((exists h. h + S p = S ((S i) * x1)) /\ exists w. x = w * S ((S i) * x1) + p) /\ (((exists h. h + S q = S ((S S i) * x1)) /\ exists w. x = w * S ((S S i) * x1) + q) /\ (exists h. h + p = q))))
specialize sorted_transport b
specialize sorted_transport c
specialize sorted_transport x
specialize sorted_transport x1
specialize sorted_transport l
apply sorted_transport
exact hsorted
exact hext_witness_witness_right_left
have hlen : l = 0 \/ exists k. l = S k
specialize zero_or_succ l
exact zero_or_succ
have hnew_sorted : (forall i. (exists h. h + S S i = S l) -> exists p q. (((exists h. h + S p = S ((S i) * x1)) /\ exists w. x = w * S ((S i) * x1) + p) /\ (((exists h. h + S q = S ((S S i) * x1)) /\ exists w. x = w * S ((S S i) * x1) + q) /\ (exists h. h + p = q))))
cases hlen
rewrite hlen_left
specialize sorted_singleton x
specialize sorted_singleton x1
exact sorted_singleton
cases hlen_right
rewrite hlen_right_witness
rewrite hlen_right_witness at hall
rewrite hlen_right_witness at hnew_sorted_prefix
rewrite hlen_right_witness at hproduct
rewrite hlen_right_witness at hproduct
rewrite hlen_right_witness at hproduct
have hlast : exists r. (((exists h. h + S r = S ((S x2) * c)) /\ exists w. b = w * S ((S x2) * c) + r) /\ (~(r = 1) /\ forall a d. r = a * d -> a = 1 \/ d = 1))
specialize all_prime_succ_elim_last b
specialize all_prime_succ_elim_last c
specialize all_prime_succ_elim_last x2
apply all_prime_succ_elim_last
exact hall
cases hlast
cases hlast_witness
have hrdiv : (exists k. n = x3 * k)
specialize beta_factor_divides_product b
specialize beta_factor_divides_product c
specialize beta_factor_divides_product (S x2)
specialize beta_factor_divides_product n
specialize beta_factor_divides_product x2
specialize beta_factor_divides_product x3
apply beta_factor_divides_product
specialize le_refl (S x2)
exact le_refl
exact hlast_witness_left
exact hproduct
have hrs : (exists h. h + x3 = s)
specialize hbound x3
apply hbound
exact hlast_witness_right
exact hrdiv
have hklt : (exists h. h + S x2 = l)
rewrite hlen_right_witness
specialize le_refl (S x2)
exact le_refl
have hnew_last : ((exists h. h + S x3 = S ((S x2) * x1)) /\ exists w. x = w * S ((S x2) * x1) + x3)
specialize hext_witness_witness_right_left x2
specialize hext_witness_witness_right_left x3
apply hext_witness_witness_right_left
exact hklt
exact hlast_witness_left
have hnew_append : ((exists h. h + S s = S ((S S x2) * x1)) /\ exists w. x = w * S ((S S x2) * x1) + s)
rewrite <- hlen_right_witness
rewrite <- hlen_right_witness
exact hext_witness_witness_left
specialize sorted_succ_intro x
specialize sorted_succ_intro x1
specialize sorted_succ_intro x2
specialize sorted_succ_intro x3
specialize sorted_succ_intro s
apply sorted_succ_intro
exact hnew_sorted_prefix
exact hnew_last
exact hnew_append
exact hrs
exists x
exists x1
split
exact hext_witness_witness_left
split
exact hext_witness_witness_right_left
split
exact hext_witness_witness_right_right
split
exact hnew_all
exact hnew_sorted
qed
- Occurrences
- 33,165
- Distinct objects
- 5,281
- Reused references
- 251
- Depth
- 82
- Cuts
- 993
- Certificate SHA-256
72e9862443ac…
beta_canonical_last_factor_boundThe last canonical factor obeys prime-divisor bounds
β sequences, products & FTA
checked
The last factor of a nonempty AllPrime Product obeys any bound on prime divisors of the product.
Exact expanded PA statement
forall b c l n s. (forall i. (exists h. h + S i = S l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) -> (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)))))) -> (forall r. (~(r = 1) /\ forall a d. r = a * d -> a = 1 \/ d = 1) -> (exists k. n = r * k) -> (exists h. h + r = s)) -> exists p. (((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) /\ (exists h. h + p = s))
Complete replay recipe: dependency imports + authored proof
pa prove forall b c l n s. (forall i. (exists h. h + S i = S l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) -> (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)))))) -> (forall r. (~(r = 1) /\ forall a d. r = a * d -> a = 1 \/ d = 1) -> (exists k. n = r * k) -> (exists h. h + r = s)) -> exists p. (((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) /\ (exists h. h + p = s))
use all_prime_succ_elim_last
use beta_factor_divides_product
use le_refl
intro b
intro c
intro l
intro n
intro s
intro hall
intro hproduct
intro hbound
have hlast : exists p. (((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))
specialize all_prime_succ_elim_last b
specialize all_prime_succ_elim_last c
specialize all_prime_succ_elim_last l
apply all_prime_succ_elim_last
exact hall
cases hlast
cases hlast_witness
have hpdiv : (exists k. n = x * k)
specialize beta_factor_divides_product b
specialize beta_factor_divides_product c
specialize beta_factor_divides_product (S l)
specialize beta_factor_divides_product n
specialize beta_factor_divides_product l
specialize beta_factor_divides_product x
apply beta_factor_divides_product
specialize le_refl (S l)
exact le_refl
exact hlast_witness_left
exact hproduct
have hps : (exists h. h + x = s)
specialize hbound x
apply hbound
exact hlast_witness_right
exact hpdiv
exists x
split
exact hlast_witness_left
exact hps
qed
- Occurrences
- 3,079
- Distinct objects
- 1,079
- Reused references
- 52
- Depth
- 67
- Cuts
- 91
- Certificate SHA-256
0c23f5d9bd89…
prime_factorization_exists_up_toBounded prime-factorization existence
β sequences, products & FTA
checked
Bounded induction with one consolidated canonical append dependency.
Exact expanded PA statement
forall B n. (exists h. h + n = B) -> ~(n = 0) -> exists l b c. ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists w. u = w * 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 w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))))
Complete replay recipe: dependency imports + authored proof
pa prove forall B n. (exists h. h + n = B) -> ~(n = 0) -> exists l b c. ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists w. u = w * 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 w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))))
use le_zero
use le_eq_or_lt
use le_of_succ_le_succ
use eq_decidable
use succ_ne_zero
use beta_at_exists
use beta_at_self_of_bound
use beta_at_unique
use one_mul
use le_refl
use add_eq_zero_right
use all_prime_empty
use sorted_empty
use greatest_prime_divisor_descent
use beta_canonical_append_general
use mul_comm
induction B
intro n
intro hnB
intro hn0
exfalso
apply hn0
specialize le_zero n
apply le_zero
exact hnB
intro n
intro hnB
intro hn0
have hsplit : n = S B \/ exists h. h + S n = S B
specialize le_eq_or_lt n
specialize le_eq_or_lt (S B)
apply le_eq_or_lt
exact hnB
cases hsplit
rewrite hsplit_left
rewrite hsplit_left
have honecase : S B = 1 \/ ~(S B = 1)
specialize eq_decidable (S B)
specialize eq_decidable 1
apply eq_decidable
cases honecase
rewrite honecase_left
rewrite honecase_left
have hsome : exists x. ((exists h. h + S x = S ((S 0) * 1)) /\ exists w. 1 = w * S ((S 0) * 1) + x)
specialize beta_at_exists 1
specialize beta_at_exists 1
specialize beta_at_exists 0
exact beta_at_exists
cases hsome
have hone : ((exists h. h + S 1 = S ((S 0) * 1)) /\ exists w. 1 = w * S ((S 0) * 1) + 1)
specialize beta_at_self_of_bound 1
specialize beta_at_self_of_bound 0
specialize beta_at_self_of_bound 1
apply beta_at_self_of_bound
specialize one_mul 1
rewrite one_mul
specialize le_refl 2
exact le_refl
have hx1 : x = 1
specialize beta_at_unique 1
specialize beta_at_unique 1
specialize beta_at_unique 0
specialize beta_at_unique x
specialize beta_at_unique 1
apply beta_at_unique
exact hsome_witness
exact hone
rewrite hx1 at hsome_witness
rewrite hx1 at hsome_witness
exists 0
exists 0
exists 0
split
exists 1
exists 1
split
exact hsome_witness
split
exact hsome_witness
intro i
intro hi
exfalso
cases hi
have hsi0 : S i = 0
specialize add_eq_zero_right x1
specialize add_eq_zero_right (S i)
apply add_eq_zero_right
exact hi_witness
specialize succ_ne_zero i
apply succ_ne_zero
exact hsi0
split
specialize all_prime_empty 0
specialize all_prime_empty 0
exact all_prime_empty
specialize sorted_empty 0
specialize sorted_empty 0
exact sorted_empty
have hdesc : exists p q. (((~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1) /\ S B = p * q) /\ (~(q = 0) /\ ((exists h. h + S q = S B) /\ forall r. (~(r = 1) /\ forall a d. r = a * d -> a = 1 \/ d = 1) -> (exists k. q = r * k) -> (exists h. h + r = p))))
specialize greatest_prime_divisor_descent (S B)
apply greatest_prime_divisor_descent
specialize succ_ne_zero B
exact succ_ne_zero
exact honecase_right
cases hdesc
cases hdesc_witness
cases hdesc_witness_witness
cases hdesc_witness_witness_left
cases hdesc_witness_witness_right
cases hdesc_witness_witness_right_right
have hqB : exists h. h + x1 = B
specialize le_of_succ_le_succ x1
specialize le_of_succ_le_succ B
apply le_of_succ_le_succ
exact hdesc_witness_witness_right_right_left
have hqfac : exists l b c. ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S x1 = S ((S l) * v)) /\ exists w. u = w * 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 w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))))
specialize IH x1
apply IH
exact hqB
exact hdesc_witness_witness_right_left
cases hqfac
cases hqfac_witness
cases hqfac_witness_witness
cases hqfac_witness_witness_witness
cases hqfac_witness_witness_witness_right
have happend : exists z e. (((exists h. h + S x = S ((S x2) * e)) /\ exists w. z = w * S ((S x2) * e) + x) /\ ((forall i a. (exists h. h + S i = x2) -> ((exists h. h + S a = S ((S i) * x4)) /\ exists w. x3 = w * S ((S i) * x4) + a) -> ((exists h. h + S a = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + a)) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S (x1 * x) = S ((S S x2) * v)) /\ exists w. u = w * S ((S S x2) * v) + (x1 * x)) /\ forall i. (exists h. h + S i = S x2) -> exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = S x2) -> exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = S x2) -> exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. z = w * S ((S S i) * e) + q) /\ (exists h. h + p = q))))))))
specialize beta_canonical_append_general x2
specialize beta_canonical_append_general x3
specialize beta_canonical_append_general x4
specialize beta_canonical_append_general x1
specialize beta_canonical_append_general x
apply beta_canonical_append_general
exact hqfac_witness_witness_witness_left
exact hqfac_witness_witness_witness_right_left
exact hqfac_witness_witness_witness_right_right
exact hdesc_witness_witness_left_left
exact hdesc_witness_witness_right_right_right
cases happend
cases happend_witness
cases happend_witness_witness
cases happend_witness_witness_right
cases happend_witness_witness_right_right
cases happend_witness_witness_right_right_right
have hmul : x1 * x = S B
trans x * x1
apply mul_comm
symm
exact hdesc_witness_witness_left_right
have hcap : exists l b c. ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S (x1 * x) = S ((S l) * v)) /\ exists w. u = w * S ((S l) * v) + (x1 * x)) /\ forall i. (exists h. h + S i = l) -> exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))))
exists S x2
exists x5
exists x6
split
exact happend_witness_witness_right_right_left
split
exact happend_witness_witness_right_right_right_left
exact happend_witness_witness_right_right_right_right
rewrite hmul at hcap
rewrite hmul at hcap
exact hcap
have hnB0 : exists h. h + n = B
specialize le_of_succ_le_succ n
specialize le_of_succ_le_succ B
apply le_of_succ_le_succ
exact hsplit_right
specialize IH n
apply IH
exact hnB0
exact hn0
qed
- Occurrences
- 43,927
- Distinct objects
- 6,780
- Reused references
- 319
- Depth
- 97
- Cuts
- 1,325
- Certificate SHA-256
ba5730d9fb3e…
prime_factorization_existenceExistence of a finite prime factorization
β sequences, products & FTA
checked
Every nonzero natural has a canonical factorization using consolidated append.
Exact expanded PA statement
forall n. ~(n = 0) -> exists l b c. ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists w. u = w * 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 w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))))
Complete replay recipe: dependency imports + authored proof
pa prove forall n. ~(n = 0) -> exists l b c. ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists w. u = w * 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 w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))))
use prime_factorization_exists_up_to
use le_refl
intro n
intro hn0
specialize prime_factorization_exists_up_to n
specialize prime_factorization_exists_up_to n
apply prime_factorization_exists_up_to
specialize le_refl n
exact le_refl
exact hn0
qed
- Occurrences
- 43,973
- Distinct objects
- 6,801
- Reused references
- 320
- Depth
- 98
- Cuts
- 1,328
- Certificate SHA-256
f25aa6adb2b3…
beta_prime_divisor_product_memberA prime divisor of an AllPrime beta Product occurs as a factor
β sequences, products & FTA
checked
A prime divisor of an AllPrime beta Product occurs as one of its decoded factors.
Exact expanded PA statement
forall b c l n p. (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1) -> (forall i. (exists h. h + S i = l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) -> (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists w. u = w * 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 w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -> (exists k. n = p * k) -> exists i. ((exists h. h + S i = l) /\ ((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p))
Complete replay recipe: dependency imports + authored proof
pa prove forall b c l n p. (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1) -> (forall i. (exists h. h + S i = l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) -> (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists w. u = w * 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 w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -> (exists k. n = p * k) -> exists i. ((exists h. h + S i = l) /\ ((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p))
use beta_product_zero
use divisor_one
use beta_product_succ_decompose
use all_prime_succ_elim_prefix
use all_prime_succ_elim_last
use euclid_prime_dvd_product
use prime_divisor_eq_one_or_self
use beta_at_unique
use le_succ
use le_refl
intro b
intro c
induction l
intro n
intro p
intro hpprime
intro hall
intro hproduct
intro hpdiv
have hn1 : n = 1
specialize beta_product_zero b
specialize beta_product_zero c
specialize beta_product_zero n
apply beta_product_zero
exact hproduct
cases hpprime
exfalso
apply hpprime_left
have hp1 : p = 1
specialize divisor_one p
apply divisor_one
rewrite hn1 at hpdiv
exact hpdiv
exact hp1
intro n
intro p
intro hpprime
intro hall
intro hproduct
intro hpdiv
have hdecomp : exists a r. (((exists h. h + S a = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + a) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S r = S ((S l) * v)) /\ exists w. u = w * 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 w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ n = r * a))
specialize beta_product_succ_decompose b
specialize beta_product_succ_decompose c
specialize beta_product_succ_decompose l
specialize beta_product_succ_decompose n
apply beta_product_succ_decompose
exact hproduct
cases hdecomp
cases hdecomp_witness
cases hdecomp_witness_witness
cases hdecomp_witness_witness_right
have hprefix : (forall i. (exists h. h + S i = l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1)))
specialize all_prime_succ_elim_prefix b
specialize all_prime_succ_elim_prefix c
specialize all_prime_succ_elim_prefix l
apply all_prime_succ_elim_prefix
exact hall
have hlast : exists t. (((exists h. h + S t = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + t) /\ (~(t = 1) /\ forall a d. t = a * d -> a = 1 \/ d = 1))
specialize all_prime_succ_elim_last b
specialize all_prime_succ_elim_last c
specialize all_prime_succ_elim_last l
apply all_prime_succ_elim_last
exact hall
have hpd : (exists k. x1 * x = p * k)
rewrite hdecomp_witness_witness_right_right at hpdiv
exact hpdiv
have hsplit : (exists k. x1 = p * k) \/ (exists k. x = p * k)
specialize euclid_prime_dvd_product p
specialize euclid_prime_dvd_product x1
specialize euclid_prime_dvd_product x
apply euclid_prime_dvd_product
exact hpprime
exact hpd
cases hsplit
have hmember : exists i. ((exists h. h + S i = l) /\ ((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p))
specialize IH x1
specialize IH p
apply IH
exact hpprime
exact hprefix
exact hdecomp_witness_witness_right_left
exact hsplit_left
cases hmember
cases hmember_witness
exists x2
split
specialize le_succ (S x2)
specialize le_succ l
apply le_succ
exact hmember_witness_left
exact hmember_witness_right
cases hlast
cases hlast_witness
have hlast_eq : x = x2
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique l
specialize beta_at_unique x
specialize beta_at_unique x2
apply beta_at_unique
exact hdecomp_witness_witness_left
exact hlast_witness_left
have hxprime : (~(x = 1) /\ forall a d. x = a * d -> a = 1 \/ d = 1)
rewrite hlast_eq
rewrite hlast_eq
exact hlast_witness_right
have hpone_or_eq : p = 1 \/ x = p
specialize prime_divisor_eq_one_or_self x
specialize prime_divisor_eq_one_or_self p
apply prime_divisor_eq_one_or_self
exact hxprime
exact hsplit_right
cases hpone_or_eq
exfalso
cases hpprime
apply hpprime_left
exact hpone_or_eq_left
exists l
split
specialize le_refl (S l)
exact le_refl
rewrite hpone_or_eq_right at hdecomp_witness_witness_left
rewrite hpone_or_eq_right at hdecomp_witness_witness_left
exact hdecomp_witness_witness_left
qed
- Occurrences
- 9,499
- Distinct objects
- 2,538
- Reused references
- 135
- Depth
- 67
- Cuts
- 277
- Certificate SHA-256
7723a9186a8a…
beta_sorted_factor_le_lastEvery sorted factor is bounded by the last factor
β sequences, products & FTA
checked
Every factor in a nonempty adjacent-sorted beta prefix is at most its last factor.
Exact expanded PA statement
forall b c l i p q. (exists h. h + S i = S l) -> ((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) -> ((exists h. h + S q = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + q) -> (forall i. (exists h. h + S S i = S l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -> (exists h. h + p = q)
Complete replay recipe: dependency imports + authored proof
pa prove forall b c l i p q. (exists h. h + S i = S l) -> ((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) -> ((exists h. h + S q = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + q) -> (forall i. (exists h. h + S S i = S l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -> (exists h. h + p = q)
use le_of_succ_le_succ
use le_zero
use beta_at_unique
use le_refl
use le_eq_or_lt
use sorted_succ_elim_prefix
use sorted_succ_elim_last
use le_trans
intro b
intro c
induction l
intro i
intro p
intro q
intro hi
intro hip
intro hql
intro hsorted
have hile0 : (exists h. h + i = 0)
specialize le_of_succ_le_succ i
specialize le_of_succ_le_succ 0
apply le_of_succ_le_succ
exact hi
have hi0 : i = 0
specialize le_zero i
apply le_zero
exact hile0
have hpq : p = q
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique 0
specialize beta_at_unique p
specialize beta_at_unique q
apply beta_at_unique
rewrite hi0 at hip
rewrite hi0 at hip
exact hip
exact hql
rewrite hpq
specialize le_refl q
exact le_refl
intro i
intro p
intro q
intro hi
intro hip
intro hql
intro hsorted
have hile : (exists h. h + i = S l)
specialize le_of_succ_le_succ i
specialize le_of_succ_le_succ (S l)
apply le_of_succ_le_succ
exact hi
have hsplit : i = S l \/ (exists h. h + S i = S l)
specialize le_eq_or_lt i
specialize le_eq_or_lt (S l)
apply le_eq_or_lt
exact hile
cases hsplit
have hpq : p = q
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique (S l)
specialize beta_at_unique p
specialize beta_at_unique q
apply beta_at_unique
rewrite hsplit_left at hip
rewrite hsplit_left at hip
exact hip
exact hql
rewrite hpq
specialize le_refl q
exact le_refl
have hprefix : (forall i. (exists h. h + S S i = S l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))
specialize sorted_succ_elim_prefix b
specialize sorted_succ_elim_prefix c
specialize sorted_succ_elim_prefix (S l)
apply sorted_succ_elim_prefix
exact hsorted
have hadj : exists a d. (((exists h. h + S a = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + a) /\ (((exists h. h + S d = S ((S S l) * c)) /\ exists w. b = w * S ((S S l) * c) + d) /\ (exists h. h + a = d)))
specialize sorted_succ_elim_last b
specialize sorted_succ_elim_last c
specialize sorted_succ_elim_last l
apply sorted_succ_elim_last
exact hsorted
cases hadj
cases hadj_witness
cases hadj_witness_witness
cases hadj_witness_witness_right
have hdq : x1 = q
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique (S l)
specialize beta_at_unique x1
specialize beta_at_unique q
apply beta_at_unique
exact hadj_witness_witness_right_left
exact hql
have hpa : (exists h. h + p = x)
specialize IH i
specialize IH p
specialize IH x
apply IH
exact hsplit_right
exact hip
exact hadj_witness_witness_left
exact hprefix
specialize le_trans p
specialize le_trans x
specialize le_trans q
apply le_trans
exact hpa
rewrite hdq at hadj_witness_witness_right_right
exact hadj_witness_witness_right_right
qed
- Occurrences
- 1,587
- Distinct objects
- 1,004
- Reused references
- 44
- Depth
- 62
- Cuts
- 48
- Certificate SHA-256
02ee4e476dae…
beta_nonempty_all_prime_product_ne_oneA nonempty AllPrime beta Product is not one
β sequences, products & FTA
checked
A nonempty product of prime decoded factors cannot have terminal value one.
Exact expanded PA statement
forall b c l n. (forall i. (exists h. h + S i = S l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) -> (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S S l) * v)) /\ exists w. u = w * 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 w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -> ~(n = 1)
Complete replay recipe: dependency imports + authored proof
pa prove forall b c l n. (forall i. (exists h. h + S i = S l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) -> (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S S l) * v)) /\ exists w. u = w * 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 w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -> ~(n = 1)
use all_prime_succ_elim_last
use beta_factor_divides_product
use le_refl
use divisor_one
intro b
intro c
intro l
intro n
intro hall
intro hproduct
intro hn1
have hlast : exists p. (((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))
specialize all_prime_succ_elim_last b
specialize all_prime_succ_elim_last c
specialize all_prime_succ_elim_last l
apply all_prime_succ_elim_last
exact hall
cases hlast
cases hlast_witness
have hpdiv : (exists k. n = x * k)
specialize beta_factor_divides_product b
specialize beta_factor_divides_product c
specialize beta_factor_divides_product (S l)
specialize beta_factor_divides_product n
specialize beta_factor_divides_product l
specialize beta_factor_divides_product x
apply beta_factor_divides_product
specialize le_refl (S l)
exact le_refl
exact hlast_witness_left
exact hproduct
have hp1 : x = 1
specialize divisor_one x
apply divisor_one
rewrite hn1 at hpdiv
exact hpdiv
cases hlast_witness_right
apply hlast_witness_right_left
exact hp1
qed
- Occurrences
- 3,266
- Distinct objects
- 1,213
- Reused references
- 67
- Depth
- 67
- Cuts
- 96
- Certificate SHA-256
9cde473a6b8f…
beta_all_prime_product_one_iff_length_zeroAn AllPrime beta Product is one exactly at length zero
β sequences, products & FTA
checked
Under AllPrime, a beta Product is one exactly when its encoded factor length is zero.
Exact expanded PA statement
forall b c l n. (forall i. (exists h. h + S i = l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) -> (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists w. u = w * 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 w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -> ((n = 1 -> l = 0) /\ (l = 0 -> n = 1))
Complete replay recipe: dependency imports + authored proof
pa prove forall b c l n. (forall i. (exists h. h + S i = l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) -> (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists w. u = w * 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 w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -> ((n = 1 -> l = 0) /\ (l = 0 -> n = 1))
use beta_product_zero
use beta_nonempty_all_prime_product_ne_one
use succ_ne_zero
intro b
intro c
induction l
intro n
intro hall
intro hproduct
split
intro hn1
refl
intro hl0
specialize beta_product_zero b
specialize beta_product_zero c
specialize beta_product_zero n
apply beta_product_zero
exact hproduct
intro n
intro hall
intro hproduct
split
intro hn1
exfalso
specialize beta_nonempty_all_prime_product_ne_one b
specialize beta_nonempty_all_prime_product_ne_one c
specialize beta_nonempty_all_prime_product_ne_one l
specialize beta_nonempty_all_prime_product_ne_one n
apply beta_nonempty_all_prime_product_ne_one
exact hall
exact hproduct
exact hn1
intro hl0
exfalso
specialize succ_ne_zero l
apply succ_ne_zero
exact hl0
qed
- Occurrences
- 4,506
- Distinct objects
- 1,331
- Reused references
- 69
- Depth
- 69
- Cuts
- 130
- Certificate SHA-256
6edf708691c6…
beta_canonical_last_factors_equalCanonical factorizations have equal last factors
β sequences, products & FTA
checked
Two nonempty sorted AllPrime Products of the same number have equal last factors.
Exact expanded PA statement
forall b c z e l k n p q. (forall i. (exists h. h + S i = S l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) -> (forall i. (exists h. h + S S i = S l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -> (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S S l) * v)) /\ exists w. u = w * 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 w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -> ((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) -> (forall i. (exists h. h + S i = S k) -> exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) -> (forall i. (exists h. h + S S i = S k) -> exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. z = w * S ((S S i) * e) + q) /\ (exists h. h + p = q)))) -> (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S S k) * v)) /\ exists w. u = w * S ((S S k) * v) + n) /\ forall i. (exists h. h + S i = S k) -> exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -> ((exists h. h + S q = S ((S k) * e)) /\ exists w. z = w * S ((S k) * e) + q) -> p = q
Complete replay recipe: dependency imports + authored proof
pa prove forall b c z e l k n p q. (forall i. (exists h. h + S i = S l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) -> (forall i. (exists h. h + S S i = S l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -> (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S S l) * v)) /\ exists w. u = w * 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 w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -> ((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) -> (forall i. (exists h. h + S i = S k) -> exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) -> (forall i. (exists h. h + S S i = S k) -> exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. z = w * S ((S S i) * e) + q) /\ (exists h. h + p = q)))) -> (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S S k) * v)) /\ exists w. u = w * S ((S S k) * v) + n) /\ forall i. (exists h. h + S i = S k) -> exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -> ((exists h. h + S q = S ((S k) * e)) /\ exists w. z = w * S ((S k) * e) + q) -> p = q
use all_prime_succ_elim_last
use beta_at_unique
use beta_factor_divides_product
use le_refl
use beta_prime_divisor_product_member
use beta_sorted_factor_le_last
use le_antisymm
intro b
intro c
intro z
intro e
intro l
intro k
intro n
intro p
intro q
intro hall1
intro hsort1
intro hprod1
intro hat1
intro hall2
intro hsort2
intro hprod2
intro hat2
have hlast1 : exists t. (((exists h. h + S t = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + t) /\ (~(t = 1) /\ forall a d. t = a * d -> a = 1 \/ d = 1))
specialize all_prime_succ_elim_last b
specialize all_prime_succ_elim_last c
specialize all_prime_succ_elim_last l
apply all_prime_succ_elim_last
exact hall1
cases hlast1
cases hlast1_witness
have hpeq1 : p = x
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique l
specialize beta_at_unique p
specialize beta_at_unique x
apply beta_at_unique
exact hat1
exact hlast1_witness_left
have hpprime : (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1)
rewrite hpeq1
rewrite hpeq1
exact hlast1_witness_right
have hlast2 : exists t. (((exists h. h + S t = S ((S k) * e)) /\ exists w. z = w * S ((S k) * e) + t) /\ (~(t = 1) /\ forall a d. t = a * d -> a = 1 \/ d = 1))
specialize all_prime_succ_elim_last z
specialize all_prime_succ_elim_last e
specialize all_prime_succ_elim_last k
apply all_prime_succ_elim_last
exact hall2
cases hlast2
cases hlast2_witness
have hqeq2 : q = x1
specialize beta_at_unique z
specialize beta_at_unique e
specialize beta_at_unique k
specialize beta_at_unique q
specialize beta_at_unique x1
apply beta_at_unique
exact hat2
exact hlast2_witness_left
have hqprime : (~(q = 1) /\ forall a d. q = a * d -> a = 1 \/ d = 1)
rewrite hqeq2
rewrite hqeq2
exact hlast2_witness_right
have hpdiv : (exists k. n = p * k)
specialize beta_factor_divides_product b
specialize beta_factor_divides_product c
specialize beta_factor_divides_product (S l)
specialize beta_factor_divides_product n
specialize beta_factor_divides_product l
specialize beta_factor_divides_product p
apply beta_factor_divides_product
specialize le_refl (S l)
exact le_refl
exact hat1
exact hprod1
have hqdiv : (exists k. n = q * k)
specialize beta_factor_divides_product z
specialize beta_factor_divides_product e
specialize beta_factor_divides_product (S k)
specialize beta_factor_divides_product n
specialize beta_factor_divides_product k
specialize beta_factor_divides_product q
apply beta_factor_divides_product
specialize le_refl (S k)
exact le_refl
exact hat2
exact hprod2
have hpmember2 : exists i. ((exists h. h + S i = S k) /\ ((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p))
specialize beta_prime_divisor_product_member z
specialize beta_prime_divisor_product_member e
specialize beta_prime_divisor_product_member (S k)
specialize beta_prime_divisor_product_member n
specialize beta_prime_divisor_product_member p
apply beta_prime_divisor_product_member
exact hpprime
exact hall2
exact hprod2
exact hpdiv
cases hpmember2
cases hpmember2_witness
have hpq : (exists h. h + p = q)
specialize beta_sorted_factor_le_last z
specialize beta_sorted_factor_le_last e
specialize beta_sorted_factor_le_last k
specialize beta_sorted_factor_le_last x2
specialize beta_sorted_factor_le_last p
specialize beta_sorted_factor_le_last q
apply beta_sorted_factor_le_last
exact hpmember2_witness_left
exact hpmember2_witness_right
exact hat2
exact hsort2
have hqmember1 : exists i. ((exists h. h + S i = S l) /\ ((exists h. h + S q = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + q))
specialize beta_prime_divisor_product_member b
specialize beta_prime_divisor_product_member c
specialize beta_prime_divisor_product_member (S l)
specialize beta_prime_divisor_product_member n
specialize beta_prime_divisor_product_member q
apply beta_prime_divisor_product_member
exact hqprime
exact hall1
exact hprod1
exact hqdiv
cases hqmember1
cases hqmember1_witness
have hqp : (exists h. h + q = p)
specialize beta_sorted_factor_le_last b
specialize beta_sorted_factor_le_last c
specialize beta_sorted_factor_le_last l
specialize beta_sorted_factor_le_last x3
specialize beta_sorted_factor_le_last q
specialize beta_sorted_factor_le_last p
apply beta_sorted_factor_le_last
exact hqmember1_witness_left
exact hqmember1_witness_right
exact hat1
exact hsort1
specialize le_antisymm p
specialize le_antisymm q
apply le_antisymm
exact hpq
exact hqp
qed
- Occurrences
- 15,648
- Distinct objects
- 3,187
- Reused references
- 156
- Depth
- 72
- Cuts
- 456
- Certificate SHA-256
930f4810f83f…
beta_canonical_product_cancel_lastCancel the common last factor of canonical Products
β sequences, products & FTA
checked
Cancel the common last prime from two nonempty canonical beta Products and return canonical prefixes.
Exact expanded PA statement
forall b c z e l k n. (forall i. (exists h. h + S i = S l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) -> (forall i. (exists h. h + S S i = S l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -> (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S S l) * v)) /\ exists w. u = w * 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 w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -> (forall i. (exists h. h + S i = S k) -> exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) -> (forall i. (exists h. h + S S i = S k) -> exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. z = w * S ((S S i) * e) + q) /\ (exists h. h + p = q)))) -> (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S S k) * v)) /\ exists w. u = w * S ((S S k) * v) + n) /\ forall i. (exists h. h + S i = S k) -> exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -> exists p r s. (((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) /\ (((exists h. h + S p = S ((S k) * e)) /\ exists w. z = w * S ((S k) * e) + p) /\ ((forall i. (exists h. h + S i = l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ ((forall i. (exists h. h + S S i = l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S r = S ((S l) * v)) /\ exists w. u = w * 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 w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = k) -> exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ ((forall i. (exists h. h + S S i = k) -> exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. z = w * S ((S S i) * e) + q) /\ (exists h. h + p = q)))) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S s = S ((S k) * v)) /\ exists w. u = w * S ((S k) * v) + s) /\ forall i. (exists h. h + S i = k) -> exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ (n = r * p /\ (n = s * p /\ r = s))))))))))
Complete replay recipe: dependency imports + authored proof
pa prove forall b c z e l k n. (forall i. (exists h. h + S i = S l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) -> (forall i. (exists h. h + S S i = S l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -> (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S S l) * v)) /\ exists w. u = w * 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 w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -> (forall i. (exists h. h + S i = S k) -> exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) -> (forall i. (exists h. h + S S i = S k) -> exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. z = w * S ((S S i) * e) + q) /\ (exists h. h + p = q)))) -> (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S S k) * v)) /\ exists w. u = w * S ((S S k) * v) + n) /\ forall i. (exists h. h + S i = S k) -> exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -> exists p r s. (((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) /\ (((exists h. h + S p = S ((S k) * e)) /\ exists w. z = w * S ((S k) * e) + p) /\ ((forall i. (exists h. h + S i = l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ ((forall i. (exists h. h + S S i = l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S r = S ((S l) * v)) /\ exists w. u = w * 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 w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = k) -> exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ ((forall i. (exists h. h + S S i = k) -> exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. z = w * S ((S S i) * e) + q) /\ (exists h. h + p = q)))) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S s = S ((S k) * v)) /\ exists w. u = w * S ((S k) * v) + s) /\ forall i. (exists h. h + S i = k) -> exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ (n = r * p /\ (n = s * p /\ r = s))))))))))
use beta_product_succ_decompose
use beta_canonical_last_factors_equal
use all_prime_succ_elim_last
use beta_at_unique
use prime_nonzero
use mul_right_cancel_nonzero
use all_prime_succ_elim_prefix
use sorted_succ_elim_prefix
intro b
intro c
intro z
intro e
intro l
intro k
intro n
intro hall1
intro hsort1
intro hprod1
intro hall2
intro hsort2
intro hprod2
have hdec1 : exists p r. (((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S r = S ((S l) * v)) /\ exists w. u = w * 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 w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ n = r * p))
specialize beta_product_succ_decompose b
specialize beta_product_succ_decompose c
specialize beta_product_succ_decompose l
specialize beta_product_succ_decompose n
apply beta_product_succ_decompose
exact hprod1
cases hdec1
cases hdec1_witness
cases hdec1_witness_witness
cases hdec1_witness_witness_right
have hdec2 : exists p s. (((exists h. h + S p = S ((S k) * e)) /\ exists w. z = w * S ((S k) * e) + p) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S s = S ((S k) * v)) /\ exists w. u = w * S ((S k) * v) + s) /\ forall i. (exists h. h + S i = k) -> exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ n = s * p))
specialize beta_product_succ_decompose z
specialize beta_product_succ_decompose e
specialize beta_product_succ_decompose k
specialize beta_product_succ_decompose n
apply beta_product_succ_decompose
exact hprod2
cases hdec2
cases hdec2_witness
cases hdec2_witness_witness
cases hdec2_witness_witness_right
have hfactor_eq : x = x2
specialize beta_canonical_last_factors_equal b
specialize beta_canonical_last_factors_equal c
specialize beta_canonical_last_factors_equal z
specialize beta_canonical_last_factors_equal e
specialize beta_canonical_last_factors_equal l
specialize beta_canonical_last_factors_equal k
specialize beta_canonical_last_factors_equal n
specialize beta_canonical_last_factors_equal x
specialize beta_canonical_last_factors_equal x2
apply beta_canonical_last_factors_equal
exact hall1
exact hsort1
exact hprod1
exact hdec1_witness_witness_left
exact hall2
exact hsort2
exact hprod2
exact hdec2_witness_witness_left
have hshared_at2 : ((exists h. h + S x = S ((S k) * e)) /\ exists w. z = w * S ((S k) * e) + x)
rewrite hfactor_eq
rewrite hfactor_eq
exact hdec2_witness_witness_left
have hshared_prod2 : n = x3 * x
rewrite hfactor_eq
exact hdec2_witness_witness_right_right
have hlastprime : exists t. (((exists h. h + S t = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + t) /\ (~(t = 1) /\ forall a d. t = a * d -> a = 1 \/ d = 1))
specialize all_prime_succ_elim_last b
specialize all_prime_succ_elim_last c
specialize all_prime_succ_elim_last l
apply all_prime_succ_elim_last
exact hall1
cases hlastprime
cases hlastprime_witness
have hfactor_last : x = x4
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique l
specialize beta_at_unique x
specialize beta_at_unique x4
apply beta_at_unique
exact hdec1_witness_witness_left
exact hlastprime_witness_left
have hprime : (~(x = 1) /\ forall a d. x = a * d -> a = 1 \/ d = 1)
rewrite hfactor_last
rewrite hfactor_last
exact hlastprime_witness_right
have hnonzero : ~(x = 0)
intro hxzero
specialize prime_nonzero x
apply prime_nonzero
exact hprime
exact hxzero
have hmuleq : x1 * x = x3 * x
trans n
symm
exact hdec1_witness_witness_right_right
exact hshared_prod2
have hprefix_eq : x1 = x3
specialize mul_right_cancel_nonzero x1
specialize mul_right_cancel_nonzero x3
specialize mul_right_cancel_nonzero x
apply mul_right_cancel_nonzero
exact hnonzero
exact hmuleq
have hallprefix1 : (forall i. (exists h. h + S i = l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1)))
specialize all_prime_succ_elim_prefix b
specialize all_prime_succ_elim_prefix c
specialize all_prime_succ_elim_prefix l
apply all_prime_succ_elim_prefix
exact hall1
have hsortprefix1 : (forall i. (exists h. h + S S i = l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))
specialize sorted_succ_elim_prefix b
specialize sorted_succ_elim_prefix c
specialize sorted_succ_elim_prefix l
apply sorted_succ_elim_prefix
exact hsort1
have hallprefix2 : (forall i. (exists h. h + S i = k) -> exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1)))
specialize all_prime_succ_elim_prefix z
specialize all_prime_succ_elim_prefix e
specialize all_prime_succ_elim_prefix k
apply all_prime_succ_elim_prefix
exact hall2
have hsortprefix2 : (forall i. (exists h. h + S S i = k) -> exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. z = w * S ((S S i) * e) + q) /\ (exists h. h + p = q))))
specialize sorted_succ_elim_prefix z
specialize sorted_succ_elim_prefix e
specialize sorted_succ_elim_prefix k
apply sorted_succ_elim_prefix
exact hsort2
exists x
exists x1
exists x3
split
exact hdec1_witness_witness_left
split
exact hshared_at2
split
exact hallprefix1
split
exact hsortprefix1
split
exact hdec1_witness_witness_right_left
split
exact hallprefix2
split
exact hsortprefix2
split
exact hdec2_witness_witness_right_left
split
exact hdec1_witness_witness_right_right
split
exact hshared_prod2
exact hprefix_eq
qed
- Occurrences
- 18,993
- Distinct objects
- 3,633
- Reused references
- 168
- Depth
- 74
- Cuts
- 552
- Certificate SHA-256
7670e0b1e59f…
prime_factorization_uniqueness_by_lengthPrime-factorization uniqueness by length
β sequences, products & FTA
checked
Strengthened induction on the first canonical factorization length.
Exact expanded PA statement
forall l n b c m d e. ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists w. u = w * 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 w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))))) -> ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S m) * v)) /\ exists w. u = w * S ((S m) * v) + n) /\ forall i. (exists h. h + S i = m) -> exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = m) -> exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = m) -> exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. d = w * S ((S S i) * e) + q) /\ (exists h. h + p = q)))))) -> (l = m /\ forall i p q. (exists h. h + S i = l) -> ((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) -> ((exists h. h + S q = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + q) -> p = q)
Complete replay recipe: dependency imports + authored proof
pa prove forall l n b c m d e. ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists w. u = w * 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 w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))))) -> ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S m) * v)) /\ exists w. u = w * S ((S m) * v) + n) /\ forall i. (exists h. h + S i = m) -> exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = m) -> exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = m) -> exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. d = w * S ((S S i) * e) + q) /\ (exists h. h + p = q)))))) -> (l = m /\ forall i p q. (exists h. h + S i = l) -> ((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) -> ((exists h. h + S q = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + q) -> p = q)
use beta_product_zero
use beta_all_prime_product_one_iff_length_zero
use add_eq_zero_right
use succ_ne_zero
use beta_nonempty_all_prime_product_ne_one
use nonzero_is_succ
use beta_canonical_product_cancel_last
use succ_congr
use le_of_succ_le_succ
use le_eq_or_lt
use beta_at_unique
induction l
intro n
intro b
intro c
intro m
intro d
intro e
intro hcan1
intro hcan2
cases hcan1
cases hcan1_right
cases hcan2
cases hcan2_right
have hn1 : n = 1
specialize beta_product_zero b
specialize beta_product_zero c
specialize beta_product_zero n
apply beta_product_zero
exact hcan1_left
have hiff2 : ((n = 1 -> m = 0) /\ (m = 0 -> n = 1))
specialize beta_all_prime_product_one_iff_length_zero d
specialize beta_all_prime_product_one_iff_length_zero e
specialize beta_all_prime_product_one_iff_length_zero m
specialize beta_all_prime_product_one_iff_length_zero n
apply beta_all_prime_product_one_iff_length_zero
exact hcan2_right_left
exact hcan2_left
cases hiff2
have hm0 : m = 0
apply hiff2_left
exact hn1
split
symm
exact hm0
intro i
intro p
intro q
intro hi
intro hat1
intro hat2
exfalso
cases hi
have hsi0 : S i = 0
specialize add_eq_zero_right x
specialize add_eq_zero_right (S i)
apply add_eq_zero_right
exact hi_witness
specialize succ_ne_zero i
apply succ_ne_zero
exact hsi0
intro n
intro b
intro c
intro m
intro d
intro e
intro hcan1
intro hcan2
cases hcan1
cases hcan1_right
cases hcan2
cases hcan2_right
have hiff2 : ((n = 1 -> m = 0) /\ (m = 0 -> n = 1))
specialize beta_all_prime_product_one_iff_length_zero d
specialize beta_all_prime_product_one_iff_length_zero e
specialize beta_all_prime_product_one_iff_length_zero m
specialize beta_all_prime_product_one_iff_length_zero n
apply beta_all_prime_product_one_iff_length_zero
exact hcan2_right_left
exact hcan2_left
cases hiff2
have hmne : ~(m = 0)
intro hm0
have hn1 : n = 1
apply hiff2_right
exact hm0
specialize beta_nonempty_all_prime_product_ne_one b
specialize beta_nonempty_all_prime_product_ne_one c
specialize beta_nonempty_all_prime_product_ne_one l
specialize beta_nonempty_all_prime_product_ne_one n
apply beta_nonempty_all_prime_product_ne_one
exact hcan1_right_left
exact hcan1_left
exact hn1
have hmsucc : exists k. m = S k
specialize nonzero_is_succ m
apply nonzero_is_succ
exact hmne
cases hmsucc
rewrite hmsucc_witness at hcan2_right_left
rewrite hmsucc_witness at hcan2_right_right
rewrite hmsucc_witness at hcan2_left
rewrite hmsucc_witness at hcan2_left
rewrite hmsucc_witness at hcan2_left
have hcancel : exists p r s. (((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) /\ (((exists h. h + S p = S ((S x) * e)) /\ exists w. d = w * S ((S x) * e) + p) /\ ((forall i. (exists h. h + S i = l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ ((forall i. (exists h. h + S S i = l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S r = S ((S l) * v)) /\ exists w. u = w * 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 w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = x) -> exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ ((forall i. (exists h. h + S S i = x) -> exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. d = w * S ((S S i) * e) + q) /\ (exists h. h + p = q)))) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S s = S ((S x) * v)) /\ exists w. u = w * S ((S x) * v) + s) /\ forall i. (exists h. h + S i = x) -> exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ (n = r * p /\ (n = s * p /\ r = s))))))))))
specialize beta_canonical_product_cancel_last b
specialize beta_canonical_product_cancel_last c
specialize beta_canonical_product_cancel_last d
specialize beta_canonical_product_cancel_last e
specialize beta_canonical_product_cancel_last l
specialize beta_canonical_product_cancel_last x
specialize beta_canonical_product_cancel_last n
apply beta_canonical_product_cancel_last
exact hcan1_right_left
exact hcan1_right_right
exact hcan1_left
exact hcan2_right_left
exact hcan2_right_right
exact hcan2_left
cases hcancel
cases hcancel_witness
cases hcancel_witness_witness
cases hcancel_witness_witness_witness
cases hcancel_witness_witness_witness_right
cases hcancel_witness_witness_witness_right_right
cases hcancel_witness_witness_witness_right_right_right
cases hcancel_witness_witness_witness_right_right_right_right
cases hcancel_witness_witness_witness_right_right_right_right_right
cases hcancel_witness_witness_witness_right_right_right_right_right_right
cases hcancel_witness_witness_witness_right_right_right_right_right_right_right
cases hcancel_witness_witness_witness_right_right_right_right_right_right_right_right
cases hcancel_witness_witness_witness_right_right_right_right_right_right_right_right_right
have hprod2prefix_same : (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S x2 = S ((S x) * v)) /\ exists w. u = w * S ((S x) * v) + x2) /\ forall i. (exists h. h + S i = x) -> exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p))))))
rewrite hcancel_witness_witness_witness_right_right_right_right_right_right_right_right_right_right
rewrite hcancel_witness_witness_witness_right_right_right_right_right_right_right_right_right_right
exact hcancel_witness_witness_witness_right_right_right_right_right_right_right_left
have hprefixcan1 : ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S x2 = S ((S l) * v)) /\ exists w. u = w * S ((S l) * v) + x2) /\ forall i. (exists h. h + S i = l) -> exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))))
split
exact hcancel_witness_witness_witness_right_right_right_right_left
split
exact hcancel_witness_witness_witness_right_right_left
exact hcancel_witness_witness_witness_right_right_right_left
have hprefixcan2 : ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S x2 = S ((S x) * v)) /\ exists w. u = w * S ((S x) * v) + x2) /\ forall i. (exists h. h + S i = x) -> exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = x) -> exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = x) -> exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. d = w * S ((S S i) * e) + q) /\ (exists h. h + p = q))))))
split
exact hprod2prefix_same
split
exact hcancel_witness_witness_witness_right_right_right_right_right_left
exact hcancel_witness_witness_witness_right_right_right_right_right_right_left
have hrec : (l = x /\ forall i p q. (exists h. h + S i = l) -> ((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) -> ((exists h. h + S q = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + q) -> p = q)
specialize IH x2
specialize IH b
specialize IH c
specialize IH x
specialize IH d
specialize IH e
apply IH
exact hprefixcan1
exact hprefixcan2
cases hrec
split
have hslen : S l = S x
specialize succ_congr l
specialize succ_congr x
apply succ_congr
exact hrec_left
trans S x
exact hslen
symm
exact hmsucc_witness
intro i
intro p
intro q
intro hi
intro hat1
intro hat2
have hile : (exists h. h + i = l)
specialize le_of_succ_le_succ i
specialize le_of_succ_le_succ l
apply le_of_succ_le_succ
exact hi
have hsplit : i = l \/ (exists h. h + S i = l)
specialize le_eq_or_lt i
specialize le_eq_or_lt l
apply le_eq_or_lt
exact hile
cases hsplit
have hp_last : p = x1
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique l
specialize beta_at_unique p
specialize beta_at_unique x1
apply beta_at_unique
rewrite hsplit_left at hat1
rewrite hsplit_left at hat1
exact hat1
exact hcancel_witness_witness_witness_left
have hq_last : q = x1
specialize beta_at_unique d
specialize beta_at_unique e
specialize beta_at_unique x
specialize beta_at_unique q
specialize beta_at_unique x1
apply beta_at_unique
rewrite hsplit_left at hat2
rewrite hsplit_left at hat2
rewrite hrec_left at hat2
rewrite hrec_left at hat2
exact hat2
exact hcancel_witness_witness_witness_right_left
trans x1
exact hp_last
symm
exact hq_last
specialize hrec_right i
specialize hrec_right p
specialize hrec_right q
apply hrec_right
exact hsplit_right
exact hat1
exact hat2
qed
- Occurrences
- 29,739
- Distinct objects
- 4,291
- Reused references
- 181
- Depth
- 81
- Cuts
- 853
- Certificate SHA-256
c12e77244e85…
prime_factorization_uniquenessUniqueness of finite prime factorization
β sequences, products & FTA
checked
Exact catalog finite prime-factorization uniqueness target.
Exact expanded PA statement
forall n l b c m d e. (((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists w. u = w * 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 w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))))) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S m) * v)) /\ exists w. u = w * S ((S m) * v) + n) /\ forall i. (exists h. h + S i = m) -> exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = m) -> exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = m) -> exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. d = w * S ((S S i) * e) + q) /\ (exists h. h + p = q))))))) -> (l = m /\ forall i p q. (exists h. h + S i = l) -> ((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) -> ((exists h. h + S q = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + q) -> p = q)
Complete replay recipe: dependency imports + authored proof
pa prove forall n l b c m d e. (((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists w. u = w * 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 w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = l) -> exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = l) -> exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))))) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S m) * v)) /\ exists w. u = w * S ((S m) * v) + n) /\ forall i. (exists h. h + S i = m) -> exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = m) -> exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = m) -> exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. d = w * S ((S S i) * e) + q) /\ (exists h. h + p = q))))))) -> (l = m /\ forall i p q. (exists h. h + S i = l) -> ((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) -> ((exists h. h + S q = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + q) -> p = q)
use prime_factorization_uniqueness_by_length
intro n
intro l
intro b
intro c
intro m
intro d
intro e
intro hboth
cases hboth
specialize prime_factorization_uniqueness_by_length l
specialize prime_factorization_uniqueness_by_length n
specialize prime_factorization_uniqueness_by_length b
specialize prime_factorization_uniqueness_by_length c
specialize prime_factorization_uniqueness_by_length m
specialize prime_factorization_uniqueness_by_length d
specialize prime_factorization_uniqueness_by_length e
apply prime_factorization_uniqueness_by_length
exact hboth_left
exact hboth_right
qed
- Occurrences
- 29,789
- Distinct objects
- 4,341
- Reused references
- 181
- Depth
- 82
- Cuts
- 854
- Certificate SHA-256
2d7a7156431d…
fundamental_theorem_of_arithmeticFundamental theorem of arithmetic
β sequences, products & FTA
checked
Native beta-coded prime-factorization existence and uniqueness in first-order PA; no conventional list primitive and no DNE.
Exact expanded PA statement
(forall n. ~(n = 0) -> exists l b c. ((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. (exists h. h + S i = l) -> exists p. (((exists h. h + S (p) = S ((S (i)) * c)) /\ exists w. b = w * S ((S (i)) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S (S i) = l) -> exists p q. (((exists h. h + S (p) = S ((S (i)) * c)) /\ exists w. b = w * S ((S (i)) * c) + p) /\ (((exists h. h + S (q) = S ((S (S i)) * c)) /\ exists w. b = w * S ((S (S i)) * c) + q) /\ exists h. h + p = q)))))) /\ (forall n l b c m d e. (((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. (exists h. h + S i = l) -> exists p. (((exists h. h + S (p) = S ((S (i)) * c)) /\ exists w. b = w * S ((S (i)) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S (S i) = l) -> exists p q. (((exists h. h + S (p) = S ((S (i)) * c)) /\ exists w. b = w * S ((S (i)) * c) + p) /\ (((exists h. h + S (q) = S ((S (S i)) * c)) /\ exists w. b = w * S ((S (S i)) * c) + q) /\ exists h. h + p = q))))) /\ ((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 m) * v)) /\ exists q. u = q * S ((S m) * v) + n) /\ forall i. (exists h. h + S i = m) -> exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists q. d = 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)))))) /\ ((forall i. (exists h. h + S i = m) -> exists p. (((exists h. h + S (p) = S ((S (i)) * e)) /\ exists w. d = w * S ((S (i)) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S (S i) = m) -> exists p q. (((exists h. h + S (p) = S ((S (i)) * e)) /\ exists w. d = w * S ((S (i)) * e) + p) /\ (((exists h. h + S (q) = S ((S (S i)) * e)) /\ exists w. d = w * S ((S (S i)) * e) + q) /\ exists h. h + p = q)))))) -> (l = m /\ forall i p q. (exists h. h + S i = l) -> ((exists h. h + S (p) = S ((S (i)) * c)) /\ exists w. b = w * S ((S (i)) * c) + p) -> ((exists h. h + S (q) = S ((S (i)) * e)) /\ exists w. d = w * S ((S (i)) * e) + q) -> p = q))
Complete replay recipe: dependency imports + authored proof
pa prove (forall n. ~(n = 0) -> exists l b c. ((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. (exists h. h + S i = l) -> exists p. (((exists h. h + S (p) = S ((S (i)) * c)) /\ exists w. b = w * S ((S (i)) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S (S i) = l) -> exists p q. (((exists h. h + S (p) = S ((S (i)) * c)) /\ exists w. b = w * S ((S (i)) * c) + p) /\ (((exists h. h + S (q) = S ((S (S i)) * c)) /\ exists w. b = w * S ((S (S i)) * c) + q) /\ exists h. h + p = q)))))) /\ (forall n l b c m d e. (((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. (exists h. h + S i = l) -> exists p. (((exists h. h + S (p) = S ((S (i)) * c)) /\ exists w. b = w * S ((S (i)) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S (S i) = l) -> exists p q. (((exists h. h + S (p) = S ((S (i)) * c)) /\ exists w. b = w * S ((S (i)) * c) + p) /\ (((exists h. h + S (q) = S ((S (S i)) * c)) /\ exists w. b = w * S ((S (S i)) * c) + q) /\ exists h. h + p = q))))) /\ ((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 m) * v)) /\ exists q. u = q * S ((S m) * v) + n) /\ forall i. (exists h. h + S i = m) -> exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists q. d = 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)))))) /\ ((forall i. (exists h. h + S i = m) -> exists p. (((exists h. h + S (p) = S ((S (i)) * e)) /\ exists w. d = w * S ((S (i)) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -> a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S (S i) = m) -> exists p q. (((exists h. h + S (p) = S ((S (i)) * e)) /\ exists w. d = w * S ((S (i)) * e) + p) /\ (((exists h. h + S (q) = S ((S (S i)) * e)) /\ exists w. d = w * S ((S (S i)) * e) + q) /\ exists h. h + p = q)))))) -> (l = m /\ forall i p q. (exists h. h + S i = l) -> ((exists h. h + S (p) = S ((S (i)) * c)) /\ exists w. b = w * S ((S (i)) * c) + p) -> ((exists h. h + S (q) = S ((S (i)) * e)) /\ exists w. d = w * S ((S (i)) * e) + q) -> p = q))
use prime_factorization_existence
use prime_factorization_uniqueness
split
exact prime_factorization_existence
exact prime_factorization_uniqueness
qed
- Occurrences
- 73,767
- Distinct objects
- 8,701
- Reused references
- 377
- Depth
- 99
- Cuts
- 2,184
- Certificate SHA-256
fd978f59bf3b…
prime_threeThree is prime
Primes
checked
Three is prime in the expanded first-order prime predicate.
Exact expanded PA statement
~(3 = 1) /\ forall a b. 3 = a * b -> a = 1 \/ b = 1
Complete replay recipe: dependency imports + authored proof
pa prove ~(3 = 1) /\ forall a b. 3 = a * b -> a = 1 \/ b = 1
use mul_succ_left
use mul_eq_one_components
use add_eq_zero_left
use mul_eq_zero
use mul_zero_left
use zero_or_succ
have hlarge : forall x y. ~(3 = S (S x) * S (S y))
intro x
intro y
intro hlarge_eq
specialize mul_succ_left (S x)
specialize mul_succ_left (S (S y))
rewrite mul_succ_left at hlarge_eq
rewrite PA4 at hlarge_eq
rewrite PA4 at hlarge_eq
have hone : 1 = S x * S (S y) + y
apply PA2
apply PA2
exact hlarge_eq
have hysplit : y = 0 \/ exists z. y = S z
specialize zero_or_succ y
exact zero_or_succ
cases hysplit
rewrite hysplit_left at hone
rewrite hysplit_left at hone
rewrite PA3 at hone
have hprod_one : S x * S (S 0) = 1
symm
exact hone
have hcomponents : S x = 1 /\ S (S 0) = 1
specialize mul_eq_one_components (S x)
specialize mul_eq_one_components (S (S 0))
apply mul_eq_one_components
exact hprod_one
cases hcomponents
have h10 : 1 = 0
apply PA2
exact hcomponents_right
apply PA1
exact h10
cases hysplit_right
rewrite hysplit_right_witness at hone
rewrite hysplit_right_witness at hone
rewrite PA4 at hone
have hzero : 0 = S x * S (S (S x1)) + x1
apply PA2
exact hone
have hsumzero : S x * S (S (S x1)) + x1 = 0
symm
exact hzero
have hprodzero : S x * S (S (S x1)) = 0
specialize add_eq_zero_left (S x * S (S (S x1)))
specialize add_eq_zero_left x1
apply add_eq_zero_left
exact hsumzero
have hfactors : S x = 0 \/ S (S (S x1)) = 0
specialize mul_eq_zero (S x)
specialize mul_eq_zero (S (S (S x1)))
apply mul_eq_zero
exact hprodzero
cases hfactors
apply PA1
exact hfactors_left
apply PA1
exact hfactors_right
split
intro h31
have h20 : 2 = 0
apply PA2
exact h31
apply PA1
exact h20
intro a
induction b
intro hab
rewrite PA5 at hab
exfalso
apply PA1
exact hab
induction b
intro hab
right
refl
induction a
intro hab
specialize mul_zero_left (S (S b))
rewrite mul_zero_left at hab
exfalso
apply PA1
exact hab
induction a
intro hab
left
refl
intro hab
exfalso
specialize hlarge a
specialize hlarge b
apply hlarge
exact hab
qed
- Occurrences
- 691
- Distinct objects
- 522
- Reused references
- 41
- Depth
- 43
- Cuts
- 18
- Certificate SHA-256
e6386e0d41a9…
two_prime_product_uniquenessA product of two primes is unique up to order
β sequences, products & FTA
checked
A product of two primes determines its factors up to swapping them.
Exact expanded PA statement
forall p q r s. (~(p = 1) /\ forall a b. p = a * b -> a = 1 \/ b = 1) -> (~(q = 1) /\ forall c d. q = c * d -> c = 1 \/ d = 1) -> (~(r = 1) /\ forall e f. r = e * f -> e = 1 \/ f = 1) -> (~(s = 1) /\ forall g h. s = g * h -> g = 1 \/ h = 1) -> p * q = r * s -> (p = r /\ q = s) \/ (p = s /\ q = r)
Complete replay recipe: dependency imports + authored proof
pa prove forall p q r s. (~(p = 1) /\ forall a b. p = a * b -> a = 1 \/ b = 1) -> (~(q = 1) /\ forall c d. q = c * d -> c = 1 \/ d = 1) -> (~(r = 1) /\ forall e f. r = e * f -> e = 1 \/ f = 1) -> (~(s = 1) /\ forall g h. s = g * h -> g = 1 \/ h = 1) -> p * q = r * s -> (p = r /\ q = s) \/ (p = s /\ q = r)
use euclid_prime_dvd_product
use prime_divisor_eq_one_or_self
use prime_nonzero
use mul_left_cancel_nonzero
use mul_comm
intro p
intro q
intro r
intro s
intro hp
cases hp
intro hq
intro hr
intro hs
intro hproduct
have hpdiv : exists k. r * s = p * k
exists q
symm
exact hproduct
have hcases : (exists u. r = p * u) \/ exists v. s = p * v
specialize euclid_prime_dvd_product p
specialize euclid_prime_dvd_product r
specialize euclid_prime_dvd_product s
apply euclid_prime_dvd_product
split
exact hp_left
exact hp_right
exact hpdiv
cases hcases
have hpr : p = 1 \/ r = p
specialize prime_divisor_eq_one_or_self r
specialize prime_divisor_eq_one_or_self p
apply prime_divisor_eq_one_or_self
exact hr
exact hcases_left
cases hpr
exfalso
apply hp_left
exact hpr_left
left
split
symm
exact hpr_right
specialize mul_left_cancel_nonzero r
specialize mul_left_cancel_nonzero q
specialize mul_left_cancel_nonzero s
apply mul_left_cancel_nonzero
intro hrzero
specialize prime_nonzero r
apply prime_nonzero
exact hr
exact hrzero
rewrite <- hpr_right at hproduct
exact hproduct
have hps : p = 1 \/ s = p
specialize prime_divisor_eq_one_or_self s
specialize prime_divisor_eq_one_or_self p
apply prime_divisor_eq_one_or_self
exact hs
exact hcases_right
cases hps
exfalso
apply hp_left
exact hps_left
right
split
symm
exact hps_right
specialize mul_left_cancel_nonzero s
specialize mul_left_cancel_nonzero q
specialize mul_left_cancel_nonzero r
apply mul_left_cancel_nonzero
intro hszero
specialize prime_nonzero s
apply prime_nonzero
exact hs
exact hszero
rewrite <- hps_right at hproduct
specialize mul_comm r
specialize mul_comm s
rewrite mul_comm at hproduct
exact hproduct
qed
- Occurrences
- 6,035
- Distinct objects
- 2,051
- Reused references
- 120
- Depth
- 56
- Cuts
- 181
- Certificate SHA-256
bb1cd0a1af5d…
fourth_power_regroupRegroup a fourth power as a square of a square
Multiplication
checked
Regroup a fourth power as the square of a square.
Exact expanded PA statement
forall n. n * n * n * n = (n * n) * (n * n)
Complete replay recipe: dependency imports + authored proof
pa prove forall n. n * n * n * n = (n * n) * (n * n)
use mul_assoc
intro n
apply mul_assoc
qed
- Occurrences
- 122
- Distinct objects
- 110
- Reused references
- 12
- Depth
- 18
- Cuts
- 3
- Certificate SHA-256
d49403a5bc73…
mod5_residue_completeEvery natural has one of five residues modulo five
Congruence & CRT
checked
Every natural number has one of the five canonical residues modulo five.
Exact expanded PA statement
forall n. exists q. n = 5 * q \/ n = 5 * q + 1 \/ n = 5 * q + 2 \/ n = 5 * q + 3 \/ n = 5 * q + 4
Complete replay recipe: dependency imports + authored proof
pa prove forall n. exists q. n = 5 * q \/ n = 5 * q + 1 \/ n = 5 * q + 2 \/ n = 5 * q + 3 \/ n = 5 * q + 4
induction n
exists 0
left
left
left
left
norm_num
cases IH
cases IH_witness
cases IH_witness_left
cases IH_witness_left_left
cases IH_witness_left_left_left
exists x
left
left
left
right
rewrite IH_witness_left_left_left_left
simp
exists x
left
left
right
rewrite IH_witness_left_left_left_right
simp
exists x
left
right
rewrite IH_witness_left_left_right
simp
exists x
right
rewrite IH_witness_left_right
simp
exists x + 1
left
left
left
left
rewrite IH_witness_right
simp
qed
- Occurrences
- 248
- Distinct objects
- 214
- Reused references
- 34
- Depth
- 28
- Cuts
- 0
- Certificate SHA-256
f89dfde45b60…
mod5_nonzero_residue_casesA nonmultiple of five has a nonzero residue
Congruence & CRT
checked
A nonmultiple of five lies in one of the four nonzero residue classes.
Exact expanded PA statement
forall n. ~(exists q. n = 5 * q) -> exists q. n = 5 * q + 1 \/ n = 5 * q + 2 \/ n = 5 * q + 3 \/ n = 5 * q + 4
Complete replay recipe: dependency imports + authored proof
pa prove forall n. ~(exists q. n = 5 * q) -> exists q. n = 5 * q + 1 \/ n = 5 * q + 2 \/ n = 5 * q + 3 \/ n = 5 * q + 4
use mod5_residue_complete
intro n
intro h
specialize mod5_residue_complete n
cases mod5_residue_complete
cases mod5_residue_complete_witness
cases mod5_residue_complete_witness_left
cases mod5_residue_complete_witness_left_left
cases mod5_residue_complete_witness_left_left_left
exfalso
apply h
exists x
exact mod5_residue_complete_witness_left_left_left_left
exists x
left
left
left
exact mod5_residue_complete_witness_left_left_left_right
exists x
left
left
right
exact mod5_residue_complete_witness_left_left_right
exists x
left
right
exact mod5_residue_complete_witness_left_right
exists x
right
exact mod5_residue_complete_witness_right
qed
- Occurrences
- 287
- Distinct objects
- 253
- Reused references
- 34
- Depth
- 29
- Cuts
- 1
- Certificate SHA-256
b9e7df484004…
mod5_square_residue_oneSquaring residue one modulo five preserves residue one
Congruence & CRT
checked
Squaring residue one modulo five preserves residue one.
Exact expanded PA statement
forall z q. z = 5 * q + 1 -> z * z = 5 * (q * z + q) + 1
Complete replay recipe: dependency imports + authored proof
pa prove forall z q. z = 5 * q + 1 -> z * z = 5 * (q * z + q) + 1
use add_assoc
use mul_add
use mul_assoc
use mul_succ_left
intro z
intro q
intro hz
trans (5 * q + 1) * z
congr
exact hz
refl
trans S(5 * q) * z
congr
simp
refl
trans (5 * q) * z + z
apply mul_succ_left
trans 5 * (q * z) + z
congr
apply mul_assoc
refl
trans 5 * (q * z) + (5 * q + 1)
congr
refl
exact hz
trans (5 * (q * z) + 5 * q) + 1
symm
apply add_assoc
congr
symm
apply mul_add
refl
qed
- Occurrences
- 450
- Distinct objects
- 277
- Reused references
- 33
- Depth
- 26
- Cuts
- 11
- Certificate SHA-256
f84410e6ab51…
mod5_square_residue_twoSquaring residue two modulo five gives residue four
Congruence & CRT
checked
Squaring residue two modulo five gives residue four.
Exact expanded PA statement
forall z q. z = 5 * q + 2 -> z * z = 5 * ((q * z + q) + q) + 4
Complete replay recipe: dependency imports + authored proof
pa prove forall z q. z = 5 * q + 2 -> z * z = 5 * ((q * z + q) + q) + 4
use add_comm
use add_assoc
use mul_add
use mul_assoc
use mul_succ_left
intro z
intro q
intro hz
trans (5 * q + 2) * z
congr
exact hz
refl
trans S(S(5 * q)) * z
congr
simp
refl
trans S(5 * q) * z + z
apply mul_succ_left
trans ((5 * q) * z + z) + z
congr
apply mul_succ_left
refl
trans (5 * (q * z) + z) + z
congr
congr
apply mul_assoc
refl
refl
trans (5 * (q * z) + (5 * q + 2)) + (5 * q + 2)
congr
congr
refl
exact hz
exact hz
simp [add_comm, add_assoc, mul_add]
qed
- Occurrences
- 641
- Distinct objects
- 373
- Reused references
- 56
- Depth
- 42
- Cuts
- 14
- Certificate SHA-256
5e6df4f87532…
mod5_square_residue_threeSquaring residue three modulo five gives residue four
Congruence & CRT
checked
Squaring residue three modulo five gives residue four.
Exact expanded PA statement
forall z q. z = 5 * q + 3 -> z * z = 5 * ((q * z + 3 * q) + 1) + 4
Complete replay recipe: dependency imports + authored proof
pa prove forall z q. z = 5 * q + 3 -> z * z = 5 * ((q * z + 3 * q) + 1) + 4
use square_residue_lift
intro z
intro q
intro hz
apply square_residue_lift
exact hz
norm_num
qed
- Occurrences
- 1,185
- Distinct objects
- 598
- Reused references
- 42
- Depth
- 31
- Cuts
- 29
- Certificate SHA-256
a427916ee3e7…
mod5_square_residue_fourSquaring residue four modulo five gives residue one
Congruence & CRT
checked
Squaring residue four modulo five gives residue one.
Exact expanded PA statement
forall z q. z = 5 * q + 4 -> z * z = 5 * ((q * z + 4 * q) + 3) + 1
Complete replay recipe: dependency imports + authored proof
pa prove forall z q. z = 5 * q + 4 -> z * z = 5 * ((q * z + 4 * q) + 3) + 1
use square_residue_lift
intro z
intro q
intro hz
apply square_residue_lift
exact hz
norm_num
qed
- Occurrences
- 1,283
- Distinct objects
- 696
- Reused references
- 42
- Depth
- 31
- Cuts
- 29
- Certificate SHA-256
271a2d490759…
mod5_fourth_power_residue_oneFourth powers preserve residue one modulo five
Congruence & CRT
checked
A number congruent to one modulo five has fourth power congruent to one.
Exact expanded PA statement
forall q. exists w. (5 * q + 1) * (5 * q + 1) * (5 * q + 1) * (5 * q + 1) = 5 * w + 1
Complete replay recipe: dependency imports + authored proof
pa prove forall q. exists w. (5 * q + 1) * (5 * q + 1) * (5 * q + 1) * (5 * q + 1) = 5 * w + 1
use mod5_square_residue_one
use mul_assoc
intro q
exists (q * (5 * q + 1) + q) * ((5 * q + 1) * (5 * q + 1)) + (q * (5 * q + 1) + q)
trans ((5 * q + 1) * (5 * q + 1)) * ((5 * q + 1) * (5 * q + 1))
apply mul_assoc
apply mod5_square_residue_one
apply mod5_square_residue_one
refl
qed
- Occurrences
- 584
- Distinct objects
- 295
- Reused references
- 34
- Depth
- 27
- Cuts
- 15
- Certificate SHA-256
bdde252c1412…
mod5_fourth_power_residue_twoFourth powers of residue two are one modulo five
Congruence & CRT
checked
A number congruent to two modulo five has fourth power congruent to one.
Exact expanded PA statement
forall q. exists w. (5 * q + 2) * (5 * q + 2) * (5 * q + 2) * (5 * q + 2) = 5 * w + 1
Complete replay recipe: dependency imports + authored proof
pa prove forall q. exists w. (5 * q + 2) * (5 * q + 2) * (5 * q + 2) * (5 * q + 2) = 5 * w + 1
use mod5_square_residue_two
use mod5_square_residue_four
use mul_assoc
intro q
exists ((((q * (5 * q + 2) + q) + q) * ((5 * q + 2) * (5 * q + 2)) + 4 * ((q * (5 * q + 2) + q) + q)) + 3)
trans ((5 * q + 2) * (5 * q + 2)) * ((5 * q + 2) * (5 * q + 2))
apply mul_assoc
apply mod5_square_residue_four
apply mod5_square_residue_two
refl
qed
- Occurrences
- 2,059
- Distinct objects
- 861
- Reused references
- 72
- Depth
- 43
- Cuts
- 48
- Certificate SHA-256
3ec61a64b955…
mod5_fourth_power_residue_threeFourth powers of residue three are one modulo five
Congruence & CRT
checked
A number congruent to three modulo five has fourth power congruent to one.
Exact expanded PA statement
forall q. exists w. (5 * q + 3) * (5 * q + 3) * (5 * q + 3) * (5 * q + 3) = 5 * w + 1
Complete replay recipe: dependency imports + authored proof
pa prove forall q. exists w. (5 * q + 3) * (5 * q + 3) * (5 * q + 3) * (5 * q + 3) = 5 * w + 1
use mod5_square_residue_three
use mod5_square_residue_four
use mul_assoc
intro q
exists (((((q * (5 * q + 3) + 3 * q) + 1) * ((5 * q + 3) * (5 * q + 3)) + 4 * ((q * (5 * q + 3) + 3 * q) + 1)) + 3))
trans ((5 * q + 3) * (5 * q + 3)) * ((5 * q + 3) * (5 * q + 3))
apply mul_assoc
apply mod5_square_residue_four
apply mod5_square_residue_three
refl
qed
- Occurrences
- 2,603
- Distinct objects
- 892
- Reused references
- 44
- Depth
- 33
- Cuts
- 63
- Certificate SHA-256
d070cbf4af5a…
mod5_fourth_power_residue_fourFourth powers of residue four are one modulo five
Congruence & CRT
checked
A number congruent to four modulo five has fourth power congruent to one.
Exact expanded PA statement
forall q. exists w. (5 * q + 4) * (5 * q + 4) * (5 * q + 4) * (5 * q + 4) = 5 * w + 1
Complete replay recipe: dependency imports + authored proof
pa prove forall q. exists w. (5 * q + 4) * (5 * q + 4) * (5 * q + 4) * (5 * q + 4) = 5 * w + 1
use mod5_square_residue_four
use mod5_square_residue_one
use mul_assoc
intro q
exists ((q * (5 * q + 4) + 4 * q) + 3) * ((5 * q + 4) * (5 * q + 4)) + ((q * (5 * q + 4) + 4 * q) + 3)
trans ((5 * q + 4) * (5 * q + 4)) * ((5 * q + 4) * (5 * q + 4))
apply mul_assoc
apply mod5_square_residue_one
apply mod5_square_residue_four
refl
qed
- Occurrences
- 1,868
- Distinct objects
- 765
- Reused references
- 49
- Depth
- 32
- Cuts
- 45
- Certificate SHA-256
9b506838edf8…
mod5_fourth_power_oneA nonmultiple of five has fourth power one modulo five
Congruence & CRT
checked
A fourth power of a nonmultiple of five is one modulo five.
Exact expanded PA statement
forall n. ~(exists x. n = 5 * x) -> exists x. n * n * n * n = 5 * x + 1
Complete replay recipe: dependency imports + authored proof
pa prove forall n. ~(exists x. n = 5 * x) -> exists x. n * n * n * n = 5 * x + 1
use mod5_residue_complete
use square_residue_lift
use mul_assoc
intro n
intro h
specialize mod5_residue_complete n
cases mod5_residue_complete
cases mod5_residue_complete_witness
cases mod5_residue_complete_witness_left
cases mod5_residue_complete_witness_left_left
cases mod5_residue_complete_witness_left_left_left
exfalso
apply h
exists x
exact mod5_residue_complete_witness_left_left_left_left
have hsquare : n * n = 5 * ((x * n + 1 * x) + 0) + 1
apply square_residue_lift
exact mod5_residue_complete_witness_left_left_left_right
norm_num
exists ((((x * n + 1 * x) + 0) * (n * n) + 1 * ((x * n + 1 * x) + 0)) + 0)
trans (n * n) * (n * n)
apply mul_assoc
apply square_residue_lift
exact hsquare
norm_num
have hsquare : n * n = 5 * ((x * n + 2 * x) + 0) + 4
apply square_residue_lift
exact mod5_residue_complete_witness_left_left_right
norm_num
exists ((((x * n + 2 * x) + 0) * (n * n) + 4 * ((x * n + 2 * x) + 0)) + 3)
trans (n * n) * (n * n)
apply mul_assoc
apply square_residue_lift
exact hsquare
norm_num
have hsquare : n * n = 5 * ((x * n + 3 * x) + 1) + 4
apply square_residue_lift
exact mod5_residue_complete_witness_left_right
norm_num
exists ((((x * n + 3 * x) + 1) * (n * n) + 4 * ((x * n + 3 * x) + 1)) + 3)
trans (n * n) * (n * n)
apply mul_assoc
apply square_residue_lift
exact hsquare
norm_num
have hsquare : n * n = 5 * ((x * n + 4 * x) + 3) + 1
apply square_residue_lift
exact mod5_residue_complete_witness_right
norm_num
exists ((((x * n + 4 * x) + 3) * (n * n) + 1 * ((x * n + 4 * x) + 3)) + 0)
trans (n * n) * (n * n)
apply mul_assoc
apply square_residue_lift
exact hsquare
norm_num
qed
- Occurrences
- 2,675
- Distinct objects
- 1,935
- Reused references
- 80
- Depth
- 38
- Cuts
- 33
- Certificate SHA-256
67a58b050043…
parity_casesParity cases
Quadratic reciprocity campaign
checked
Every natural has a constructive even-or-odd witness.
Exact expanded PA statement
forall n. exists k. n = 2 * k \/ n = 2 * k + 1
Complete replay recipe: dependency imports + authored proof
pa prove forall n. exists k. n = 2 * k \/ n = 2 * k + 1
induction n
exists 0
left
norm_num
cases IH
cases IH_witness
exists x
right
rewrite IH_witness_left
simp
exists x + 1
left
rewrite IH_witness_right
simp
qed
- Occurrences
- 80
- Distinct objects
- 73
- Reused references
- 7
- Depth
- 19
- Cuts
- 0
- Certificate SHA-256
958d38a5bc3e…
even_odd_exclusive_pointwiseEven odd exclusive pointwise
Quadratic reciprocity campaign
checked
An even and an odd decomposition of the same natural are incompatible.
Exact expanded PA statement
forall n a b. n = 2 * a -> n = 2 * b + 1 -> false
Complete replay recipe: dependency imports + authored proof
pa prove forall n a b. n = 2 * a -> n = 2 * b + 1 -> false
use division_remainder_unique
intro n
intro a
intro b
intro he
intro ho
have hu : a = b /\ 0 = 1
specialize division_remainder_unique 2
specialize division_remainder_unique n
specialize division_remainder_unique a
specialize division_remainder_unique 0
specialize division_remainder_unique b
specialize division_remainder_unique 1
apply division_remainder_unique
rewrite he
simp
exists 1
norm_num
exact ho
exists 0
norm_num
cases hu
apply PA1
symm
exact hu_right
qed
- Occurrences
- 928
- Distinct objects
- 617
- Reused references
- 23
- Depth
- 58
- Cuts
- 23
- Certificate SHA-256
77e109bc6645…
even_not_oddEven not odd
Quadratic reciprocity campaign
checked
No even natural is odd.
Exact expanded PA statement
forall n. (exists a. n = 2 * a) -> ~(exists b. n = 2 * b + 1)
Complete replay recipe: dependency imports + authored proof
pa prove forall n. (exists a. n = 2 * a) -> ~(exists b. n = 2 * b + 1)
use even_odd_exclusive_pointwise
intro n
intro he
intro ho
cases he
cases ho
specialize even_odd_exclusive_pointwise n
specialize even_odd_exclusive_pointwise x
specialize even_odd_exclusive_pointwise x1
apply even_odd_exclusive_pointwise
exact he_witness
exact ho_witness
qed
- Occurrences
- 953
- Distinct objects
- 642
- Reused references
- 23
- Depth
- 59
- Cuts
- 24
- Certificate SHA-256
70a1576b3f52…
odd_not_evenOdd not even
Quadratic reciprocity campaign
checked
No odd natural is even.
Exact expanded PA statement
forall n. (exists b. n = 2 * b + 1) -> ~(exists a. n = 2 * a)
Complete replay recipe: dependency imports + authored proof
pa prove forall n. (exists b. n = 2 * b + 1) -> ~(exists a. n = 2 * a)
use even_odd_exclusive_pointwise
intro n
intro ho
intro he
cases ho
cases he
specialize even_odd_exclusive_pointwise n
specialize even_odd_exclusive_pointwise x1
specialize even_odd_exclusive_pointwise x
apply even_odd_exclusive_pointwise
exact he_witness
exact ho_witness
qed
- Occurrences
- 953
- Distinct objects
- 642
- Reused references
- 23
- Depth
- 59
- Cuts
- 24
- Certificate SHA-256
9d87768cd216…
successor_odd_of_evenSuccessor odd of even
Quadratic reciprocity campaign
checked
The successor of an even natural is odd.
Exact expanded PA statement
forall n. (exists a. n = 2 * a) -> exists b. S n = 2 * b + 1
Complete replay recipe: dependency imports + authored proof
pa prove forall n. (exists a. n = 2 * a) -> exists b. S n = 2 * b + 1
intro n
intro he
cases he
exists x
rewrite he_witness
simp
qed
- Occurrences
- 18
- Distinct objects
- 18
- Reused references
- 0
- Depth
- 10
- Cuts
- 0
- Certificate SHA-256
60be8e49bc3a…
successor_even_of_oddSuccessor even of odd
Quadratic reciprocity campaign
checked
The successor of an odd natural is even.
Exact expanded PA statement
forall n. (exists a. n = 2 * a + 1) -> exists b. S n = 2 * b
Complete replay recipe: dependency imports + authored proof
pa prove forall n. (exists a. n = 2 * a + 1) -> exists b. S n = 2 * b
intro n
intro ho
cases ho
exists x + 1
rewrite ho_witness
simp
qed
- Occurrences
- 46
- Distinct objects
- 41
- Reused references
- 5
- Depth
- 16
- Cuts
- 0
- Certificate SHA-256
f2a63e2bd60e…
even_add_evenEven add even
Quadratic reciprocity campaign
checked
The sum of two even naturals is even.
Exact expanded PA statement
forall m n. (exists a. m = 2 * a) -> (exists b. n = 2 * b) -> exists c. m + n = 2 * c
Complete replay recipe: dependency imports + authored proof
pa prove forall m n. (exists a. m = 2 * a) -> (exists b. n = 2 * b) -> exists c. m + n = 2 * c
use mul_add
intro m
intro n
intro hm
intro hn
cases hm
cases hn
exists x + x1
rewrite hm_witness
rewrite hn_witness
simp [mul_add]
qed
- Occurrences
- 100
- Distinct objects
- 93
- Reused references
- 7
- Depth
- 17
- Cuts
- 2
- Certificate SHA-256
6ac093483969…
even_add_oddEven add odd
Quadratic reciprocity campaign
checked
An even natural plus an odd natural is odd.
Exact expanded PA statement
forall m n. (exists a. m = 2 * a) -> (exists b. n = 2 * b + 1) -> exists c. m + n = 2 * c + 1
Complete replay recipe: dependency imports + authored proof
pa prove forall m n. (exists a. m = 2 * a) -> (exists b. n = 2 * b + 1) -> exists c. m + n = 2 * c + 1
use mul_add
use add_assoc
intro m
intro n
intro hm
intro hn
cases hm
cases hn
exists x + x1
rewrite hm_witness
rewrite hn_witness
simp [mul_add, add_assoc]
qed
- Occurrences
- 157
- Distinct objects
- 112
- Reused references
- 13
- Depth
- 22
- Cuts
- 3
- Certificate SHA-256
5abbdaf62582…
odd_add_evenOdd add even
Quadratic reciprocity campaign
checked
An odd natural plus an even natural is odd.
Exact expanded PA statement
forall m n. (exists a. m = 2 * a + 1) -> (exists b. n = 2 * b) -> exists c. m + n = 2 * c + 1
Complete replay recipe: dependency imports + authored proof
pa prove forall m n. (exists a. m = 2 * a + 1) -> (exists b. n = 2 * b) -> exists c. m + n = 2 * c + 1
use mul_add
use add_succ_left
intro m
intro n
intro hm
intro hn
cases hm
cases hn
exists x + x1
rewrite hm_witness
rewrite hn_witness
simp [mul_add, add_succ_left]
qed
- Occurrences
- 151
- Distinct objects
- 136
- Reused references
- 15
- Depth
- 21
- Cuts
- 3
- Certificate SHA-256
51c7f3101d48…
odd_add_oddOdd add odd
Quadratic reciprocity campaign
checked
The sum of two odd naturals is even.
Exact expanded PA statement
forall m n. (exists a. m = 2 * a + 1) -> (exists b. n = 2 * b + 1) -> exists c. m + n = 2 * c
Complete replay recipe: dependency imports + authored proof
pa prove forall m n. (exists a. m = 2 * a + 1) -> (exists b. n = 2 * b + 1) -> exists c. m + n = 2 * c
use mul_add
use add_succ_left
use add_assoc
use add_comm
intro m
intro n
intro hm
intro hn
cases hm
cases hn
exists x + x1 + 1
rewrite hm_witness
rewrite hn_witness
simp [mul_add, add_assoc, add_comm]
qed
- Occurrences
- 302
- Distinct objects
- 214
- Reused references
- 30
- Depth
- 32
- Cuts
- 7
- Certificate SHA-256
f00b8b27dc6f…
even_mul_leftEven mul left
Quadratic reciprocity campaign
checked
A product with an even left factor is even.
Exact expanded PA statement
forall m n. (exists a. m = 2 * a) -> exists c. m * n = 2 * c
Complete replay recipe: dependency imports + authored proof
pa prove forall m n. (exists a. m = 2 * a) -> exists c. m * n = 2 * c
use mul_assoc
intro m
intro n
intro hm
cases hm
exists x * n
rewrite hm_witness
apply mul_assoc
qed
- Occurrences
- 130
- Distinct objects
- 118
- Reused references
- 12
- Depth
- 18
- Cuts
- 3
- Certificate SHA-256
eaa49b843794…
mul_double_rightMul double right
Quadratic reciprocity campaign
checked
Doubling commutes through multiplication on the right.
Exact expanded PA statement
forall m b. m * (2 * b) = 2 * (m * b)
Complete replay recipe: dependency imports + authored proof
pa prove forall m b. m * (2 * b) = 2 * (m * b)
use mul_assoc
use mul_comm
intro m
intro b
trans (2 * b) * m
apply mul_comm
trans 2 * (b * m)
apply mul_assoc
congr
refl
apply mul_comm
qed
- Occurrences
- 356
- Distinct objects
- 290
- Reused references
- 34
- Depth
- 26
- Cuts
- 10
- Certificate SHA-256
609eaec9eea9…
even_mul_rightEven mul right
Quadratic reciprocity campaign
checked
A product with an even right factor is even.
Exact expanded PA statement
forall m n. (exists b. n = 2 * b) -> exists c. m * n = 2 * c
Complete replay recipe: dependency imports + authored proof
pa prove forall m n. (exists b. n = 2 * b) -> exists c. m * n = 2 * c
use mul_double_right
intro m
intro n
intro hn
cases hn
exists m * x
rewrite hn_witness
apply mul_double_right
qed
- Occurrences
- 369
- Distinct objects
- 303
- Reused references
- 34
- Depth
- 27
- Cuts
- 11
- Certificate SHA-256
857e963b17a3…
odd_mul_oddOdd mul odd
Quadratic reciprocity campaign
checked
The product of two odd naturals is odd.
Exact expanded PA statement
forall m n. (exists a. m = 2 * a + 1) -> (exists b. n = 2 * b + 1) -> exists c. m * n = 2 * c + 1
Complete replay recipe: dependency imports + authored proof
pa prove forall m n. (exists a. m = 2 * a + 1) -> (exists b. n = 2 * b + 1) -> exists c. m * n = 2 * c + 1
use mul_add
use add_mul
use add_assoc
use add_succ_left
use mul_double_right
intro m
intro n
intro hm
intro hn
cases hm
cases hn
exists (2 * x + 1) * x1 + x
rewrite hm_witness
rewrite hn_witness
simp [mul_add, add_mul, add_assoc, add_succ_left]
congr
congr
apply mul_double_right
refl
qed
- Occurrences
- 897
- Distinct objects
- 383
- Reused references
- 51
- Depth
- 31
- Cuts
- 25
- Certificate SHA-256
4749c2e868fc…
odd_half_uniqueOdd half unique
Quadratic reciprocity campaign
checked
The half witness in an odd decomposition is unique.
Exact expanded PA statement
forall n a b. n = 2 * a + 1 -> n = 2 * b + 1 -> a = b
Complete replay recipe: dependency imports + authored proof
pa prove forall n a b. n = 2 * a + 1 -> n = 2 * b + 1 -> a = b
use add_right_cancel
use mul_left_cancel_nonzero
intro n
intro a
intro b
intro ha
intro hb
have hs : 2 * a + 1 = 2 * b + 1
trans n
symm
exact ha
exact hb
have hm : 2 * a = 2 * b
specialize add_right_cancel (2 * a)
specialize add_right_cancel (2 * b)
specialize add_right_cancel 1
apply add_right_cancel
exact hs
specialize mul_left_cancel_nonzero 2
specialize mul_left_cancel_nonzero a
specialize mul_left_cancel_nonzero b
apply mul_left_cancel_nonzero
intro htwo
apply PA1
exact htwo
exact hm
qed
- Occurrences
- 292
- Distinct objects
- 204
- Reused references
- 2
- Depth
- 25
- Cuts
- 9
- Certificate SHA-256
e21d6292387c…
odd_half_exists_uniqueOdd half exists unique
Quadratic reciprocity campaign
checked
Every odd natural has a unique half witness.
Exact expanded PA statement
forall n. (exists a. n = 2 * a + 1) -> exists h. n = 2 * h + 1 /\ forall k. n = 2 * k + 1 -> h = k
Complete replay recipe: dependency imports + authored proof
pa prove forall n. (exists a. n = 2 * a + 1) -> exists h. n = 2 * h + 1 /\ forall k. n = 2 * k + 1 -> h = k
use odd_half_unique
intro n
intro ho
cases ho
exists x
split
exact ho_witness
intro k
intro hk
specialize odd_half_unique n
specialize odd_half_unique x
specialize odd_half_unique k
apply odd_half_unique
exact ho_witness
exact hk
qed
- Occurrences
- 319
- Distinct objects
- 231
- Reused references
- 2
- Depth
- 26
- Cuts
- 10
- Certificate SHA-256
7fa50bde2df8…
four_mul_eq_double_doubleFour mul eq double double
Quadratic reciprocity campaign
checked
Multiplication by four is iterated doubling.
Exact expanded PA statement
forall a. 4 * a = 2 * (2 * a)
Complete replay recipe: dependency imports + authored proof
pa prove forall a. 4 * a = 2 * (2 * a)
use mul_assoc
intro a
trans (2 * 2) * a
congr
norm_num
refl
apply mul_assoc
qed
- Occurrences
- 178
- Distinct objects
- 166
- Reused references
- 12
- Depth
- 19
- Cuts
- 3
- Certificate SHA-256
3b9071b49ae4…
odd_mod4_casesOdd mod4 cases
Quadratic reciprocity campaign
checked
Every odd natural is congruent to one or three modulo four.
Exact expanded PA statement
forall n. (exists h. n = 2 * h + 1) -> (exists a. n = 4 * a + 1) \/ exists b. n = 4 * b + 3
Complete replay recipe: dependency imports + authored proof
pa prove forall n. (exists h. n = 2 * h + 1) -> (exists a. n = 4 * a + 1) \/ exists b. n = 4 * b + 3
use parity_cases
use mul_add
use four_mul_eq_double_double
intro n
intro ho
cases ho
specialize parity_cases x
cases parity_cases
cases parity_cases_witness
left
exists x1
rewrite ho_witness
rewrite parity_cases_witness_left
simp [mul_add]
congr
symm
apply four_mul_eq_double_double
right
exists x1
rewrite ho_witness
rewrite parity_cases_witness_right
simp [mul_add]
congr
congr
congr
symm
apply four_mul_eq_double_double
qed
- Occurrences
- 450
- Distinct objects
- 335
- Reused references
- 39
- Depth
- 32
- Cuts
- 7
- Certificate SHA-256
99e28f734f8b…
mod4_one_three_exclusive_pointwiseMod4 one three exclusive pointwise
Quadratic reciprocity campaign
checked
Residues one and three modulo four cannot describe the same natural.
Exact expanded PA statement
forall n a b. n = 4 * a + 1 -> n = 4 * b + 3 -> false
Complete replay recipe: dependency imports + authored proof
pa prove forall n a b. n = 4 * a + 1 -> n = 4 * b + 3 -> false
use division_remainder_unique
intro n
intro a
intro b
intro h1
intro h3
have hu : a = b /\ 1 = 3
specialize division_remainder_unique 4
specialize division_remainder_unique n
specialize division_remainder_unique a
specialize division_remainder_unique 1
specialize division_remainder_unique b
specialize division_remainder_unique 3
apply division_remainder_unique
exact h1
exists 2
norm_num
exact h3
exists 0
norm_num
cases hu
have hz : 0 = 2
apply PA2
exact hu_right
apply PA1
symm
exact hz
qed
- Occurrences
- 944
- Distinct objects
- 634
- Reused references
- 22
- Depth
- 58
- Cuts
- 23
- Certificate SHA-256
8ab417671cd8…
mod4_one_is_oddMod4 one is odd
Quadratic reciprocity campaign
checked
A natural congruent to one modulo four is odd.
Exact expanded PA statement
forall n. (exists a. n = 4 * a + 1) -> exists h. n = 2 * h + 1
Complete replay recipe: dependency imports + authored proof
pa prove forall n. (exists a. n = 4 * a + 1) -> exists h. n = 2 * h + 1
use four_mul_eq_double_double
intro n
intro h
cases h
exists 2 * x
rewrite h_witness
congr
apply four_mul_eq_double_double
refl
qed
- Occurrences
- 191
- Distinct objects
- 179
- Reused references
- 12
- Depth
- 20
- Cuts
- 4
- Certificate SHA-256
100ca77514b0…
mod4_three_is_oddMod4 three is odd
Quadratic reciprocity campaign
checked
A natural congruent to three modulo four is odd.
Exact expanded PA statement
forall n. (exists a. n = 4 * a + 3) -> exists h. n = 2 * h + 1
Complete replay recipe: dependency imports + authored proof
pa prove forall n. (exists a. n = 4 * a + 3) -> exists h. n = 2 * h + 1
use mul_add
use four_mul_eq_double_double
intro n
intro h
cases h
exists 2 * x + 1
rewrite h_witness
simp [mul_add]
congr
congr
congr
apply four_mul_eq_double_double
qed
- Occurrences
- 326
- Distinct objects
- 225
- Reused references
- 25
- Depth
- 24
- Cuts
- 6
- Certificate SHA-256
ecc3cdd64943…
prime_ne_two_is_oddPrime ne two is odd
Quadratic reciprocity campaign
checked
Every prime other than two is odd.
Exact expanded PA statement
forall p. (~(p = 1) /\ forall a b. p = a * b -> a = 1 \/ b = 1) -> ~(p = 2) -> exists h. p = 2 * h + 1
Complete replay recipe: dependency imports + authored proof
pa prove forall p. (~(p = 1) /\ forall a b. p = a * b -> a = 1 \/ b = 1) -> ~(p = 2) -> exists h. p = 2 * h + 1
use parity_cases
intro p
intro hp
intro hne
cases hp
specialize parity_cases p
cases parity_cases
cases parity_cases_witness
have hfac : 2 = 1 \/ x = 1
specialize hp_right 2
specialize hp_right x
apply hp_right
exact parity_cases_witness_left
cases hfac
exfalso
apply PA1
apply PA2
exact hfac_left
exfalso
apply hne
trans 2 * x
exact parity_cases_witness_left
rewrite hfac_right
simp
exists x
exact parity_cases_witness_right
qed
- Occurrences
- 139
- Distinct objects
- 128
- Reused references
- 11
- Depth
- 20
- Cuts
- 1
- Certificate SHA-256
438d56815002…
mod_eq_decidable_from_remaindersMod eq decidable from remainders
Quadratic reciprocity campaign
checked
Canonical bounded remainders constructively decide congruence.
Exact expanded PA statement
forall p a b qa ra qb rb. a = qa * p + ra -> (exists ha. ha + S ra = p) -> b = qb * p + rb -> (exists hb. hb + S rb = p) -> (exists u v. a + p * u = b + p * v) \/ ~(exists u v. a + p * u = b + p * v)
Complete replay recipe: dependency imports + authored proof
pa prove forall p a b qa ra qb rb. a = qa * p + ra -> (exists ha. ha + S ra = p) -> b = qb * p + rb -> (exists hb. hb + S rb = p) -> (exists u v. a + p * u = b + p * v) \/ ~(exists u v. a + p * u = b + p * v)
use eq_decidable
use remainder_decomposition_to_mod_eq
use mod_eq_symm
use mod_eq_trans
use mod_eq_bounded_unique
intro p
intro a
intro b
intro qa
intro ra
intro qb
intro rb
intro ha
intro hra
intro hb
intro hrb
specialize eq_decidable ra
specialize eq_decidable rb
cases eq_decidable
left
have har : exists u v. a + p * u = ra + p * v
specialize remainder_decomposition_to_mod_eq p
specialize remainder_decomposition_to_mod_eq a
specialize remainder_decomposition_to_mod_eq qa
specialize remainder_decomposition_to_mod_eq ra
apply remainder_decomposition_to_mod_eq
exact ha
have hbr : exists u v. b + p * u = rb + p * v
specialize remainder_decomposition_to_mod_eq p
specialize remainder_decomposition_to_mod_eq b
specialize remainder_decomposition_to_mod_eq qb
specialize remainder_decomposition_to_mod_eq rb
apply remainder_decomposition_to_mod_eq
exact hb
have hbra : exists u v. b + p * u = ra + p * v
rewrite eq_decidable_left
exact hbr
have hrab : exists u v. ra + p * u = b + p * v
specialize mod_eq_symm p
specialize mod_eq_symm b
specialize mod_eq_symm ra
apply mod_eq_symm
exact hbra
specialize mod_eq_trans p
specialize mod_eq_trans a
specialize mod_eq_trans ra
specialize mod_eq_trans b
apply mod_eq_trans
exact har
exact hrab
right
intro hab
apply eq_decidable_right
specialize mod_eq_bounded_unique p
specialize mod_eq_bounded_unique ra
specialize mod_eq_bounded_unique rb
apply mod_eq_bounded_unique
exact hra
exact hrb
have har : exists u v. a + p * u = ra + p * v
specialize remainder_decomposition_to_mod_eq p
specialize remainder_decomposition_to_mod_eq a
specialize remainder_decomposition_to_mod_eq qa
specialize remainder_decomposition_to_mod_eq ra
apply remainder_decomposition_to_mod_eq
exact ha
have hra_a : exists u v. ra + p * u = a + p * v
specialize mod_eq_symm p
specialize mod_eq_symm a
specialize mod_eq_symm ra
apply mod_eq_symm
exact har
have hra_b : exists u v. ra + p * u = b + p * v
specialize mod_eq_trans p
specialize mod_eq_trans ra
specialize mod_eq_trans a
specialize mod_eq_trans b
apply mod_eq_trans
exact hra_a
exact hab
have hbr : exists u v. b + p * u = rb + p * v
specialize remainder_decomposition_to_mod_eq p
specialize remainder_decomposition_to_mod_eq b
specialize remainder_decomposition_to_mod_eq qb
specialize remainder_decomposition_to_mod_eq rb
apply remainder_decomposition_to_mod_eq
exact hb
specialize mod_eq_trans p
specialize mod_eq_trans ra
specialize mod_eq_trans b
specialize mod_eq_trans rb
apply mod_eq_trans
exact hra_b
exact hbr
qed
- Occurrences
- 1,693
- Distinct objects
- 935
- Reused references
- 42
- Depth
- 64
- Cuts
- 47
- Certificate SHA-256
954dd3079783…
mod_eq_decidable_nonzeroMod eq decidable nonzero
Quadratic reciprocity campaign
checked
Balanced congruence is constructively decidable at nonzero modulus.
Exact expanded PA statement
forall p a b. ~(p = 0) -> (exists qr_u_dec_yes qr_v_dec_yes. a + p * qr_u_dec_yes = b + p * qr_v_dec_yes) \/ ~(exists qr_u_dec_no qr_v_dec_no. a + p * qr_u_dec_no = b + p * qr_v_dec_no)
Complete replay recipe: dependency imports + authored proof
pa prove forall p a b. ~(p = 0) -> (exists qr_u_dec_yes qr_v_dec_yes. a + p * qr_u_dec_yes = b + p * qr_v_dec_yes) \/ ~(exists qr_u_dec_no qr_v_dec_no. a + p * qr_u_dec_no = b + p * qr_v_dec_no)
use division_remainder_exists
use mul_comm
use mod_eq_decidable_from_remainders
intro p
intro a
intro b
intro hp
have hda : exists qa ra. a = p * qa + ra /\ exists ha. ha + S ra = p
specialize division_remainder_exists p
specialize division_remainder_exists a
apply division_remainder_exists
exact hp
cases hda
cases hda_witness
cases hda_witness_witness
have hdb : exists qb rb. b = p * qb + rb /\ exists hb. hb + S rb = p
specialize division_remainder_exists p
specialize division_remainder_exists b
apply division_remainder_exists
exact hp
cases hdb
cases hdb_witness
cases hdb_witness_witness
have ha_comm : a = x * p + x1
trans p * x + x1
exact hda_witness_witness_left
congr
apply mul_comm
refl
have hb_comm : b = x2 * p + x3
trans p * x2 + x3
exact hdb_witness_witness_left
congr
apply mul_comm
refl
specialize mod_eq_decidable_from_remainders p
specialize mod_eq_decidable_from_remainders a
specialize mod_eq_decidable_from_remainders b
specialize mod_eq_decidable_from_remainders x
specialize mod_eq_decidable_from_remainders x1
specialize mod_eq_decidable_from_remainders x2
specialize mod_eq_decidable_from_remainders x3
apply mod_eq_decidable_from_remainders
exact ha_comm
exact hda_witness_witness_right
exact hb_comm
exact hdb_witness_witness_right
qed
- Occurrences
- 2,189
- Distinct objects
- 1,136
- Reused references
- 60
- Depth
- 67
- Cuts
- 61
- Certificate SHA-256
dacd77a7c266…
quadratic_residue_search_up_toQuadratic residue search up to
Quadratic reciprocity campaign
checked
Inclusive bounded search constructively decides square congruence.
Exact expanded PA statement
forall B p a. ~(p = 0) -> ((exists qr_x_search_yes. (exists qr_bound_search_yes. qr_bound_search_yes + qr_x_search_yes = B) /\ (exists qr_u_search_yes qr_v_search_yes. qr_x_search_yes * qr_x_search_yes + p * qr_u_search_yes = a + p * qr_v_search_yes)) \/ (forall qr_x_search_no. (exists qr_bound_search_no. qr_bound_search_no + qr_x_search_no = B) -> ~(exists qr_u_search_no qr_v_search_no. qr_x_search_no * qr_x_search_no + p * qr_u_search_no = a + p * qr_v_search_no)))
Complete replay recipe: dependency imports + authored proof
pa prove forall B p a. ~(p = 0) -> ((exists qr_x_search_yes. (exists qr_bound_search_yes. qr_bound_search_yes + qr_x_search_yes = B) /\ (exists qr_u_search_yes qr_v_search_yes. qr_x_search_yes * qr_x_search_yes + p * qr_u_search_yes = a + p * qr_v_search_yes)) \/ (forall qr_x_search_no. (exists qr_bound_search_no. qr_bound_search_no + qr_x_search_no = B) -> ~(exists qr_u_search_no qr_v_search_no. qr_x_search_no * qr_x_search_no + p * qr_u_search_no = a + p * qr_v_search_no)))
use mod_eq_decidable_nonzero
use add_eq_zero_right
use le_eq_or_lt
use add_succ_left
use zero_add
induction B
intro p
intro a
intro hp
have hdec : (exists u v. 0 * 0 + p * u = a + p * v) \/ ~(exists u v. 0 * 0 + p * u = a + p * v)
specialize mod_eq_decidable_nonzero p
specialize mod_eq_decidable_nonzero (0 * 0)
specialize mod_eq_decidable_nonzero a
apply mod_eq_decidable_nonzero
exact hp
cases hdec
left
exists 0
split
exists 0
simp
exact hdec_left
right
intro x
intro hx
intro hs
cases hx
have hx0 : x = 0
specialize add_eq_zero_right x1
specialize add_eq_zero_right x
apply add_eq_zero_right
exact hx_witness
apply hdec_right
rewrite hx0 at hs
rewrite hx0 at hs
exact hs
intro p
intro a
intro hp
have hprev : (exists x. (exists h. h + x = B) /\ exists u v. x * x + p * u = a + p * v) \/ (forall x. (exists h. h + x = B) -> ~(exists u v. x * x + p * u = a + p * v))
specialize IH p
specialize IH a
apply IH
exact hp
cases hprev
left
cases hprev_left
cases hprev_left_witness
exists x
split
cases hprev_left_witness_left
exists S x1
trans S (x1 + x)
apply add_succ_left
congr
exact hprev_left_witness_left_witness
exact hprev_left_witness_right
have hdec : (exists u v. (S B) * (S B) + p * u = a + p * v) \/ ~(exists u v. (S B) * (S B) + p * u = a + p * v)
specialize mod_eq_decidable_nonzero p
specialize mod_eq_decidable_nonzero ((S B) * (S B))
specialize mod_eq_decidable_nonzero a
apply mod_eq_decidable_nonzero
exact hp
cases hdec
left
exists S B
split
exists 0
simp
congr
specialize zero_add B
exact zero_add
exact hdec_left
right
intro x
intro hx
intro hs
specialize le_eq_or_lt x
specialize le_eq_or_lt (S B)
have hcases : x = S B \/ exists k. k + S x = S B
apply le_eq_or_lt
exact hx
cases hcases
apply hdec_right
rewrite hcases_left at hs
rewrite hcases_left at hs
exact hs
apply hprev_right
cases hcases_right
exists x1
apply PA2
trans x1 + S x
symm
apply PA4
exact hcases_right_witness
exact hs
qed
- Occurrences
- 2,480
- Distinct objects
- 1,329
- Reused references
- 67
- Depth
- 68
- Cuts
- 69
- Certificate SHA-256
e459beb71367…
quadratic_residue_bounded_decidable_nonzeroQuadratic residue bounded decidable nonzero
Quadratic reciprocity campaign
checked
A nonzero modulus admits a finite constructive residue search.
Exact expanded PA statement
forall p a. ~(p = 0) -> (exists qr_x_bounded. (exists qr_h_bounded. qr_h_bounded + S qr_x_bounded = p) /\ exists qr_u_bounded qr_v_bounded. qr_x_bounded * qr_x_bounded + p * qr_u_bounded = a + p * qr_v_bounded) \/ ~(exists qr_x_bounded. (exists qr_h_bounded. qr_h_bounded + S qr_x_bounded = p) /\ exists qr_u_bounded qr_v_bounded. qr_x_bounded * qr_x_bounded + p * qr_u_bounded = a + p * qr_v_bounded)
Complete replay recipe: dependency imports + authored proof
pa prove forall p a. ~(p = 0) -> (exists qr_x_bounded. (exists qr_h_bounded. qr_h_bounded + S qr_x_bounded = p) /\ exists qr_u_bounded qr_v_bounded. qr_x_bounded * qr_x_bounded + p * qr_u_bounded = a + p * qr_v_bounded) \/ ~(exists qr_x_bounded. (exists qr_h_bounded. qr_h_bounded + S qr_x_bounded = p) /\ exists qr_u_bounded qr_v_bounded. qr_x_bounded * qr_x_bounded + p * qr_u_bounded = a + p * qr_v_bounded)
use nonzero_is_succ
use quadratic_residue_search_up_to
intro p
intro a
intro hp
have hs : exists B. p = S B
specialize nonzero_is_succ p
apply nonzero_is_succ
exact hp
cases hs
have hsearch : (exists r. (exists h. h + r = x) /\ exists u v. r * r + p * u = a + p * v) \/ (forall r. (exists h. h + r = x) -> ~(exists u v. r * r + p * u = a + p * v))
specialize quadratic_residue_search_up_to x
specialize quadratic_residue_search_up_to p
specialize quadratic_residue_search_up_to a
apply quadratic_residue_search_up_to
exact hp
cases hsearch
left
cases hsearch_left
cases hsearch_left_witness
exists x1
split
cases hsearch_left_witness_left
exists x2
trans S (x2 + x1)
apply PA4
trans S x
congr
exact hsearch_left_witness_left_witness
symm
exact hs_witness
exact hsearch_left_witness_right
right
intro hbounded
cases hbounded
cases hbounded_witness
specialize hsearch_right x1
apply hsearch_right
cases hbounded_witness_left
exists x2
apply PA2
trans x2 + S x1
symm
apply PA4
trans p
exact hbounded_witness_left_witness
exact hs_witness
exact hbounded_witness_right
qed
- Occurrences
- 2,554
- Distinct objects
- 1,403
- Reused references
- 67
- Depth
- 70
- Cuts
- 71
- Certificate SHA-256
228002501cce…
quadratic_residue_bounded_equivQuadratic residue bounded equiv
Quadratic reciprocity campaign
checked
Every square witness has an equivalent canonical bounded root.
Exact expanded PA statement
forall p a. ~(p = 0) -> (((exists qr_x_unbounded. exists qr_u_unbounded qr_v_unbounded. qr_x_unbounded * qr_x_unbounded + p * qr_u_unbounded = a + p * qr_v_unbounded) -> (exists qr_x_bounded. (exists qr_h_bounded. qr_h_bounded + S qr_x_bounded = p) /\ exists qr_u_bounded qr_v_bounded. qr_x_bounded * qr_x_bounded + p * qr_u_bounded = a + p * qr_v_bounded)) /\ ((exists qr_x_bounded. (exists qr_h_bounded. qr_h_bounded + S qr_x_bounded = p) /\ exists qr_u_bounded qr_v_bounded. qr_x_bounded * qr_x_bounded + p * qr_u_bounded = a + p * qr_v_bounded) -> (exists qr_x_unbounded. exists qr_u_unbounded qr_v_unbounded. qr_x_unbounded * qr_x_unbounded + p * qr_u_unbounded = a + p * qr_v_unbounded)))
Complete replay recipe: dependency imports + authored proof
pa prove forall p a. ~(p = 0) -> (((exists qr_x_unbounded. exists qr_u_unbounded qr_v_unbounded. qr_x_unbounded * qr_x_unbounded + p * qr_u_unbounded = a + p * qr_v_unbounded) -> (exists qr_x_bounded. (exists qr_h_bounded. qr_h_bounded + S qr_x_bounded = p) /\ exists qr_u_bounded qr_v_bounded. qr_x_bounded * qr_x_bounded + p * qr_u_bounded = a + p * qr_v_bounded)) /\ ((exists qr_x_bounded. (exists qr_h_bounded. qr_h_bounded + S qr_x_bounded = p) /\ exists qr_u_bounded qr_v_bounded. qr_x_bounded * qr_x_bounded + p * qr_u_bounded = a + p * qr_v_bounded) -> (exists qr_x_unbounded. exists qr_u_unbounded qr_v_unbounded. qr_x_unbounded * qr_x_unbounded + p * qr_u_unbounded = a + p * qr_v_unbounded)))
use division_remainder_exists
use square_residue_witness
use remainder_decomposition_to_mod_eq
use mod_eq_symm
use mod_eq_trans
use mul_comm
use zero_add
intro p
intro a
intro hp
split
intro hunbounded
cases hunbounded
have hdivision : exists q r. x = p * q + r /\ exists h. h + S r = p
specialize division_remainder_exists p
specialize division_remainder_exists x
apply division_remainder_exists
exact hp
cases hdivision
cases hdivision_witness
cases hdivision_witness_witness
have hsquare : exists w. x * x = p * w + x2 * x2
specialize square_residue_witness p
specialize square_residue_witness x
specialize square_residue_witness x1
specialize square_residue_witness x2
specialize square_residue_witness 0
specialize square_residue_witness (x2 * x2)
apply square_residue_witness
exact hdivision_witness_witness_left
simp
specialize zero_add (x2 * x2)
symm
exact zero_add
cases hsquare
have hdecomp : x * x = x3 * p + x2 * x2
trans p * x3 + x2 * x2
exact hsquare_witness
congr
apply mul_comm
refl
have hxr : exists u v. x * x + p * u = x2 * x2 + p * v
specialize remainder_decomposition_to_mod_eq p
specialize remainder_decomposition_to_mod_eq (x * x)
specialize remainder_decomposition_to_mod_eq x3
specialize remainder_decomposition_to_mod_eq (x2 * x2)
apply remainder_decomposition_to_mod_eq
exact hdecomp
have hrx : exists u v. x2 * x2 + p * u = x * x + p * v
specialize mod_eq_symm p
specialize mod_eq_symm (x * x)
specialize mod_eq_symm (x2 * x2)
apply mod_eq_symm
exact hxr
have hra : exists u v. x2 * x2 + p * u = a + p * v
specialize mod_eq_trans p
specialize mod_eq_trans (x2 * x2)
specialize mod_eq_trans (x * x)
specialize mod_eq_trans a
apply mod_eq_trans
exact hrx
exact hunbounded_witness
exists x2
split
exact hdivision_witness_witness_right
exact hra
intro hbounded
cases hbounded
cases hbounded_witness
exists x
exact hbounded_witness_right
qed
- Occurrences
- 2,151
- Distinct objects
- 781
- Reused references
- 66
- Depth
- 34
- Cuts
- 63
- Certificate SHA-256
5b36bdde6d12…
quadratic_residue_decidable_nonzeroQuadratic residue decidable nonzero
Quadratic reciprocity campaign
checked
Quadratic residuosity is constructively decidable at nonzero modulus.
Exact expanded PA statement
forall p a. ~(p = 0) -> (exists qr_x_unbounded. exists qr_u_unbounded qr_v_unbounded. qr_x_unbounded * qr_x_unbounded + p * qr_u_unbounded = a + p * qr_v_unbounded) \/ ~(exists qr_x_unbounded. exists qr_u_unbounded qr_v_unbounded. qr_x_unbounded * qr_x_unbounded + p * qr_u_unbounded = a + p * qr_v_unbounded)
Complete replay recipe: dependency imports + authored proof
pa prove forall p a. ~(p = 0) -> (exists qr_x_unbounded. exists qr_u_unbounded qr_v_unbounded. qr_x_unbounded * qr_x_unbounded + p * qr_u_unbounded = a + p * qr_v_unbounded) \/ ~(exists qr_x_unbounded. exists qr_u_unbounded qr_v_unbounded. qr_x_unbounded * qr_x_unbounded + p * qr_u_unbounded = a + p * qr_v_unbounded)
use quadratic_residue_bounded_decidable_nonzero
use quadratic_residue_bounded_equiv
intro p
intro a
intro hp
have hequiv : (((exists x. exists u v. x * x + p * u = a + p * v) -> (exists r. (exists h. h + S r = p) /\ exists u v. r * r + p * u = a + p * v)) /\ ((exists r. (exists h. h + S r = p) /\ exists u v. r * r + p * u = a + p * v) -> (exists x. exists u v. x * x + p * u = a + p * v)))
specialize quadratic_residue_bounded_equiv p
specialize quadratic_residue_bounded_equiv a
apply quadratic_residue_bounded_equiv
exact hp
cases hequiv
have hdec : (exists r. (exists h. h + S r = p) /\ exists u v. r * r + p * u = a + p * v) \/ ~(exists r. (exists h. h + S r = p) /\ exists u v. r * r + p * u = a + p * v)
specialize quadratic_residue_bounded_decidable_nonzero p
specialize quadratic_residue_bounded_decidable_nonzero a
apply quadratic_residue_bounded_decidable_nonzero
exact hp
cases hdec
left
apply hequiv_right
exact hdec_left
right
intro hunbounded
apply hdec_right
apply hequiv_left
exact hunbounded
qed
- Occurrences
- 4,737
- Distinct objects
- 1,715
- Reused references
- 89
- Depth
- 71
- Cuts
- 136
- Certificate SHA-256
3d53eba6ed8f…
beta_repeat_emptyBeta repeat empty
Quadratic reciprocity campaign
checked
Every constant beta prefix of length zero is vacuously Repeat.
Exact expanded PA statement
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) = S ((S (ff_i_empty)) * c)) /\ exists ff_q_empty_decoded. b = ff_q_empty_decoded * S ((S (ff_i_empty)) * c) + (a))))
Complete replay recipe: dependency imports + authored proof
pa prove 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) = S ((S (ff_i_empty)) * c)) /\ exists ff_q_empty_decoded. b = ff_q_empty_decoded * S ((S (ff_i_empty)) * c) + (a))))
use add_eq_zero_right
use succ_ne_zero
intro b
intro c
intro a
intro l
intro hl
intro i
intro hi
rewrite hl at hi
exfalso
cases hi
have hsi : S i = 0
specialize add_eq_zero_right x
specialize add_eq_zero_right (S i)
apply add_eq_zero_right
exact hi_witness
specialize succ_ne_zero i
apply succ_ne_zero
exact hsi
qed
- Occurrences
- 42
- Distinct objects
- 42
- Reused references
- 0
- Depth
- 16
- Cuts
- 2
- Certificate SHA-256
ef25ee646a84…
beta_repeat_succ_extendBeta repeat succ extend
Quadratic reciprocity campaign
checked
Recode a constant prefix and append one more copy of its value.
Exact expanded PA statement
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) = S ((S (ff_i_before)) * c)) /\ exists ff_q_before_decoded. b = ff_q_before_decoded * S ((S (ff_i_before)) * c) + (a)))) -> 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) = S ((S (ff_i_after)) * d)) /\ exists ff_q_after_decoded. z = ff_q_after_decoded * S ((S (ff_i_after)) * d) + (a))))
Complete replay recipe: dependency imports + authored proof
pa prove 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) = S ((S (ff_i_before)) * c)) /\ exists ff_q_before_decoded. b = ff_q_before_decoded * S ((S (ff_i_before)) * c) + (a)))) -> 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) = S ((S (ff_i_after)) * d)) /\ exists ff_q_after_decoded. z = ff_q_after_decoded * S ((S (ff_i_after)) * d) + (a))))
use beta_prefix_extend
use le_of_succ_le_succ
use le_eq_or_lt
intro b
intro c
intro a
intro l
intro sl
intro hsl
intro hrepeat
specialize beta_prefix_extend l
specialize beta_prefix_extend b
specialize beta_prefix_extend c
specialize beta_prefix_extend a
cases beta_prefix_extend
cases beta_prefix_extend_witness
cases beta_prefix_extend_witness_witness
exists x
exists x1
intro i
intro hi
rewrite hsl at hi
have hil : exists h. h + i = l
specialize le_of_succ_le_succ i
specialize le_of_succ_le_succ l
apply le_of_succ_le_succ
exact hi
have hsplit : i = l \/ exists h. h + S i = l
specialize le_eq_or_lt i
specialize le_eq_or_lt l
apply le_eq_or_lt
exact hil
cases hsplit
rewrite hsplit_left
rewrite hsplit_left
exact beta_prefix_extend_witness_witness_left
specialize beta_prefix_extend_witness_witness_right i
specialize beta_prefix_extend_witness_witness_right a
apply beta_prefix_extend_witness_witness_right
exact hsplit_right
specialize hrepeat i
apply hrepeat
exact hsplit_right
qed
- Occurrences
- 29,224
- Distinct objects
- 4,561
- Reused references
- 227
- Depth
- 81
- Cuts
- 873
- Certificate SHA-256
fa75837000d6…
beta_repeat_existsBeta repeat exists
Quadratic reciprocity campaign
checked
Every value and length admit a beta-coded constant prefix.
Exact expanded PA statement
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) = S ((S (ff_i_r)) * c)) /\ exists ff_q_r_decoded. b = ff_q_r_decoded * S ((S (ff_i_r)) * c) + (a))))
Complete replay recipe: dependency imports + authored proof
pa prove 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) = S ((S (ff_i_r)) * c)) /\ exists ff_q_r_decoded. b = ff_q_r_decoded * S ((S (ff_i_r)) * c) + (a))))
use beta_repeat_empty
use beta_repeat_succ_extend
intro a
induction l
exists 0
exists 0
specialize beta_repeat_empty 0
specialize beta_repeat_empty 0
specialize beta_repeat_empty a
specialize beta_repeat_empty 0
apply beta_repeat_empty
refl
cases IH
cases IH_witness
specialize beta_repeat_succ_extend x
specialize beta_repeat_succ_extend x1
specialize beta_repeat_succ_extend a
specialize beta_repeat_succ_extend l
specialize beta_repeat_succ_extend (S l)
apply beta_repeat_succ_extend
refl
exact IH_witness_witness
qed
- Occurrences
- 29,322
- Distinct objects
- 4,639
- Reused references
- 229
- Depth
- 83
- Cuts
- 877
- Certificate SHA-256
b7e496b360e7…
beta_repeat_entry_eqBeta repeat entry eq
Quadratic reciprocity campaign
checked
Every decoded entry of a Repeat prefix equals its repeated value.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use beta_at_unique
intro b
intro c
intro a
intro l
intro i
intro x
intro hrepeat
intro hi
intro hx
have ha : ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a)
specialize hrepeat i
apply hrepeat
exact hi
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique i
specialize beta_at_unique x
specialize beta_at_unique a
apply beta_at_unique
exact hx
exact ha
qed
- Occurrences
- 1,144
- Distinct objects
- 715
- Reused references
- 37
- Depth
- 60
- Cuts
- 31
- Certificate SHA-256
d54a91085710…
beta_repeat_transport_entryBeta repeat transport entry
Quadratic reciprocity campaign
checked
Repeat prefixes with one value preserve every decoded entry extensionally.
Exact expanded PA statement
forall b c z d a l. (forall ff_i_transport_l. (exists ff_lt_transport_l_bound. ff_lt_transport_l_bound + S ff_i_transport_l = l) -> (((exists ff_h_transport_l_decoded. ff_h_transport_l_decoded + S (a) = S ((S (ff_i_transport_l)) * c)) /\ exists ff_q_transport_l_decoded. b = ff_q_transport_l_decoded * S ((S (ff_i_transport_l)) * c) + (a)))) -> (forall ff_i_transport_r. (exists ff_lt_transport_r_bound. ff_lt_transport_r_bound + S ff_i_transport_r = l) -> (((exists ff_h_transport_r_decoded. ff_h_transport_r_decoded + S (a) = S ((S (ff_i_transport_r)) * d)) /\ exists ff_q_transport_r_decoded. z = ff_q_transport_r_decoded * S ((S (ff_i_transport_r)) * d) + (a)))) -> forall i x. (exists h. h + S i = l) -> (((exists ff_h_transport_x. ff_h_transport_x + S (x) = S ((S (i)) * c)) /\ exists ff_q_transport_x. b = ff_q_transport_x * S ((S (i)) * c) + (x))) -> (((exists ff_h_transport_y. ff_h_transport_y + S (x) = S ((S (i)) * d)) /\ exists ff_q_transport_y. z = ff_q_transport_y * S ((S (i)) * d) + (x)))
Complete replay recipe: dependency imports + authored proof
pa prove forall b c z d a l. (forall ff_i_transport_l. (exists ff_lt_transport_l_bound. ff_lt_transport_l_bound + S ff_i_transport_l = l) -> (((exists ff_h_transport_l_decoded. ff_h_transport_l_decoded + S (a) = S ((S (ff_i_transport_l)) * c)) /\ exists ff_q_transport_l_decoded. b = ff_q_transport_l_decoded * S ((S (ff_i_transport_l)) * c) + (a)))) -> (forall ff_i_transport_r. (exists ff_lt_transport_r_bound. ff_lt_transport_r_bound + S ff_i_transport_r = l) -> (((exists ff_h_transport_r_decoded. ff_h_transport_r_decoded + S (a) = S ((S (ff_i_transport_r)) * d)) /\ exists ff_q_transport_r_decoded. z = ff_q_transport_r_decoded * S ((S (ff_i_transport_r)) * d) + (a)))) -> forall i x. (exists h. h + S i = l) -> (((exists ff_h_transport_x. ff_h_transport_x + S (x) = S ((S (i)) * c)) /\ exists ff_q_transport_x. b = ff_q_transport_x * S ((S (i)) * c) + (x))) -> (((exists ff_h_transport_y. ff_h_transport_y + S (x) = S ((S (i)) * d)) /\ exists ff_q_transport_y. z = ff_q_transport_y * S ((S (i)) * d) + (x)))
use beta_repeat_entry_eq
intro b
intro c
intro z
intro d
intro a
intro l
intro hleft
intro hright
intro i
intro x
intro hi
intro hx
have hxa : x = a
specialize beta_repeat_entry_eq b
specialize beta_repeat_entry_eq c
specialize beta_repeat_entry_eq a
specialize beta_repeat_entry_eq l
specialize beta_repeat_entry_eq i
specialize beta_repeat_entry_eq x
apply beta_repeat_entry_eq
exact hleft
exact hi
exact hx
rewrite hxa
rewrite hxa
specialize hright i
apply hright
exact hi
qed
- Occurrences
- 1,191
- Distinct objects
- 762
- Reused references
- 37
- Depth
- 61
- Cuts
- 32
- Certificate SHA-256
42179ced89f7…
pow_existsPow exists
Quadratic reciprocity campaign
checked
Every base and exponent have a relational finite-product power.
Exact expanded PA statement
forall a e. exists n. (exists ff_b_x ff_c_x. ((forall ff_i_x_repeat. (exists ff_lt_x_repeat_bound. ff_lt_x_repeat_bound + S ff_i_x_repeat = e) -> (((exists ff_h_x_repeat_decoded. ff_h_x_repeat_decoded + S (a) = S ((S (ff_i_x_repeat)) * ff_c_x)) /\ exists ff_q_x_repeat_decoded. ff_b_x = ff_q_x_repeat_decoded * S ((S (ff_i_x_repeat)) * ff_c_x) + (a)))) /\ (exists ff_u_x_product ff_v_x_product. ((((exists ff_h_x_product_start. ff_h_x_product_start + S (1) = S ((S (0)) * ff_v_x_product)) /\ exists ff_q_x_product_start. ff_u_x_product = ff_q_x_product_start * S ((S (0)) * ff_v_x_product) + (1))) /\ ((((exists ff_h_x_product_terminal. ff_h_x_product_terminal + S (n) = S ((S (e)) * ff_v_x_product)) /\ exists ff_q_x_product_terminal. ff_u_x_product = ff_q_x_product_terminal * S ((S (e)) * ff_v_x_product) + (n))) /\ forall ff_i_x_product. (exists ff_lt_x_product_bound. ff_lt_x_product_bound + S ff_i_x_product = e) -> exists ff_p_x_product ff_r_x_product ff_s_x_product. ((((exists ff_h_x_product_factor. ff_h_x_product_factor + S (ff_p_x_product) = S ((S (ff_i_x_product)) * ff_c_x)) /\ exists ff_q_x_product_factor. ff_b_x = ff_q_x_product_factor * S ((S (ff_i_x_product)) * ff_c_x) + (ff_p_x_product))) /\ ((((exists ff_h_x_product_partial. ff_h_x_product_partial + S (ff_r_x_product) = S ((S (ff_i_x_product)) * ff_v_x_product)) /\ exists ff_q_x_product_partial. ff_u_x_product = ff_q_x_product_partial * S ((S (ff_i_x_product)) * ff_v_x_product) + (ff_r_x_product))) /\ ((((exists ff_h_x_product_successor. ff_h_x_product_successor + S (ff_s_x_product) = S ((S (S ff_i_x_product)) * ff_v_x_product)) /\ exists ff_q_x_product_successor. ff_u_x_product = ff_q_x_product_successor * S ((S (S ff_i_x_product)) * ff_v_x_product) + (ff_s_x_product))) /\ ff_s_x_product = ff_r_x_product * ff_p_x_product))))))))
Complete replay recipe: dependency imports + authored proof
pa prove forall a e. exists n. (exists ff_b_x ff_c_x. ((forall ff_i_x_repeat. (exists ff_lt_x_repeat_bound. ff_lt_x_repeat_bound + S ff_i_x_repeat = e) -> (((exists ff_h_x_repeat_decoded. ff_h_x_repeat_decoded + S (a) = S ((S (ff_i_x_repeat)) * ff_c_x)) /\ exists ff_q_x_repeat_decoded. ff_b_x = ff_q_x_repeat_decoded * S ((S (ff_i_x_repeat)) * ff_c_x) + (a)))) /\ (exists ff_u_x_product ff_v_x_product. ((((exists ff_h_x_product_start. ff_h_x_product_start + S (1) = S ((S (0)) * ff_v_x_product)) /\ exists ff_q_x_product_start. ff_u_x_product = ff_q_x_product_start * S ((S (0)) * ff_v_x_product) + (1))) /\ ((((exists ff_h_x_product_terminal. ff_h_x_product_terminal + S (n) = S ((S (e)) * ff_v_x_product)) /\ exists ff_q_x_product_terminal. ff_u_x_product = ff_q_x_product_terminal * S ((S (e)) * ff_v_x_product) + (n))) /\ forall ff_i_x_product. (exists ff_lt_x_product_bound. ff_lt_x_product_bound + S ff_i_x_product = e) -> exists ff_p_x_product ff_r_x_product ff_s_x_product. ((((exists ff_h_x_product_factor. ff_h_x_product_factor + S (ff_p_x_product) = S ((S (ff_i_x_product)) * ff_c_x)) /\ exists ff_q_x_product_factor. ff_b_x = ff_q_x_product_factor * S ((S (ff_i_x_product)) * ff_c_x) + (ff_p_x_product))) /\ ((((exists ff_h_x_product_partial. ff_h_x_product_partial + S (ff_r_x_product) = S ((S (ff_i_x_product)) * ff_v_x_product)) /\ exists ff_q_x_product_partial. ff_u_x_product = ff_q_x_product_partial * S ((S (ff_i_x_product)) * ff_v_x_product) + (ff_r_x_product))) /\ ((((exists ff_h_x_product_successor. ff_h_x_product_successor + S (ff_s_x_product) = S ((S (S ff_i_x_product)) * ff_v_x_product)) /\ exists ff_q_x_product_successor. ff_u_x_product = ff_q_x_product_successor * S ((S (S ff_i_x_product)) * ff_v_x_product) + (ff_s_x_product))) /\ ff_s_x_product = ff_r_x_product * ff_p_x_product))))))))
use beta_repeat_exists
use beta_product_exists
intro a
intro e
have hrepeat : exists b c. (forall i. (exists h. h + S i = e) -> ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a))
specialize beta_repeat_exists a
specialize beta_repeat_exists e
exact beta_repeat_exists
cases hrepeat
cases hrepeat_witness
specialize beta_product_exists x
specialize beta_product_exists x1
specialize beta_product_exists e
cases beta_product_exists
cases beta_product_exists_witness
cases beta_product_exists_witness_witness
exists x2
exists x
exists x1
split
exact hrepeat_witness_witness
exists x3
exists x4
exact beta_product_exists_witness_witness_witness
qed
- Occurrences
- 59,836
- Distinct objects
- 4,902
- Reused references
- 241
- Depth
- 88
- Cuts
- 1,795
- Certificate SHA-256
37a53929d638…
pow_zeroPow zero
Quadratic reciprocity campaign
checked
The relational zeroth power is one.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use beta_product_zero
intro a
intro e
intro n
intro he
intro hpow
rewrite he at hpow
rewrite he at hpow
rewrite he at hpow
rewrite he at hpow
cases hpow
cases hpow_witness
cases hpow_witness_witness
specialize beta_product_zero x
specialize beta_product_zero x1
specialize beta_product_zero n
apply beta_product_zero
exact hpow_witness_witness_right
qed
- Occurrences
- 1,224
- Distinct objects
- 795
- Reused references
- 37
- Depth
- 61
- Cuts
- 32
- Certificate SHA-256
f3e5705226dd…
pow_functionalPow functional
Quadratic reciprocity campaign
checked
Relational powers have a unique natural value.
Exact expanded PA statement
forall a e n m. (exists ff_b_l ff_c_l. ((forall ff_i_l_repeat. (exists ff_lt_l_repeat_bound. ff_lt_l_repeat_bound + S ff_i_l_repeat = e) -> (((exists ff_h_l_repeat_decoded. ff_h_l_repeat_decoded + S (a) = S ((S (ff_i_l_repeat)) * ff_c_l)) /\ exists ff_q_l_repeat_decoded. ff_b_l = ff_q_l_repeat_decoded * S ((S (ff_i_l_repeat)) * ff_c_l) + (a)))) /\ (exists ff_u_l_product ff_v_l_product. ((((exists ff_h_l_product_start. ff_h_l_product_start + S (1) = S ((S (0)) * ff_v_l_product)) /\ exists ff_q_l_product_start. ff_u_l_product = ff_q_l_product_start * S ((S (0)) * ff_v_l_product) + (1))) /\ ((((exists ff_h_l_product_terminal. ff_h_l_product_terminal + S (n) = S ((S (e)) * ff_v_l_product)) /\ exists ff_q_l_product_terminal. ff_u_l_product = ff_q_l_product_terminal * S ((S (e)) * ff_v_l_product) + (n))) /\ forall ff_i_l_product. (exists ff_lt_l_product_bound. ff_lt_l_product_bound + S ff_i_l_product = e) -> exists ff_p_l_product ff_r_l_product ff_s_l_product. ((((exists ff_h_l_product_factor. ff_h_l_product_factor + S (ff_p_l_product) = S ((S (ff_i_l_product)) * ff_c_l)) /\ exists ff_q_l_product_factor. ff_b_l = ff_q_l_product_factor * S ((S (ff_i_l_product)) * ff_c_l) + (ff_p_l_product))) /\ ((((exists ff_h_l_product_partial. ff_h_l_product_partial + S (ff_r_l_product) = S ((S (ff_i_l_product)) * ff_v_l_product)) /\ exists ff_q_l_product_partial. ff_u_l_product = ff_q_l_product_partial * S ((S (ff_i_l_product)) * ff_v_l_product) + (ff_r_l_product))) /\ ((((exists ff_h_l_product_successor. ff_h_l_product_successor + S (ff_s_l_product) = S ((S (S ff_i_l_product)) * ff_v_l_product)) /\ exists ff_q_l_product_successor. ff_u_l_product = ff_q_l_product_successor * S ((S (S ff_i_l_product)) * ff_v_l_product) + (ff_s_l_product))) /\ ff_s_l_product = ff_r_l_product * ff_p_l_product)))))))) -> (exists ff_b_r ff_c_r. ((forall ff_i_r_repeat. (exists ff_lt_r_repeat_bound. ff_lt_r_repeat_bound + S ff_i_r_repeat = e) -> (((exists ff_h_r_repeat_decoded. ff_h_r_repeat_decoded + S (a) = S ((S (ff_i_r_repeat)) * ff_c_r)) /\ exists ff_q_r_repeat_decoded. ff_b_r = ff_q_r_repeat_decoded * S ((S (ff_i_r_repeat)) * ff_c_r) + (a)))) /\ (exists ff_u_r_product ff_v_r_product. ((((exists ff_h_r_product_start. ff_h_r_product_start + S (1) = S ((S (0)) * ff_v_r_product)) /\ exists ff_q_r_product_start. ff_u_r_product = ff_q_r_product_start * S ((S (0)) * ff_v_r_product) + (1))) /\ ((((exists ff_h_r_product_terminal. ff_h_r_product_terminal + S (m) = S ((S (e)) * ff_v_r_product)) /\ exists ff_q_r_product_terminal. ff_u_r_product = ff_q_r_product_terminal * S ((S (e)) * ff_v_r_product) + (m))) /\ forall ff_i_r_product. (exists ff_lt_r_product_bound. ff_lt_r_product_bound + S ff_i_r_product = e) -> exists ff_p_r_product ff_r_r_product ff_s_r_product. ((((exists ff_h_r_product_factor. ff_h_r_product_factor + S (ff_p_r_product) = S ((S (ff_i_r_product)) * ff_c_r)) /\ exists ff_q_r_product_factor. ff_b_r = ff_q_r_product_factor * S ((S (ff_i_r_product)) * ff_c_r) + (ff_p_r_product))) /\ ((((exists ff_h_r_product_partial. ff_h_r_product_partial + S (ff_r_r_product) = S ((S (ff_i_r_product)) * ff_v_r_product)) /\ exists ff_q_r_product_partial. ff_u_r_product = ff_q_r_product_partial * S ((S (ff_i_r_product)) * ff_v_r_product) + (ff_r_r_product))) /\ ((((exists ff_h_r_product_successor. ff_h_r_product_successor + S (ff_s_r_product) = S ((S (S ff_i_r_product)) * ff_v_r_product)) /\ exists ff_q_r_product_successor. ff_u_r_product = ff_q_r_product_successor * S ((S (S ff_i_r_product)) * ff_v_r_product) + (ff_s_r_product))) /\ ff_s_r_product = ff_r_r_product * ff_p_r_product)))))))) -> n = m
Complete replay recipe: dependency imports + authored proof
pa prove forall a e n m. (exists ff_b_l ff_c_l. ((forall ff_i_l_repeat. (exists ff_lt_l_repeat_bound. ff_lt_l_repeat_bound + S ff_i_l_repeat = e) -> (((exists ff_h_l_repeat_decoded. ff_h_l_repeat_decoded + S (a) = S ((S (ff_i_l_repeat)) * ff_c_l)) /\ exists ff_q_l_repeat_decoded. ff_b_l = ff_q_l_repeat_decoded * S ((S (ff_i_l_repeat)) * ff_c_l) + (a)))) /\ (exists ff_u_l_product ff_v_l_product. ((((exists ff_h_l_product_start. ff_h_l_product_start + S (1) = S ((S (0)) * ff_v_l_product)) /\ exists ff_q_l_product_start. ff_u_l_product = ff_q_l_product_start * S ((S (0)) * ff_v_l_product) + (1))) /\ ((((exists ff_h_l_product_terminal. ff_h_l_product_terminal + S (n) = S ((S (e)) * ff_v_l_product)) /\ exists ff_q_l_product_terminal. ff_u_l_product = ff_q_l_product_terminal * S ((S (e)) * ff_v_l_product) + (n))) /\ forall ff_i_l_product. (exists ff_lt_l_product_bound. ff_lt_l_product_bound + S ff_i_l_product = e) -> exists ff_p_l_product ff_r_l_product ff_s_l_product. ((((exists ff_h_l_product_factor. ff_h_l_product_factor + S (ff_p_l_product) = S ((S (ff_i_l_product)) * ff_c_l)) /\ exists ff_q_l_product_factor. ff_b_l = ff_q_l_product_factor * S ((S (ff_i_l_product)) * ff_c_l) + (ff_p_l_product))) /\ ((((exists ff_h_l_product_partial. ff_h_l_product_partial + S (ff_r_l_product) = S ((S (ff_i_l_product)) * ff_v_l_product)) /\ exists ff_q_l_product_partial. ff_u_l_product = ff_q_l_product_partial * S ((S (ff_i_l_product)) * ff_v_l_product) + (ff_r_l_product))) /\ ((((exists ff_h_l_product_successor. ff_h_l_product_successor + S (ff_s_l_product) = S ((S (S ff_i_l_product)) * ff_v_l_product)) /\ exists ff_q_l_product_successor. ff_u_l_product = ff_q_l_product_successor * S ((S (S ff_i_l_product)) * ff_v_l_product) + (ff_s_l_product))) /\ ff_s_l_product = ff_r_l_product * ff_p_l_product)))))))) -> (exists ff_b_r ff_c_r. ((forall ff_i_r_repeat. (exists ff_lt_r_repeat_bound. ff_lt_r_repeat_bound + S ff_i_r_repeat = e) -> (((exists ff_h_r_repeat_decoded. ff_h_r_repeat_decoded + S (a) = S ((S (ff_i_r_repeat)) * ff_c_r)) /\ exists ff_q_r_repeat_decoded. ff_b_r = ff_q_r_repeat_decoded * S ((S (ff_i_r_repeat)) * ff_c_r) + (a)))) /\ (exists ff_u_r_product ff_v_r_product. ((((exists ff_h_r_product_start. ff_h_r_product_start + S (1) = S ((S (0)) * ff_v_r_product)) /\ exists ff_q_r_product_start. ff_u_r_product = ff_q_r_product_start * S ((S (0)) * ff_v_r_product) + (1))) /\ ((((exists ff_h_r_product_terminal. ff_h_r_product_terminal + S (m) = S ((S (e)) * ff_v_r_product)) /\ exists ff_q_r_product_terminal. ff_u_r_product = ff_q_r_product_terminal * S ((S (e)) * ff_v_r_product) + (m))) /\ forall ff_i_r_product. (exists ff_lt_r_product_bound. ff_lt_r_product_bound + S ff_i_r_product = e) -> exists ff_p_r_product ff_r_r_product ff_s_r_product. ((((exists ff_h_r_product_factor. ff_h_r_product_factor + S (ff_p_r_product) = S ((S (ff_i_r_product)) * ff_c_r)) /\ exists ff_q_r_product_factor. ff_b_r = ff_q_r_product_factor * S ((S (ff_i_r_product)) * ff_c_r) + (ff_p_r_product))) /\ ((((exists ff_h_r_product_partial. ff_h_r_product_partial + S (ff_r_r_product) = S ((S (ff_i_r_product)) * ff_v_r_product)) /\ exists ff_q_r_product_partial. ff_u_r_product = ff_q_r_product_partial * S ((S (ff_i_r_product)) * ff_v_r_product) + (ff_r_r_product))) /\ ((((exists ff_h_r_product_successor. ff_h_r_product_successor + S (ff_s_r_product) = S ((S (S ff_i_r_product)) * ff_v_r_product)) /\ exists ff_q_r_product_successor. ff_u_r_product = ff_q_r_product_successor * S ((S (S ff_i_r_product)) * ff_v_r_product) + (ff_s_r_product))) /\ ff_s_r_product = ff_r_r_product * ff_p_r_product)))))))) -> n = m
use beta_repeat_transport_entry
use beta_product_transport_prefix
use beta_product_functional
intro a
intro e
intro n
intro m
intro hn
intro hm
cases hn
cases hn_witness
cases hn_witness_witness
cases hm
cases hm_witness
cases hm_witness_witness
have htransport : exists ff_u_transport ff_v_transport. ((((exists ff_h_transport_start. ff_h_transport_start + S (1) = S ((S (0)) * ff_v_transport)) /\ exists ff_q_transport_start. ff_u_transport = ff_q_transport_start * S ((S (0)) * ff_v_transport) + (1))) /\ ((((exists ff_h_transport_terminal. ff_h_transport_terminal + S (n) = S ((S (e)) * ff_v_transport)) /\ exists ff_q_transport_terminal. ff_u_transport = ff_q_transport_terminal * S ((S (e)) * ff_v_transport) + (n))) /\ forall ff_i_transport. (exists ff_lt_transport_bound. ff_lt_transport_bound + S ff_i_transport = e) -> exists ff_p_transport ff_r_transport ff_s_transport. ((((exists ff_h_transport_factor. ff_h_transport_factor + S (ff_p_transport) = S ((S (ff_i_transport)) * x3)) /\ exists ff_q_transport_factor. x2 = ff_q_transport_factor * S ((S (ff_i_transport)) * x3) + (ff_p_transport))) /\ ((((exists ff_h_transport_partial. ff_h_transport_partial + S (ff_r_transport) = S ((S (ff_i_transport)) * ff_v_transport)) /\ exists ff_q_transport_partial. ff_u_transport = ff_q_transport_partial * S ((S (ff_i_transport)) * ff_v_transport) + (ff_r_transport))) /\ ((((exists ff_h_transport_successor. ff_h_transport_successor + S (ff_s_transport) = S ((S (S ff_i_transport)) * ff_v_transport)) /\ exists ff_q_transport_successor. ff_u_transport = ff_q_transport_successor * S ((S (S ff_i_transport)) * ff_v_transport) + (ff_s_transport))) /\ ff_s_transport = ff_r_transport * ff_p_transport)))))
specialize beta_product_transport_prefix x
specialize beta_product_transport_prefix x1
specialize beta_product_transport_prefix x2
specialize beta_product_transport_prefix x3
specialize beta_product_transport_prefix e
specialize beta_product_transport_prefix n
apply beta_product_transport_prefix
exact hn_witness_witness_right
intro i
intro p
intro hi
intro hp
specialize beta_repeat_transport_entry x
specialize beta_repeat_transport_entry x1
specialize beta_repeat_transport_entry x2
specialize beta_repeat_transport_entry x3
specialize beta_repeat_transport_entry a
specialize beta_repeat_transport_entry e
have hentries : forall i p. (exists h. h + S i = e) -> (((exists ff_h_pow_transport_l. ff_h_pow_transport_l + S (p) = S ((S (i)) * x1)) /\ exists ff_q_pow_transport_l. x = ff_q_pow_transport_l * S ((S (i)) * x1) + (p))) -> (((exists ff_h_pow_transport_r. ff_h_pow_transport_r + S (p) = S ((S (i)) * x3)) /\ exists ff_q_pow_transport_r. x2 = ff_q_pow_transport_r * S ((S (i)) * x3) + (p)))
apply beta_repeat_transport_entry
exact hn_witness_witness_left
exact hm_witness_witness_left
specialize hentries i
specialize hentries p
apply hentries
exact hi
exact hp
cases htransport
cases htransport_witness
cases hm_witness_witness_right
cases hm_witness_witness_right_witness
specialize beta_product_functional x2
specialize beta_product_functional x3
specialize beta_product_functional e
specialize beta_product_functional n
specialize beta_product_functional x4
specialize beta_product_functional x5
specialize beta_product_functional m
specialize beta_product_functional x6
specialize beta_product_functional x7
apply beta_product_functional
exact htransport_witness_witness
exact hm_witness_witness_right_witness_witness
qed
- Occurrences
- 2,705
- Distinct objects
- 1,111
- Reused references
- 40
- Depth
- 63
- Cuts
- 71
- Certificate SHA-256
93be6fa1bf46…
pow_successor_decomposePow successor decompose
Quadratic reciprocity campaign
checked
A successor relational power is its predecessor power times the base.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use beta_product_succ_decompose
use beta_repeat_entry_eq
use le_refl
use le_succ
intro a
intro e
intro se
intro n
intro hse
intro hpow
rewrite hse at hpow
rewrite hse at hpow
rewrite hse at hpow
rewrite hse at hpow
cases hpow
cases hpow_witness
cases hpow_witness_witness
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)
specialize beta_product_succ_decompose x
specialize beta_product_succ_decompose x1
specialize beta_product_succ_decompose e
specialize beta_product_succ_decompose n
apply beta_product_succ_decompose
exact hpow_witness_witness_right
cases hdecomp
cases hdecomp_witness
cases hdecomp_witness_witness
cases hdecomp_witness_witness_right
have hpa : x2 = a
specialize beta_repeat_entry_eq x
specialize beta_repeat_entry_eq x1
specialize beta_repeat_entry_eq a
specialize beta_repeat_entry_eq (S e)
specialize beta_repeat_entry_eq e
specialize beta_repeat_entry_eq x2
apply beta_repeat_entry_eq
exact hpow_witness_witness_left
specialize le_refl (S e)
exact le_refl
exact hdecomp_witness_witness_left
exists x3
split
exists x
exists x1
split
intro i
intro hi
specialize hpow_witness_witness_left i
apply hpow_witness_witness_left
specialize le_succ (S i)
specialize le_succ e
apply le_succ
exact hi
exact hdecomp_witness_witness_right_left
trans x3 * x2
exact hdecomp_witness_witness_right_right
rewrite hpa
refl
qed
- Occurrences
- 2,541
- Distinct objects
- 882
- Reused references
- 42
- Depth
- 63
- Cuts
- 72
- Certificate SHA-256
70defcae97b2…
beta_range_emptyBeta range empty
Quadratic reciprocity campaign
checked
Every consecutive beta range of length zero is vacuous.
Exact expanded PA statement
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))))
Complete replay recipe: dependency imports + authored proof
pa prove 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))))
use add_eq_zero_right
use succ_ne_zero
intro b
intro c
intro a
intro l
intro hl
intro i
intro hi
rewrite hl at hi
exfalso
cases hi
have hsi : S i = 0
specialize add_eq_zero_right x
specialize add_eq_zero_right (S i)
apply add_eq_zero_right
exact hi_witness
specialize succ_ne_zero i
apply succ_ne_zero
exact hsi
qed
- Occurrences
- 42
- Distinct objects
- 42
- Reused references
- 0
- Depth
- 16
- Cuts
- 2
- Certificate SHA-256
d7a576b1da6f…
beta_range_succ_extendBeta range succ extend
Quadratic reciprocity campaign
checked
Recode a consecutive prefix and append its next value.
Exact expanded PA statement
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))))
Complete replay recipe: dependency imports + authored proof
pa prove 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))))
use beta_prefix_extend
use le_of_succ_le_succ
use le_eq_or_lt
intro b
intro c
intro a
intro l
intro sl
intro hsl
intro hrange
specialize beta_prefix_extend l
specialize beta_prefix_extend b
specialize beta_prefix_extend c
specialize beta_prefix_extend (a + l)
cases beta_prefix_extend
cases beta_prefix_extend_witness
cases beta_prefix_extend_witness_witness
exists x
exists x1
intro i
intro hi
rewrite hsl at hi
have hil : exists h. h + i = l
specialize le_of_succ_le_succ i
specialize le_of_succ_le_succ l
apply le_of_succ_le_succ
exact hi
have hsplit : i = l \/ exists h. h + S i = l
specialize le_eq_or_lt i
specialize le_eq_or_lt l
apply le_eq_or_lt
exact hil
cases hsplit
rewrite hsplit_left
rewrite hsplit_left
rewrite hsplit_left
rewrite hsplit_left
exact beta_prefix_extend_witness_witness_left
specialize beta_prefix_extend_witness_witness_right i
specialize beta_prefix_extend_witness_witness_right (a + i)
apply beta_prefix_extend_witness_witness_right
exact hsplit_right
specialize hrange i
apply hrange
exact hsplit_right
qed
- Occurrences
- 29,230
- Distinct objects
- 4,567
- Reused references
- 227
- Depth
- 81
- Cuts
- 873
- Certificate SHA-256
379e8d001340…
beta_range_existsBeta range exists
Quadratic reciprocity campaign
checked
Every start and length admit a beta-coded consecutive range.
Exact expanded PA statement
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))))
Complete replay recipe: dependency imports + authored proof
pa prove 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))))
use beta_range_empty
use beta_range_succ_extend
intro a
induction l
exists 0
exists 0
specialize beta_range_empty 0
specialize beta_range_empty 0
specialize beta_range_empty a
specialize beta_range_empty 0
apply beta_range_empty
refl
cases IH
cases IH_witness
specialize beta_range_succ_extend x
specialize beta_range_succ_extend x1
specialize beta_range_succ_extend a
specialize beta_range_succ_extend l
specialize beta_range_succ_extend (S l)
apply beta_range_succ_extend
refl
exact IH_witness_witness
qed
- Occurrences
- 29,328
- Distinct objects
- 4,645
- Reused references
- 229
- Depth
- 83
- Cuts
- 877
- Certificate SHA-256
a1cbdd3326cc…
beta_range_entry_eqBeta range entry eq
Quadratic reciprocity campaign
checked
A decoded entry of a Range prefix is its start plus its index.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use beta_at_unique
intro b
intro c
intro a
intro l
intro i
intro x
intro hrange
intro hi
intro hx
have ha : ((exists h. h + S (a + i) = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + (a + i))
specialize hrange i
apply hrange
exact hi
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique i
specialize beta_at_unique x
specialize beta_at_unique (a + i)
apply beta_at_unique
exact hx
exact ha
qed
- Occurrences
- 1,144
- Distinct objects
- 715
- Reused references
- 37
- Depth
- 60
- Cuts
- 31
- Certificate SHA-256
0dd30bba2db7…
beta_range_transport_entryBeta range transport entry
Quadratic reciprocity campaign
checked
Two Range codes preserve every decoded entry extensionally.
Exact expanded PA statement
forall b c z d a l. (forall ff_i_transport_l. (exists ff_lt_transport_l_bound. ff_lt_transport_l_bound + S ff_i_transport_l = l) -> (((exists ff_h_transport_l_decoded. ff_h_transport_l_decoded + S (a + ff_i_transport_l) = S ((S (ff_i_transport_l)) * c)) /\ exists ff_q_transport_l_decoded. b = ff_q_transport_l_decoded * S ((S (ff_i_transport_l)) * c) + (a + ff_i_transport_l)))) -> (forall ff_i_transport_r. (exists ff_lt_transport_r_bound. ff_lt_transport_r_bound + S ff_i_transport_r = l) -> (((exists ff_h_transport_r_decoded. ff_h_transport_r_decoded + S (a + ff_i_transport_r) = S ((S (ff_i_transport_r)) * d)) /\ exists ff_q_transport_r_decoded. z = ff_q_transport_r_decoded * S ((S (ff_i_transport_r)) * d) + (a + ff_i_transport_r)))) -> forall i x. (exists h. h + S i = l) -> (((exists ff_h_range_transport_x. ff_h_range_transport_x + S (x) = S ((S (i)) * c)) /\ exists ff_q_range_transport_x. b = ff_q_range_transport_x * S ((S (i)) * c) + (x))) -> (((exists ff_h_range_transport_y. ff_h_range_transport_y + S (x) = S ((S (i)) * d)) /\ exists ff_q_range_transport_y. z = ff_q_range_transport_y * S ((S (i)) * d) + (x)))
Complete replay recipe: dependency imports + authored proof
pa prove forall b c z d a l. (forall ff_i_transport_l. (exists ff_lt_transport_l_bound. ff_lt_transport_l_bound + S ff_i_transport_l = l) -> (((exists ff_h_transport_l_decoded. ff_h_transport_l_decoded + S (a + ff_i_transport_l) = S ((S (ff_i_transport_l)) * c)) /\ exists ff_q_transport_l_decoded. b = ff_q_transport_l_decoded * S ((S (ff_i_transport_l)) * c) + (a + ff_i_transport_l)))) -> (forall ff_i_transport_r. (exists ff_lt_transport_r_bound. ff_lt_transport_r_bound + S ff_i_transport_r = l) -> (((exists ff_h_transport_r_decoded. ff_h_transport_r_decoded + S (a + ff_i_transport_r) = S ((S (ff_i_transport_r)) * d)) /\ exists ff_q_transport_r_decoded. z = ff_q_transport_r_decoded * S ((S (ff_i_transport_r)) * d) + (a + ff_i_transport_r)))) -> forall i x. (exists h. h + S i = l) -> (((exists ff_h_range_transport_x. ff_h_range_transport_x + S (x) = S ((S (i)) * c)) /\ exists ff_q_range_transport_x. b = ff_q_range_transport_x * S ((S (i)) * c) + (x))) -> (((exists ff_h_range_transport_y. ff_h_range_transport_y + S (x) = S ((S (i)) * d)) /\ exists ff_q_range_transport_y. z = ff_q_range_transport_y * S ((S (i)) * d) + (x)))
use beta_range_entry_eq
intro b
intro c
intro z
intro d
intro a
intro l
intro hleft
intro hright
intro i
intro x
intro hi
intro hx
have hxa : x = a + i
specialize beta_range_entry_eq b
specialize beta_range_entry_eq c
specialize beta_range_entry_eq a
specialize beta_range_entry_eq l
specialize beta_range_entry_eq i
specialize beta_range_entry_eq x
apply beta_range_entry_eq
exact hleft
exact hi
exact hx
rewrite hxa
rewrite hxa
specialize hright i
apply hright
exact hi
qed
- Occurrences
- 1,191
- Distinct objects
- 762
- Reused references
- 37
- Depth
- 61
- Cuts
- 32
- Certificate SHA-256
fcaeff825005…
beta_prefix_sum_trace_existsBeta prefix sum trace exists
Quadratic reciprocity campaign
checked
Every decoded beta prefix admits an exact beta-coded prefix-sum trace.
Exact expanded PA statement
forall b c l. exists fs_u_trace fs_v_trace. ((((exists fs_h_trace_start. fs_h_trace_start + S (0) = S ((S (0)) * fs_v_trace)) /\ exists fs_q_trace_start. fs_u_trace = fs_q_trace_start * S ((S (0)) * fs_v_trace) + (0))) /\ forall fs_i_trace_steps. (exists fs_lt_trace_steps_bound. fs_lt_trace_steps_bound + S fs_i_trace_steps = l) -> exists fs_a_trace_steps fs_r_trace_steps fs_s_trace_steps. ((((exists fs_h_trace_steps_summand. fs_h_trace_steps_summand + S (fs_a_trace_steps) = S ((S (fs_i_trace_steps)) * c)) /\ exists fs_q_trace_steps_summand. b = fs_q_trace_steps_summand * S ((S (fs_i_trace_steps)) * c) + (fs_a_trace_steps))) /\ ((((exists fs_h_trace_steps_partial. fs_h_trace_steps_partial + S (fs_r_trace_steps) = S ((S (fs_i_trace_steps)) * fs_v_trace)) /\ exists fs_q_trace_steps_partial. fs_u_trace = fs_q_trace_steps_partial * S ((S (fs_i_trace_steps)) * fs_v_trace) + (fs_r_trace_steps))) /\ ((((exists fs_h_trace_steps_successor. fs_h_trace_steps_successor + S (fs_s_trace_steps) = S ((S (S fs_i_trace_steps)) * fs_v_trace)) /\ exists fs_q_trace_steps_successor. fs_u_trace = fs_q_trace_steps_successor * S ((S (S fs_i_trace_steps)) * fs_v_trace) + (fs_s_trace_steps))) /\ fs_s_trace_steps = fs_r_trace_steps + fs_a_trace_steps))))
Complete replay recipe: dependency imports + authored proof
pa prove forall b c l. exists fs_u_trace fs_v_trace. ((((exists fs_h_trace_start. fs_h_trace_start + S (0) = S ((S (0)) * fs_v_trace)) /\ exists fs_q_trace_start. fs_u_trace = fs_q_trace_start * S ((S (0)) * fs_v_trace) + (0))) /\ forall fs_i_trace_steps. (exists fs_lt_trace_steps_bound. fs_lt_trace_steps_bound + S fs_i_trace_steps = l) -> exists fs_a_trace_steps fs_r_trace_steps fs_s_trace_steps. ((((exists fs_h_trace_steps_summand. fs_h_trace_steps_summand + S (fs_a_trace_steps) = S ((S (fs_i_trace_steps)) * c)) /\ exists fs_q_trace_steps_summand. b = fs_q_trace_steps_summand * S ((S (fs_i_trace_steps)) * c) + (fs_a_trace_steps))) /\ ((((exists fs_h_trace_steps_partial. fs_h_trace_steps_partial + S (fs_r_trace_steps) = S ((S (fs_i_trace_steps)) * fs_v_trace)) /\ exists fs_q_trace_steps_partial. fs_u_trace = fs_q_trace_steps_partial * S ((S (fs_i_trace_steps)) * fs_v_trace) + (fs_r_trace_steps))) /\ ((((exists fs_h_trace_steps_successor. fs_h_trace_steps_successor + S (fs_s_trace_steps) = S ((S (S fs_i_trace_steps)) * fs_v_trace)) /\ exists fs_q_trace_steps_successor. fs_u_trace = fs_q_trace_steps_successor * S ((S (S fs_i_trace_steps)) * fs_v_trace) + (fs_s_trace_steps))) /\ fs_s_trace_steps = fs_r_trace_steps + fs_a_trace_steps))))
use beta_at_self_of_bound
use add_eq_zero_right
use succ_ne_zero
use beta_at_exists
use beta_prefix_extend
use zero_le
use succ_le_succ
use le_refl
use le_of_succ_le_succ
use le_eq_or_lt
use one_mul
intro b
intro c
induction l
exists 0
exists 1
split
specialize beta_at_self_of_bound 1
specialize beta_at_self_of_bound 0
specialize beta_at_self_of_bound 0
apply beta_at_self_of_bound
specialize one_mul 1
rewrite one_mul
specialize succ_le_succ 0
specialize succ_le_succ (S 0)
apply succ_le_succ
specialize zero_le (S 0)
exact zero_le
intro i
intro hi
exfalso
cases hi
have hsi0 : S i = 0
specialize add_eq_zero_right x
specialize add_eq_zero_right (S i)
apply add_eq_zero_right
exact hi_witness
specialize succ_ne_zero i
apply succ_ne_zero
exact hsi0
have htrace : exists fs_u_induction fs_v_induction. ((((exists fs_h_induction_start. fs_h_induction_start + S (0) = S ((S (0)) * fs_v_induction)) /\ exists fs_q_induction_start. fs_u_induction = fs_q_induction_start * S ((S (0)) * fs_v_induction) + (0))) /\ forall fs_i_induction_steps. (exists fs_lt_induction_steps_bound. fs_lt_induction_steps_bound + S fs_i_induction_steps = l) -> exists fs_a_induction_steps fs_r_induction_steps fs_s_induction_steps. ((((exists fs_h_induction_steps_summand. fs_h_induction_steps_summand + S (fs_a_induction_steps) = S ((S (fs_i_induction_steps)) * c)) /\ exists fs_q_induction_steps_summand. b = fs_q_induction_steps_summand * S ((S (fs_i_induction_steps)) * c) + (fs_a_induction_steps))) /\ ((((exists fs_h_induction_steps_partial. fs_h_induction_steps_partial + S (fs_r_induction_steps) = S ((S (fs_i_induction_steps)) * fs_v_induction)) /\ exists fs_q_induction_steps_partial. fs_u_induction = fs_q_induction_steps_partial * S ((S (fs_i_induction_steps)) * fs_v_induction) + (fs_r_induction_steps))) /\ ((((exists fs_h_induction_steps_successor. fs_h_induction_steps_successor + S (fs_s_induction_steps) = S ((S (S fs_i_induction_steps)) * fs_v_induction)) /\ exists fs_q_induction_steps_successor. fs_u_induction = fs_q_induction_steps_successor * S ((S (S fs_i_induction_steps)) * fs_v_induction) + (fs_s_induction_steps))) /\ fs_s_induction_steps = fs_r_induction_steps + fs_a_induction_steps))))
apply IH
cases htrace
cases htrace_witness
cases htrace_witness_witness
have hfactor : exists p. ((exists fs_h_trace_factor. fs_h_trace_factor + S (p) = S ((S (l)) * c)) /\ exists fs_q_trace_factor. b = fs_q_trace_factor * S ((S (l)) * c) + (p))
specialize beta_at_exists b
specialize beta_at_exists c
specialize beta_at_exists l
exact beta_at_exists
cases hfactor
have hlast : exists r. ((exists fs_h_trace_last. fs_h_trace_last + S (r) = S ((S (l)) * x1)) /\ exists fs_q_trace_last. x = fs_q_trace_last * S ((S (l)) * x1) + (r))
specialize beta_at_exists x
specialize beta_at_exists x1
specialize beta_at_exists l
exact beta_at_exists
cases hlast
have hext : exists z v. ((((exists fs_h_trace_extension. fs_h_trace_extension + S (x3 + x2) = S ((S (S l)) * v)) /\ exists fs_q_trace_extension. z = fs_q_trace_extension * S ((S (S l)) * v) + (x3 + x2))) /\ forall i a. (exists h. h + S i = S l) -> (((exists fs_h_trace_old. fs_h_trace_old + S (a) = S ((S (i)) * x1)) /\ exists fs_q_trace_old. x = fs_q_trace_old * S ((S (i)) * x1) + (a))) -> (((exists fs_h_trace_new. fs_h_trace_new + S (a) = S ((S (i)) * v)) /\ exists fs_q_trace_new. z = fs_q_trace_new * S ((S (i)) * v) + (a))))
specialize beta_prefix_extend (S l)
specialize beta_prefix_extend x
specialize beta_prefix_extend x1
specialize beta_prefix_extend (x3 + x2)
exact beta_prefix_extend
cases hext
cases hext_witness
cases hext_witness_witness
exists x4
exists x5
split
specialize hext_witness_witness_right 0
specialize hext_witness_witness_right 0
apply hext_witness_witness_right
have h0 : exists h. h + S 0 = S l
have hzero : exists h. h + 0 = l
specialize zero_le l
exact zero_le
specialize succ_le_succ 0
specialize succ_le_succ l
apply succ_le_succ
exact hzero
exact h0
exact htrace_witness_witness_left
intro i
intro hi
have hil : exists h. h + i = l
specialize le_of_succ_le_succ i
specialize le_of_succ_le_succ l
apply le_of_succ_le_succ
exact hi
have hsplit : i = l \/ exists h. h + S i = l
specialize le_eq_or_lt i
specialize le_eq_or_lt l
apply le_eq_or_lt
exact hil
cases hsplit
exists x2
exists x3
exists x3 + x2
split
rewrite hsplit_left
rewrite hsplit_left
exact hfactor_witness
split
rewrite hsplit_left
rewrite hsplit_left
specialize hext_witness_witness_right l
specialize hext_witness_witness_right x3
apply hext_witness_witness_right
specialize le_refl (S l)
exact le_refl
exact hlast_witness
split
rewrite hsplit_left
rewrite hsplit_left
exact hext_witness_witness_left
refl
have hold : exists p r s. ((((exists fs_h_trace_hold_factor. fs_h_trace_hold_factor + S (p) = S ((S (i)) * c)) /\ exists fs_q_trace_hold_factor. b = fs_q_trace_hold_factor * S ((S (i)) * c) + (p))) /\ ((((exists fs_h_trace_hold_partial. fs_h_trace_hold_partial + S (r) = S ((S (i)) * x1)) /\ exists fs_q_trace_hold_partial. x = fs_q_trace_hold_partial * S ((S (i)) * x1) + (r))) /\ ((((exists fs_h_trace_hold_successor. fs_h_trace_hold_successor + S (s) = S ((S (S i)) * x1)) /\ exists fs_q_trace_hold_successor. x = fs_q_trace_hold_successor * S ((S (S i)) * x1) + (s))) /\ s = r + p)))
specialize htrace_witness_witness_right i
apply htrace_witness_witness_right
exact hsplit_right
cases hold
cases hold_witness
cases hold_witness_witness
cases hold_witness_witness_witness
cases hold_witness_witness_witness_right
cases hold_witness_witness_witness_right_right
exists x6
exists x7
exists x8
split
exact hold_witness_witness_witness_left
split
specialize hext_witness_witness_right i
specialize hext_witness_witness_right x7
apply hext_witness_witness_right
exact hi
exact hold_witness_witness_witness_right_left
split
specialize hext_witness_witness_right (S i)
specialize hext_witness_witness_right x8
apply hext_witness_witness_right
specialize succ_le_succ (S i)
specialize succ_le_succ l
apply succ_le_succ
exact hsplit_right
exact hold_witness_witness_witness_right_right_left
exact hold_witness_witness_witness_right_right_right
qed
- Occurrences
- 29,985
- Distinct objects
- 4,721
- Reused references
- 235
- Depth
- 85
- Cuts
- 899
- Certificate SHA-256
d0c3456472f1…
beta_sum_existsBeta sum exists
Quadratic reciprocity campaign
checked
Every decoded beta prefix has a relational finite sum.
Exact expanded PA statement
forall b c l. exists n. (exists ff_u_x ff_v_x. ((((exists ff_h_x_start. ff_h_x_start + S (0) = S ((S (0)) * ff_v_x)) /\ exists ff_q_x_start. ff_u_x = ff_q_x_start * S ((S (0)) * ff_v_x) + (0))) /\ ((((exists ff_h_x_terminal. ff_h_x_terminal + S (n) = S ((S (l)) * ff_v_x)) /\ exists ff_q_x_terminal. ff_u_x = ff_q_x_terminal * S ((S (l)) * ff_v_x) + (n))) /\ forall ff_i_x. (exists ff_lt_x_bound. ff_lt_x_bound + S ff_i_x = l) -> exists ff_a_x ff_r_x ff_s_x. ((((exists ff_h_x_summand. ff_h_x_summand + S (ff_a_x) = S ((S (ff_i_x)) * c)) /\ exists ff_q_x_summand. b = ff_q_x_summand * S ((S (ff_i_x)) * c) + (ff_a_x))) /\ ((((exists ff_h_x_partial. ff_h_x_partial + S (ff_r_x) = S ((S (ff_i_x)) * ff_v_x)) /\ exists ff_q_x_partial. ff_u_x = ff_q_x_partial * S ((S (ff_i_x)) * ff_v_x) + (ff_r_x))) /\ ((((exists ff_h_x_successor. ff_h_x_successor + S (ff_s_x) = S ((S (S ff_i_x)) * ff_v_x)) /\ exists ff_q_x_successor. ff_u_x = ff_q_x_successor * S ((S (S ff_i_x)) * ff_v_x) + (ff_s_x))) /\ ff_s_x = ff_r_x + ff_a_x))))))
Complete replay recipe: dependency imports + authored proof
pa prove forall b c l. exists n. (exists ff_u_x ff_v_x. ((((exists ff_h_x_start. ff_h_x_start + S (0) = S ((S (0)) * ff_v_x)) /\ exists ff_q_x_start. ff_u_x = ff_q_x_start * S ((S (0)) * ff_v_x) + (0))) /\ ((((exists ff_h_x_terminal. ff_h_x_terminal + S (n) = S ((S (l)) * ff_v_x)) /\ exists ff_q_x_terminal. ff_u_x = ff_q_x_terminal * S ((S (l)) * ff_v_x) + (n))) /\ forall ff_i_x. (exists ff_lt_x_bound. ff_lt_x_bound + S ff_i_x = l) -> exists ff_a_x ff_r_x ff_s_x. ((((exists ff_h_x_summand. ff_h_x_summand + S (ff_a_x) = S ((S (ff_i_x)) * c)) /\ exists ff_q_x_summand. b = ff_q_x_summand * S ((S (ff_i_x)) * c) + (ff_a_x))) /\ ((((exists ff_h_x_partial. ff_h_x_partial + S (ff_r_x) = S ((S (ff_i_x)) * ff_v_x)) /\ exists ff_q_x_partial. ff_u_x = ff_q_x_partial * S ((S (ff_i_x)) * ff_v_x) + (ff_r_x))) /\ ((((exists ff_h_x_successor. ff_h_x_successor + S (ff_s_x) = S ((S (S ff_i_x)) * ff_v_x)) /\ exists ff_q_x_successor. ff_u_x = ff_q_x_successor * S ((S (S ff_i_x)) * ff_v_x) + (ff_s_x))) /\ ff_s_x = ff_r_x + ff_a_x))))))
use beta_prefix_sum_trace_exists
use beta_at_exists
intro b
intro c
intro l
have htrace : exists fs_u_exists_trace fs_v_exists_trace. ((((exists fs_h_exists_trace_start. fs_h_exists_trace_start + S (0) = S ((S (0)) * fs_v_exists_trace)) /\ exists fs_q_exists_trace_start. fs_u_exists_trace = fs_q_exists_trace_start * S ((S (0)) * fs_v_exists_trace) + (0))) /\ forall fs_i_exists_trace_steps. (exists fs_lt_exists_trace_steps_bound. fs_lt_exists_trace_steps_bound + S fs_i_exists_trace_steps = l) -> exists fs_a_exists_trace_steps fs_r_exists_trace_steps fs_s_exists_trace_steps. ((((exists fs_h_exists_trace_steps_summand. fs_h_exists_trace_steps_summand + S (fs_a_exists_trace_steps) = S ((S (fs_i_exists_trace_steps)) * c)) /\ exists fs_q_exists_trace_steps_summand. b = fs_q_exists_trace_steps_summand * S ((S (fs_i_exists_trace_steps)) * c) + (fs_a_exists_trace_steps))) /\ ((((exists fs_h_exists_trace_steps_partial. fs_h_exists_trace_steps_partial + S (fs_r_exists_trace_steps) = S ((S (fs_i_exists_trace_steps)) * fs_v_exists_trace)) /\ exists fs_q_exists_trace_steps_partial. fs_u_exists_trace = fs_q_exists_trace_steps_partial * S ((S (fs_i_exists_trace_steps)) * fs_v_exists_trace) + (fs_r_exists_trace_steps))) /\ ((((exists fs_h_exists_trace_steps_successor. fs_h_exists_trace_steps_successor + S (fs_s_exists_trace_steps) = S ((S (S fs_i_exists_trace_steps)) * fs_v_exists_trace)) /\ exists fs_q_exists_trace_steps_successor. fs_u_exists_trace = fs_q_exists_trace_steps_successor * S ((S (S fs_i_exists_trace_steps)) * fs_v_exists_trace) + (fs_s_exists_trace_steps))) /\ fs_s_exists_trace_steps = fs_r_exists_trace_steps + fs_a_exists_trace_steps))))
specialize beta_prefix_sum_trace_exists b
specialize beta_prefix_sum_trace_exists c
specialize beta_prefix_sum_trace_exists l
exact beta_prefix_sum_trace_exists
cases htrace
cases htrace_witness
cases htrace_witness_witness
have hterminal : exists n. ((exists fs_h_sum_terminal. fs_h_sum_terminal + S (n) = S ((S (l)) * x1)) /\ exists fs_q_sum_terminal. x = fs_q_sum_terminal * S ((S (l)) * x1) + (n))
specialize beta_at_exists x
specialize beta_at_exists x1
specialize beta_at_exists l
exact beta_at_exists
cases hterminal
exists x2
exists x
exists x1
split
exact htrace_witness_witness_left
split
exact hterminal_witness
exact htrace_witness_witness_right
qed
- Occurrences
- 30,491
- Distinct objects
- 4,748
- Reused references
- 236
- Depth
- 86
- Cuts
- 916
- Certificate SHA-256
b3c6bf491d9c…
beta_sum_trace_functionalBeta sum trace functional
Quadratic reciprocity campaign
checked
Two exact prefix-sum traces over one decoded prefix have equal endpoints.
Exact expanded PA statement
forall b c l n u v m w d. (((((exists fs_h_functional_left_start. fs_h_functional_left_start + S (0) = S ((S (0)) * v)) /\ exists fs_q_functional_left_start. u = fs_q_functional_left_start * S ((S (0)) * v) + (0))) /\ ((((exists fs_h_functional_left_terminal. fs_h_functional_left_terminal + S (n) = S ((S (l)) * v)) /\ exists fs_q_functional_left_terminal. u = fs_q_functional_left_terminal * S ((S (l)) * v) + (n))) /\ forall fs_i_functional_left_steps. (exists fs_lt_functional_left_steps_bound. fs_lt_functional_left_steps_bound + S fs_i_functional_left_steps = l) -> exists fs_a_functional_left_steps fs_r_functional_left_steps fs_s_functional_left_steps. ((((exists fs_h_functional_left_steps_summand. fs_h_functional_left_steps_summand + S (fs_a_functional_left_steps) = S ((S (fs_i_functional_left_steps)) * c)) /\ exists fs_q_functional_left_steps_summand. b = fs_q_functional_left_steps_summand * S ((S (fs_i_functional_left_steps)) * c) + (fs_a_functional_left_steps))) /\ ((((exists fs_h_functional_left_steps_partial. fs_h_functional_left_steps_partial + S (fs_r_functional_left_steps) = S ((S (fs_i_functional_left_steps)) * v)) /\ exists fs_q_functional_left_steps_partial. u = fs_q_functional_left_steps_partial * S ((S (fs_i_functional_left_steps)) * v) + (fs_r_functional_left_steps))) /\ ((((exists fs_h_functional_left_steps_successor. fs_h_functional_left_steps_successor + S (fs_s_functional_left_steps) = S ((S (S fs_i_functional_left_steps)) * v)) /\ exists fs_q_functional_left_steps_successor. u = fs_q_functional_left_steps_successor * S ((S (S fs_i_functional_left_steps)) * v) + (fs_s_functional_left_steps))) /\ fs_s_functional_left_steps = fs_r_functional_left_steps + fs_a_functional_left_steps)))))) -> (((((exists fs_h_functional_right_start. fs_h_functional_right_start + S (0) = S ((S (0)) * d)) /\ exists fs_q_functional_right_start. w = fs_q_functional_right_start * S ((S (0)) * d) + (0))) /\ ((((exists fs_h_functional_right_terminal. fs_h_functional_right_terminal + S (m) = S ((S (l)) * d)) /\ exists fs_q_functional_right_terminal. w = fs_q_functional_right_terminal * S ((S (l)) * d) + (m))) /\ forall fs_i_functional_right_steps. (exists fs_lt_functional_right_steps_bound. fs_lt_functional_right_steps_bound + S fs_i_functional_right_steps = l) -> exists fs_a_functional_right_steps fs_r_functional_right_steps fs_s_functional_right_steps. ((((exists fs_h_functional_right_steps_summand. fs_h_functional_right_steps_summand + S (fs_a_functional_right_steps) = S ((S (fs_i_functional_right_steps)) * c)) /\ exists fs_q_functional_right_steps_summand. b = fs_q_functional_right_steps_summand * S ((S (fs_i_functional_right_steps)) * c) + (fs_a_functional_right_steps))) /\ ((((exists fs_h_functional_right_steps_partial. fs_h_functional_right_steps_partial + S (fs_r_functional_right_steps) = S ((S (fs_i_functional_right_steps)) * d)) /\ exists fs_q_functional_right_steps_partial. w = fs_q_functional_right_steps_partial * S ((S (fs_i_functional_right_steps)) * d) + (fs_r_functional_right_steps))) /\ ((((exists fs_h_functional_right_steps_successor. fs_h_functional_right_steps_successor + S (fs_s_functional_right_steps) = S ((S (S fs_i_functional_right_steps)) * d)) /\ exists fs_q_functional_right_steps_successor. w = fs_q_functional_right_steps_successor * S ((S (S fs_i_functional_right_steps)) * d) + (fs_s_functional_right_steps))) /\ fs_s_functional_right_steps = fs_r_functional_right_steps + fs_a_functional_right_steps)))))) -> n = m
Complete replay recipe: dependency imports + authored proof
pa prove forall b c l n u v m w d. (((((exists fs_h_functional_left_start. fs_h_functional_left_start + S (0) = S ((S (0)) * v)) /\ exists fs_q_functional_left_start. u = fs_q_functional_left_start * S ((S (0)) * v) + (0))) /\ ((((exists fs_h_functional_left_terminal. fs_h_functional_left_terminal + S (n) = S ((S (l)) * v)) /\ exists fs_q_functional_left_terminal. u = fs_q_functional_left_terminal * S ((S (l)) * v) + (n))) /\ forall fs_i_functional_left_steps. (exists fs_lt_functional_left_steps_bound. fs_lt_functional_left_steps_bound + S fs_i_functional_left_steps = l) -> exists fs_a_functional_left_steps fs_r_functional_left_steps fs_s_functional_left_steps. ((((exists fs_h_functional_left_steps_summand. fs_h_functional_left_steps_summand + S (fs_a_functional_left_steps) = S ((S (fs_i_functional_left_steps)) * c)) /\ exists fs_q_functional_left_steps_summand. b = fs_q_functional_left_steps_summand * S ((S (fs_i_functional_left_steps)) * c) + (fs_a_functional_left_steps))) /\ ((((exists fs_h_functional_left_steps_partial. fs_h_functional_left_steps_partial + S (fs_r_functional_left_steps) = S ((S (fs_i_functional_left_steps)) * v)) /\ exists fs_q_functional_left_steps_partial. u = fs_q_functional_left_steps_partial * S ((S (fs_i_functional_left_steps)) * v) + (fs_r_functional_left_steps))) /\ ((((exists fs_h_functional_left_steps_successor. fs_h_functional_left_steps_successor + S (fs_s_functional_left_steps) = S ((S (S fs_i_functional_left_steps)) * v)) /\ exists fs_q_functional_left_steps_successor. u = fs_q_functional_left_steps_successor * S ((S (S fs_i_functional_left_steps)) * v) + (fs_s_functional_left_steps))) /\ fs_s_functional_left_steps = fs_r_functional_left_steps + fs_a_functional_left_steps)))))) -> (((((exists fs_h_functional_right_start. fs_h_functional_right_start + S (0) = S ((S (0)) * d)) /\ exists fs_q_functional_right_start. w = fs_q_functional_right_start * S ((S (0)) * d) + (0))) /\ ((((exists fs_h_functional_right_terminal. fs_h_functional_right_terminal + S (m) = S ((S (l)) * d)) /\ exists fs_q_functional_right_terminal. w = fs_q_functional_right_terminal * S ((S (l)) * d) + (m))) /\ forall fs_i_functional_right_steps. (exists fs_lt_functional_right_steps_bound. fs_lt_functional_right_steps_bound + S fs_i_functional_right_steps = l) -> exists fs_a_functional_right_steps fs_r_functional_right_steps fs_s_functional_right_steps. ((((exists fs_h_functional_right_steps_summand. fs_h_functional_right_steps_summand + S (fs_a_functional_right_steps) = S ((S (fs_i_functional_right_steps)) * c)) /\ exists fs_q_functional_right_steps_summand. b = fs_q_functional_right_steps_summand * S ((S (fs_i_functional_right_steps)) * c) + (fs_a_functional_right_steps))) /\ ((((exists fs_h_functional_right_steps_partial. fs_h_functional_right_steps_partial + S (fs_r_functional_right_steps) = S ((S (fs_i_functional_right_steps)) * d)) /\ exists fs_q_functional_right_steps_partial. w = fs_q_functional_right_steps_partial * S ((S (fs_i_functional_right_steps)) * d) + (fs_r_functional_right_steps))) /\ ((((exists fs_h_functional_right_steps_successor. fs_h_functional_right_steps_successor + S (fs_s_functional_right_steps) = S ((S (S fs_i_functional_right_steps)) * d)) /\ exists fs_q_functional_right_steps_successor. w = fs_q_functional_right_steps_successor * S ((S (S fs_i_functional_right_steps)) * d) + (fs_s_functional_right_steps))) /\ fs_s_functional_right_steps = fs_r_functional_right_steps + fs_a_functional_right_steps)))))) -> n = m
use beta_at_unique
use le_refl
use le_succ
use add_congr
intro b
intro c
induction l
intro n
intro u
intro v
intro m
intro w
intro d
intro h1
intro h2
cases h1
cases h1_right
cases h2
cases h2_right
have hn : n = 0
specialize beta_at_unique u
specialize beta_at_unique v
specialize beta_at_unique 0
specialize beta_at_unique n
specialize beta_at_unique 0
apply beta_at_unique
exact h1_right_left
exact h1_left
have hm : m = 0
specialize beta_at_unique w
specialize beta_at_unique d
specialize beta_at_unique 0
specialize beta_at_unique m
specialize beta_at_unique 0
apply beta_at_unique
exact h2_right_left
exact h2_left
trans 0
exact hn
symm
exact hm
intro n
intro u
intro v
intro m
intro w
intro d
intro h1
intro h2
cases h1
cases h1_right
cases h2
cases h2_right
have hstep1 : exists a r s. ((((exists fs_h_functional_step1_factor. fs_h_functional_step1_factor + S (a) = S ((S (l)) * c)) /\ exists fs_q_functional_step1_factor. b = fs_q_functional_step1_factor * S ((S (l)) * c) + (a))) /\ ((((exists fs_h_functional_step1_partial. fs_h_functional_step1_partial + S (r) = S ((S (l)) * v)) /\ exists fs_q_functional_step1_partial. u = fs_q_functional_step1_partial * S ((S (l)) * v) + (r))) /\ ((((exists fs_h_functional_step1_successor. fs_h_functional_step1_successor + S (s) = S ((S (S l)) * v)) /\ exists fs_q_functional_step1_successor. u = fs_q_functional_step1_successor * S ((S (S l)) * v) + (s))) /\ s = r + a)))
specialize h1_right_right l
apply h1_right_right
specialize le_refl (S l)
exact le_refl
cases hstep1
cases hstep1_witness
cases hstep1_witness_witness
cases hstep1_witness_witness_witness
cases hstep1_witness_witness_witness_right
cases hstep1_witness_witness_witness_right_right
have hstep2 : exists a r s. ((((exists fs_h_functional_step2_factor. fs_h_functional_step2_factor + S (a) = S ((S (l)) * c)) /\ exists fs_q_functional_step2_factor. b = fs_q_functional_step2_factor * S ((S (l)) * c) + (a))) /\ ((((exists fs_h_functional_step2_partial. fs_h_functional_step2_partial + S (r) = S ((S (l)) * d)) /\ exists fs_q_functional_step2_partial. w = fs_q_functional_step2_partial * S ((S (l)) * d) + (r))) /\ ((((exists fs_h_functional_step2_successor. fs_h_functional_step2_successor + S (s) = S ((S (S l)) * d)) /\ exists fs_q_functional_step2_successor. w = fs_q_functional_step2_successor * S ((S (S l)) * d) + (s))) /\ s = r + a)))
specialize h2_right_right l
apply h2_right_right
specialize le_refl (S l)
exact le_refl
cases hstep2
cases hstep2_witness
cases hstep2_witness_witness
cases hstep2_witness_witness_witness
cases hstep2_witness_witness_witness_right
cases hstep2_witness_witness_witness_right_right
have hn : n = x2
specialize beta_at_unique u
specialize beta_at_unique v
specialize beta_at_unique (S l)
specialize beta_at_unique n
specialize beta_at_unique x2
apply beta_at_unique
exact h1_right_left
exact hstep1_witness_witness_witness_right_right_left
have hm : m = x5
specialize beta_at_unique w
specialize beta_at_unique d
specialize beta_at_unique (S l)
specialize beta_at_unique m
specialize beta_at_unique x5
apply beta_at_unique
exact h2_right_left
exact hstep2_witness_witness_witness_right_right_left
have ha : x = x3
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique l
specialize beta_at_unique x
specialize beta_at_unique x3
apply beta_at_unique
exact hstep1_witness_witness_witness_left
exact hstep2_witness_witness_witness_left
have hsum1 : ((((exists fs_h_functional_prefix1_start. fs_h_functional_prefix1_start + S (0) = S ((S (0)) * v)) /\ exists fs_q_functional_prefix1_start. u = fs_q_functional_prefix1_start * S ((S (0)) * v) + (0))) /\ ((((exists fs_h_functional_prefix1_terminal. fs_h_functional_prefix1_terminal + S (x1) = S ((S (l)) * v)) /\ exists fs_q_functional_prefix1_terminal. u = fs_q_functional_prefix1_terminal * S ((S (l)) * v) + (x1))) /\ forall fs_i_functional_prefix1_steps. (exists fs_lt_functional_prefix1_steps_bound. fs_lt_functional_prefix1_steps_bound + S fs_i_functional_prefix1_steps = l) -> exists fs_a_functional_prefix1_steps fs_r_functional_prefix1_steps fs_s_functional_prefix1_steps. ((((exists fs_h_functional_prefix1_steps_summand. fs_h_functional_prefix1_steps_summand + S (fs_a_functional_prefix1_steps) = S ((S (fs_i_functional_prefix1_steps)) * c)) /\ exists fs_q_functional_prefix1_steps_summand. b = fs_q_functional_prefix1_steps_summand * S ((S (fs_i_functional_prefix1_steps)) * c) + (fs_a_functional_prefix1_steps))) /\ ((((exists fs_h_functional_prefix1_steps_partial. fs_h_functional_prefix1_steps_partial + S (fs_r_functional_prefix1_steps) = S ((S (fs_i_functional_prefix1_steps)) * v)) /\ exists fs_q_functional_prefix1_steps_partial. u = fs_q_functional_prefix1_steps_partial * S ((S (fs_i_functional_prefix1_steps)) * v) + (fs_r_functional_prefix1_steps))) /\ ((((exists fs_h_functional_prefix1_steps_successor. fs_h_functional_prefix1_steps_successor + S (fs_s_functional_prefix1_steps) = S ((S (S fs_i_functional_prefix1_steps)) * v)) /\ exists fs_q_functional_prefix1_steps_successor. u = fs_q_functional_prefix1_steps_successor * S ((S (S fs_i_functional_prefix1_steps)) * v) + (fs_s_functional_prefix1_steps))) /\ fs_s_functional_prefix1_steps = fs_r_functional_prefix1_steps + fs_a_functional_prefix1_steps)))))
split
exact h1_left
split
exact hstep1_witness_witness_witness_right_left
intro i
intro hi
specialize h1_right_right i
apply h1_right_right
specialize le_succ (S i)
specialize le_succ l
apply le_succ
exact hi
have hsum2 : ((((exists fs_h_functional_prefix2_start. fs_h_functional_prefix2_start + S (0) = S ((S (0)) * d)) /\ exists fs_q_functional_prefix2_start. w = fs_q_functional_prefix2_start * S ((S (0)) * d) + (0))) /\ ((((exists fs_h_functional_prefix2_terminal. fs_h_functional_prefix2_terminal + S (x4) = S ((S (l)) * d)) /\ exists fs_q_functional_prefix2_terminal. w = fs_q_functional_prefix2_terminal * S ((S (l)) * d) + (x4))) /\ forall fs_i_functional_prefix2_steps. (exists fs_lt_functional_prefix2_steps_bound. fs_lt_functional_prefix2_steps_bound + S fs_i_functional_prefix2_steps = l) -> exists fs_a_functional_prefix2_steps fs_r_functional_prefix2_steps fs_s_functional_prefix2_steps. ((((exists fs_h_functional_prefix2_steps_summand. fs_h_functional_prefix2_steps_summand + S (fs_a_functional_prefix2_steps) = S ((S (fs_i_functional_prefix2_steps)) * c)) /\ exists fs_q_functional_prefix2_steps_summand. b = fs_q_functional_prefix2_steps_summand * S ((S (fs_i_functional_prefix2_steps)) * c) + (fs_a_functional_prefix2_steps))) /\ ((((exists fs_h_functional_prefix2_steps_partial. fs_h_functional_prefix2_steps_partial + S (fs_r_functional_prefix2_steps) = S ((S (fs_i_functional_prefix2_steps)) * d)) /\ exists fs_q_functional_prefix2_steps_partial. w = fs_q_functional_prefix2_steps_partial * S ((S (fs_i_functional_prefix2_steps)) * d) + (fs_r_functional_prefix2_steps))) /\ ((((exists fs_h_functional_prefix2_steps_successor. fs_h_functional_prefix2_steps_successor + S (fs_s_functional_prefix2_steps) = S ((S (S fs_i_functional_prefix2_steps)) * d)) /\ exists fs_q_functional_prefix2_steps_successor. w = fs_q_functional_prefix2_steps_successor * S ((S (S fs_i_functional_prefix2_steps)) * d) + (fs_s_functional_prefix2_steps))) /\ fs_s_functional_prefix2_steps = fs_r_functional_prefix2_steps + fs_a_functional_prefix2_steps)))))
split
exact h2_left
split
exact hstep2_witness_witness_witness_right_left
intro i
intro hi
specialize h2_right_right i
apply h2_right_right
specialize le_succ (S i)
specialize le_succ l
apply le_succ
exact hi
have hprev : x1 = x4
specialize IH x1
specialize IH u
specialize IH v
specialize IH x4
specialize IH w
specialize IH d
apply IH
exact hsum1
exact hsum2
have hadd : x1 + x = x4 + x3
specialize add_congr x1
specialize add_congr x4
specialize add_congr x
specialize add_congr x3
apply add_congr
exact hprev
exact ha
trans x2
exact hn
trans x1 + x
exact hstep1_witness_witness_witness_right_right_right
trans x4 + x3
exact hadd
trans x5
symm
exact hstep2_witness_witness_witness_right_right_right
symm
exact hm
qed
- Occurrences
- 1,382
- Distinct objects
- 909
- Reused references
- 39
- Depth
- 60
- Cuts
- 36
- Certificate SHA-256
239426e5d78c…
beta_sum_functionalBeta sum functional
Quadratic reciprocity campaign
checked
The relational finite sum has a unique natural value.
Exact expanded PA statement
forall b c l n m. (exists ff_u_l ff_v_l. ((((exists ff_h_l_start. ff_h_l_start + S (0) = S ((S (0)) * ff_v_l)) /\ exists ff_q_l_start. ff_u_l = ff_q_l_start * S ((S (0)) * ff_v_l) + (0))) /\ ((((exists ff_h_l_terminal. ff_h_l_terminal + S (n) = S ((S (l)) * ff_v_l)) /\ exists ff_q_l_terminal. ff_u_l = ff_q_l_terminal * S ((S (l)) * ff_v_l) + (n))) /\ forall ff_i_l. (exists ff_lt_l_bound. ff_lt_l_bound + S ff_i_l = l) -> exists ff_a_l ff_r_l ff_s_l. ((((exists ff_h_l_summand. ff_h_l_summand + S (ff_a_l) = S ((S (ff_i_l)) * c)) /\ exists ff_q_l_summand. b = ff_q_l_summand * S ((S (ff_i_l)) * c) + (ff_a_l))) /\ ((((exists ff_h_l_partial. ff_h_l_partial + S (ff_r_l) = S ((S (ff_i_l)) * ff_v_l)) /\ exists ff_q_l_partial. ff_u_l = ff_q_l_partial * S ((S (ff_i_l)) * ff_v_l) + (ff_r_l))) /\ ((((exists ff_h_l_successor. ff_h_l_successor + S (ff_s_l) = S ((S (S ff_i_l)) * ff_v_l)) /\ exists ff_q_l_successor. ff_u_l = ff_q_l_successor * S ((S (S ff_i_l)) * ff_v_l) + (ff_s_l))) /\ ff_s_l = ff_r_l + ff_a_l)))))) -> (exists ff_u_r ff_v_r. ((((exists ff_h_r_start. ff_h_r_start + S (0) = S ((S (0)) * ff_v_r)) /\ exists ff_q_r_start. ff_u_r = ff_q_r_start * S ((S (0)) * ff_v_r) + (0))) /\ ((((exists ff_h_r_terminal. ff_h_r_terminal + S (m) = S ((S (l)) * ff_v_r)) /\ exists ff_q_r_terminal. ff_u_r = ff_q_r_terminal * S ((S (l)) * ff_v_r) + (m))) /\ forall ff_i_r. (exists ff_lt_r_bound. ff_lt_r_bound + S ff_i_r = l) -> exists ff_a_r ff_r_r ff_s_r. ((((exists ff_h_r_summand. ff_h_r_summand + S (ff_a_r) = S ((S (ff_i_r)) * c)) /\ exists ff_q_r_summand. b = ff_q_r_summand * S ((S (ff_i_r)) * c) + (ff_a_r))) /\ ((((exists ff_h_r_partial. ff_h_r_partial + S (ff_r_r) = S ((S (ff_i_r)) * ff_v_r)) /\ exists ff_q_r_partial. ff_u_r = ff_q_r_partial * S ((S (ff_i_r)) * ff_v_r) + (ff_r_r))) /\ ((((exists ff_h_r_successor. ff_h_r_successor + S (ff_s_r) = S ((S (S ff_i_r)) * ff_v_r)) /\ exists ff_q_r_successor. ff_u_r = ff_q_r_successor * S ((S (S ff_i_r)) * ff_v_r) + (ff_s_r))) /\ ff_s_r = ff_r_r + ff_a_r)))))) -> n = m
Complete replay recipe: dependency imports + authored proof
pa prove forall b c l n m. (exists ff_u_l ff_v_l. ((((exists ff_h_l_start. ff_h_l_start + S (0) = S ((S (0)) * ff_v_l)) /\ exists ff_q_l_start. ff_u_l = ff_q_l_start * S ((S (0)) * ff_v_l) + (0))) /\ ((((exists ff_h_l_terminal. ff_h_l_terminal + S (n) = S ((S (l)) * ff_v_l)) /\ exists ff_q_l_terminal. ff_u_l = ff_q_l_terminal * S ((S (l)) * ff_v_l) + (n))) /\ forall ff_i_l. (exists ff_lt_l_bound. ff_lt_l_bound + S ff_i_l = l) -> exists ff_a_l ff_r_l ff_s_l. ((((exists ff_h_l_summand. ff_h_l_summand + S (ff_a_l) = S ((S (ff_i_l)) * c)) /\ exists ff_q_l_summand. b = ff_q_l_summand * S ((S (ff_i_l)) * c) + (ff_a_l))) /\ ((((exists ff_h_l_partial. ff_h_l_partial + S (ff_r_l) = S ((S (ff_i_l)) * ff_v_l)) /\ exists ff_q_l_partial. ff_u_l = ff_q_l_partial * S ((S (ff_i_l)) * ff_v_l) + (ff_r_l))) /\ ((((exists ff_h_l_successor. ff_h_l_successor + S (ff_s_l) = S ((S (S ff_i_l)) * ff_v_l)) /\ exists ff_q_l_successor. ff_u_l = ff_q_l_successor * S ((S (S ff_i_l)) * ff_v_l) + (ff_s_l))) /\ ff_s_l = ff_r_l + ff_a_l)))))) -> (exists ff_u_r ff_v_r. ((((exists ff_h_r_start. ff_h_r_start + S (0) = S ((S (0)) * ff_v_r)) /\ exists ff_q_r_start. ff_u_r = ff_q_r_start * S ((S (0)) * ff_v_r) + (0))) /\ ((((exists ff_h_r_terminal. ff_h_r_terminal + S (m) = S ((S (l)) * ff_v_r)) /\ exists ff_q_r_terminal. ff_u_r = ff_q_r_terminal * S ((S (l)) * ff_v_r) + (m))) /\ forall ff_i_r. (exists ff_lt_r_bound. ff_lt_r_bound + S ff_i_r = l) -> exists ff_a_r ff_r_r ff_s_r. ((((exists ff_h_r_summand. ff_h_r_summand + S (ff_a_r) = S ((S (ff_i_r)) * c)) /\ exists ff_q_r_summand. b = ff_q_r_summand * S ((S (ff_i_r)) * c) + (ff_a_r))) /\ ((((exists ff_h_r_partial. ff_h_r_partial + S (ff_r_r) = S ((S (ff_i_r)) * ff_v_r)) /\ exists ff_q_r_partial. ff_u_r = ff_q_r_partial * S ((S (ff_i_r)) * ff_v_r) + (ff_r_r))) /\ ((((exists ff_h_r_successor. ff_h_r_successor + S (ff_s_r) = S ((S (S ff_i_r)) * ff_v_r)) /\ exists ff_q_r_successor. ff_u_r = ff_q_r_successor * S ((S (S ff_i_r)) * ff_v_r) + (ff_s_r))) /\ ff_s_r = ff_r_r + ff_a_r)))))) -> n = m
use beta_sum_trace_functional
intro b
intro c
intro l
intro n
intro m
intro hn
intro hm
cases hn
cases hn_witness
cases hm
cases hm_witness
specialize beta_sum_trace_functional b
specialize beta_sum_trace_functional c
specialize beta_sum_trace_functional l
specialize beta_sum_trace_functional n
specialize beta_sum_trace_functional x
specialize beta_sum_trace_functional x1
specialize beta_sum_trace_functional m
specialize beta_sum_trace_functional x2
specialize beta_sum_trace_functional x3
apply beta_sum_trace_functional
exact hn_witness_witness
exact hm_witness_witness
qed
- Occurrences
- 1,439
- Distinct objects
- 966
- Reused references
- 39
- Depth
- 61
- Cuts
- 37
- Certificate SHA-256
580611f0e6ce…
beta_sum_exists_uniqueBeta sum exists unique
Quadratic reciprocity campaign
checked
Every decoded beta prefix has exactly one relational finite sum.
Exact expanded PA statement
forall b c l. exists n. ((exists ff_u_unique_value ff_v_unique_value. ((((exists ff_h_unique_value_start. ff_h_unique_value_start + S (0) = S ((S (0)) * ff_v_unique_value)) /\ exists ff_q_unique_value_start. ff_u_unique_value = ff_q_unique_value_start * S ((S (0)) * ff_v_unique_value) + (0))) /\ ((((exists ff_h_unique_value_terminal. ff_h_unique_value_terminal + S (n) = S ((S (l)) * ff_v_unique_value)) /\ exists ff_q_unique_value_terminal. ff_u_unique_value = ff_q_unique_value_terminal * S ((S (l)) * ff_v_unique_value) + (n))) /\ forall ff_i_unique_value. (exists ff_lt_unique_value_bound. ff_lt_unique_value_bound + S ff_i_unique_value = l) -> exists ff_a_unique_value ff_r_unique_value ff_s_unique_value. ((((exists ff_h_unique_value_summand. ff_h_unique_value_summand + S (ff_a_unique_value) = S ((S (ff_i_unique_value)) * c)) /\ exists ff_q_unique_value_summand. b = ff_q_unique_value_summand * S ((S (ff_i_unique_value)) * c) + (ff_a_unique_value))) /\ ((((exists ff_h_unique_value_partial. ff_h_unique_value_partial + S (ff_r_unique_value) = S ((S (ff_i_unique_value)) * ff_v_unique_value)) /\ exists ff_q_unique_value_partial. ff_u_unique_value = ff_q_unique_value_partial * S ((S (ff_i_unique_value)) * ff_v_unique_value) + (ff_r_unique_value))) /\ ((((exists ff_h_unique_value_successor. ff_h_unique_value_successor + S (ff_s_unique_value) = S ((S (S ff_i_unique_value)) * ff_v_unique_value)) /\ exists ff_q_unique_value_successor. ff_u_unique_value = ff_q_unique_value_successor * S ((S (S ff_i_unique_value)) * ff_v_unique_value) + (ff_s_unique_value))) /\ ff_s_unique_value = ff_r_unique_value + ff_a_unique_value)))))) /\ forall m. (exists ff_u_unique_other ff_v_unique_other. ((((exists ff_h_unique_other_start. ff_h_unique_other_start + S (0) = S ((S (0)) * ff_v_unique_other)) /\ exists ff_q_unique_other_start. ff_u_unique_other = ff_q_unique_other_start * S ((S (0)) * ff_v_unique_other) + (0))) /\ ((((exists ff_h_unique_other_terminal. ff_h_unique_other_terminal + S (m) = S ((S (l)) * ff_v_unique_other)) /\ exists ff_q_unique_other_terminal. ff_u_unique_other = ff_q_unique_other_terminal * S ((S (l)) * ff_v_unique_other) + (m))) /\ forall ff_i_unique_other. (exists ff_lt_unique_other_bound. ff_lt_unique_other_bound + S ff_i_unique_other = l) -> exists ff_a_unique_other ff_r_unique_other ff_s_unique_other. ((((exists ff_h_unique_other_summand. ff_h_unique_other_summand + S (ff_a_unique_other) = S ((S (ff_i_unique_other)) * c)) /\ exists ff_q_unique_other_summand. b = ff_q_unique_other_summand * S ((S (ff_i_unique_other)) * c) + (ff_a_unique_other))) /\ ((((exists ff_h_unique_other_partial. ff_h_unique_other_partial + S (ff_r_unique_other) = S ((S (ff_i_unique_other)) * ff_v_unique_other)) /\ exists ff_q_unique_other_partial. ff_u_unique_other = ff_q_unique_other_partial * S ((S (ff_i_unique_other)) * ff_v_unique_other) + (ff_r_unique_other))) /\ ((((exists ff_h_unique_other_successor. ff_h_unique_other_successor + S (ff_s_unique_other) = S ((S (S ff_i_unique_other)) * ff_v_unique_other)) /\ exists ff_q_unique_other_successor. ff_u_unique_other = ff_q_unique_other_successor * S ((S (S ff_i_unique_other)) * ff_v_unique_other) + (ff_s_unique_other))) /\ ff_s_unique_other = ff_r_unique_other + ff_a_unique_other)))))) -> n = m)
Complete replay recipe: dependency imports + authored proof
pa prove forall b c l. exists n. ((exists ff_u_unique_value ff_v_unique_value. ((((exists ff_h_unique_value_start. ff_h_unique_value_start + S (0) = S ((S (0)) * ff_v_unique_value)) /\ exists ff_q_unique_value_start. ff_u_unique_value = ff_q_unique_value_start * S ((S (0)) * ff_v_unique_value) + (0))) /\ ((((exists ff_h_unique_value_terminal. ff_h_unique_value_terminal + S (n) = S ((S (l)) * ff_v_unique_value)) /\ exists ff_q_unique_value_terminal. ff_u_unique_value = ff_q_unique_value_terminal * S ((S (l)) * ff_v_unique_value) + (n))) /\ forall ff_i_unique_value. (exists ff_lt_unique_value_bound. ff_lt_unique_value_bound + S ff_i_unique_value = l) -> exists ff_a_unique_value ff_r_unique_value ff_s_unique_value. ((((exists ff_h_unique_value_summand. ff_h_unique_value_summand + S (ff_a_unique_value) = S ((S (ff_i_unique_value)) * c)) /\ exists ff_q_unique_value_summand. b = ff_q_unique_value_summand * S ((S (ff_i_unique_value)) * c) + (ff_a_unique_value))) /\ ((((exists ff_h_unique_value_partial. ff_h_unique_value_partial + S (ff_r_unique_value) = S ((S (ff_i_unique_value)) * ff_v_unique_value)) /\ exists ff_q_unique_value_partial. ff_u_unique_value = ff_q_unique_value_partial * S ((S (ff_i_unique_value)) * ff_v_unique_value) + (ff_r_unique_value))) /\ ((((exists ff_h_unique_value_successor. ff_h_unique_value_successor + S (ff_s_unique_value) = S ((S (S ff_i_unique_value)) * ff_v_unique_value)) /\ exists ff_q_unique_value_successor. ff_u_unique_value = ff_q_unique_value_successor * S ((S (S ff_i_unique_value)) * ff_v_unique_value) + (ff_s_unique_value))) /\ ff_s_unique_value = ff_r_unique_value + ff_a_unique_value)))))) /\ forall m. (exists ff_u_unique_other ff_v_unique_other. ((((exists ff_h_unique_other_start. ff_h_unique_other_start + S (0) = S ((S (0)) * ff_v_unique_other)) /\ exists ff_q_unique_other_start. ff_u_unique_other = ff_q_unique_other_start * S ((S (0)) * ff_v_unique_other) + (0))) /\ ((((exists ff_h_unique_other_terminal. ff_h_unique_other_terminal + S (m) = S ((S (l)) * ff_v_unique_other)) /\ exists ff_q_unique_other_terminal. ff_u_unique_other = ff_q_unique_other_terminal * S ((S (l)) * ff_v_unique_other) + (m))) /\ forall ff_i_unique_other. (exists ff_lt_unique_other_bound. ff_lt_unique_other_bound + S ff_i_unique_other = l) -> exists ff_a_unique_other ff_r_unique_other ff_s_unique_other. ((((exists ff_h_unique_other_summand. ff_h_unique_other_summand + S (ff_a_unique_other) = S ((S (ff_i_unique_other)) * c)) /\ exists ff_q_unique_other_summand. b = ff_q_unique_other_summand * S ((S (ff_i_unique_other)) * c) + (ff_a_unique_other))) /\ ((((exists ff_h_unique_other_partial. ff_h_unique_other_partial + S (ff_r_unique_other) = S ((S (ff_i_unique_other)) * ff_v_unique_other)) /\ exists ff_q_unique_other_partial. ff_u_unique_other = ff_q_unique_other_partial * S ((S (ff_i_unique_other)) * ff_v_unique_other) + (ff_r_unique_other))) /\ ((((exists ff_h_unique_other_successor. ff_h_unique_other_successor + S (ff_s_unique_other) = S ((S (S ff_i_unique_other)) * ff_v_unique_other)) /\ exists ff_q_unique_other_successor. ff_u_unique_other = ff_q_unique_other_successor * S ((S (S ff_i_unique_other)) * ff_v_unique_other) + (ff_s_unique_other))) /\ ff_s_unique_other = ff_r_unique_other + ff_a_unique_other)))))) -> n = m)
use beta_sum_exists
use beta_sum_functional
intro b
intro c
intro l
specialize beta_sum_exists b
specialize beta_sum_exists c
specialize beta_sum_exists l
cases beta_sum_exists
exists x
split
exact beta_sum_exists_witness
intro m
intro hm
specialize beta_sum_functional b
specialize beta_sum_functional c
specialize beta_sum_functional l
specialize beta_sum_functional x
specialize beta_sum_functional m
apply beta_sum_functional
exact beta_sum_exists_witness
exact hm
qed
- Occurrences
- 31,979
- Distinct objects
- 5,050
- Reused references
- 239
- Depth
- 87
- Cuts
- 955
- Certificate SHA-256
c40396e72cc9…
beta_sum_zeroBeta sum zero
Quadratic reciprocity campaign
checked
The sum of an empty decoded prefix is zero.
Exact expanded PA statement
forall b c n. (exists fs_u_zero fs_v_zero. ((((exists fs_h_zero_body_start. fs_h_zero_body_start + S (0) = S ((S (0)) * fs_v_zero)) /\ exists fs_q_zero_body_start. fs_u_zero = fs_q_zero_body_start * S ((S (0)) * fs_v_zero) + (0))) /\ ((((exists fs_h_zero_body_terminal. fs_h_zero_body_terminal + S (n) = S ((S (0)) * fs_v_zero)) /\ exists fs_q_zero_body_terminal. fs_u_zero = fs_q_zero_body_terminal * S ((S (0)) * fs_v_zero) + (n))) /\ forall fs_i_zero_body_steps. (exists fs_lt_zero_body_steps_bound. fs_lt_zero_body_steps_bound + S fs_i_zero_body_steps = 0) -> exists fs_a_zero_body_steps fs_r_zero_body_steps fs_s_zero_body_steps. ((((exists fs_h_zero_body_steps_summand. fs_h_zero_body_steps_summand + S (fs_a_zero_body_steps) = S ((S (fs_i_zero_body_steps)) * c)) /\ exists fs_q_zero_body_steps_summand. b = fs_q_zero_body_steps_summand * S ((S (fs_i_zero_body_steps)) * c) + (fs_a_zero_body_steps))) /\ ((((exists fs_h_zero_body_steps_partial. fs_h_zero_body_steps_partial + S (fs_r_zero_body_steps) = S ((S (fs_i_zero_body_steps)) * fs_v_zero)) /\ exists fs_q_zero_body_steps_partial. fs_u_zero = fs_q_zero_body_steps_partial * S ((S (fs_i_zero_body_steps)) * fs_v_zero) + (fs_r_zero_body_steps))) /\ ((((exists fs_h_zero_body_steps_successor. fs_h_zero_body_steps_successor + S (fs_s_zero_body_steps) = S ((S (S fs_i_zero_body_steps)) * fs_v_zero)) /\ exists fs_q_zero_body_steps_successor. fs_u_zero = fs_q_zero_body_steps_successor * S ((S (S fs_i_zero_body_steps)) * fs_v_zero) + (fs_s_zero_body_steps))) /\ fs_s_zero_body_steps = fs_r_zero_body_steps + fs_a_zero_body_steps)))))) -> n = 0
Complete replay recipe: dependency imports + authored proof
pa prove forall b c n. (exists fs_u_zero fs_v_zero. ((((exists fs_h_zero_body_start. fs_h_zero_body_start + S (0) = S ((S (0)) * fs_v_zero)) /\ exists fs_q_zero_body_start. fs_u_zero = fs_q_zero_body_start * S ((S (0)) * fs_v_zero) + (0))) /\ ((((exists fs_h_zero_body_terminal. fs_h_zero_body_terminal + S (n) = S ((S (0)) * fs_v_zero)) /\ exists fs_q_zero_body_terminal. fs_u_zero = fs_q_zero_body_terminal * S ((S (0)) * fs_v_zero) + (n))) /\ forall fs_i_zero_body_steps. (exists fs_lt_zero_body_steps_bound. fs_lt_zero_body_steps_bound + S fs_i_zero_body_steps = 0) -> exists fs_a_zero_body_steps fs_r_zero_body_steps fs_s_zero_body_steps. ((((exists fs_h_zero_body_steps_summand. fs_h_zero_body_steps_summand + S (fs_a_zero_body_steps) = S ((S (fs_i_zero_body_steps)) * c)) /\ exists fs_q_zero_body_steps_summand. b = fs_q_zero_body_steps_summand * S ((S (fs_i_zero_body_steps)) * c) + (fs_a_zero_body_steps))) /\ ((((exists fs_h_zero_body_steps_partial. fs_h_zero_body_steps_partial + S (fs_r_zero_body_steps) = S ((S (fs_i_zero_body_steps)) * fs_v_zero)) /\ exists fs_q_zero_body_steps_partial. fs_u_zero = fs_q_zero_body_steps_partial * S ((S (fs_i_zero_body_steps)) * fs_v_zero) + (fs_r_zero_body_steps))) /\ ((((exists fs_h_zero_body_steps_successor. fs_h_zero_body_steps_successor + S (fs_s_zero_body_steps) = S ((S (S fs_i_zero_body_steps)) * fs_v_zero)) /\ exists fs_q_zero_body_steps_successor. fs_u_zero = fs_q_zero_body_steps_successor * S ((S (S fs_i_zero_body_steps)) * fs_v_zero) + (fs_s_zero_body_steps))) /\ fs_s_zero_body_steps = fs_r_zero_body_steps + fs_a_zero_body_steps)))))) -> n = 0
use beta_at_unique
intro b
intro c
intro n
intro hsum
cases hsum
cases hsum_witness
cases hsum_witness_witness
cases hsum_witness_witness_right
specialize beta_at_unique x
specialize beta_at_unique x1
specialize beta_at_unique 0
specialize beta_at_unique n
specialize beta_at_unique 0
apply beta_at_unique
exact hsum_witness_witness_right_left
exact hsum_witness_witness_left
qed
- Occurrences
- 1,171
- Distinct objects
- 742
- Reused references
- 37
- Depth
- 60
- Cuts
- 31
- Certificate SHA-256
f1bbae9a62a0…
beta_sum_succ_decomposeBeta sum succ decompose
Quadratic reciprocity campaign
checked
A successor sum decomposes into its prefix sum and final summand.
Exact expanded PA statement
forall b c l n. (exists fs_u_succ fs_v_succ. ((((exists fs_h_succ_body_start. fs_h_succ_body_start + S (0) = S ((S (0)) * fs_v_succ)) /\ exists fs_q_succ_body_start. fs_u_succ = fs_q_succ_body_start * S ((S (0)) * fs_v_succ) + (0))) /\ ((((exists fs_h_succ_body_terminal. fs_h_succ_body_terminal + S (n) = S ((S (S l)) * fs_v_succ)) /\ exists fs_q_succ_body_terminal. fs_u_succ = fs_q_succ_body_terminal * S ((S (S l)) * fs_v_succ) + (n))) /\ forall fs_i_succ_body_steps. (exists fs_lt_succ_body_steps_bound. fs_lt_succ_body_steps_bound + S fs_i_succ_body_steps = S l) -> exists fs_a_succ_body_steps fs_r_succ_body_steps fs_s_succ_body_steps. ((((exists fs_h_succ_body_steps_summand. fs_h_succ_body_steps_summand + S (fs_a_succ_body_steps) = S ((S (fs_i_succ_body_steps)) * c)) /\ exists fs_q_succ_body_steps_summand. b = fs_q_succ_body_steps_summand * S ((S (fs_i_succ_body_steps)) * c) + (fs_a_succ_body_steps))) /\ ((((exists fs_h_succ_body_steps_partial. fs_h_succ_body_steps_partial + S (fs_r_succ_body_steps) = S ((S (fs_i_succ_body_steps)) * fs_v_succ)) /\ exists fs_q_succ_body_steps_partial. fs_u_succ = fs_q_succ_body_steps_partial * S ((S (fs_i_succ_body_steps)) * fs_v_succ) + (fs_r_succ_body_steps))) /\ ((((exists fs_h_succ_body_steps_successor. fs_h_succ_body_steps_successor + S (fs_s_succ_body_steps) = S ((S (S fs_i_succ_body_steps)) * fs_v_succ)) /\ exists fs_q_succ_body_steps_successor. fs_u_succ = fs_q_succ_body_steps_successor * S ((S (S fs_i_succ_body_steps)) * fs_v_succ) + (fs_s_succ_body_steps))) /\ fs_s_succ_body_steps = fs_r_succ_body_steps + fs_a_succ_body_steps)))))) -> exists a r. (((exists fs_h_succ_factor. fs_h_succ_factor + S (a) = S ((S (l)) * c)) /\ exists fs_q_succ_factor. b = fs_q_succ_factor * S ((S (l)) * c) + (a))) /\ ((exists ff_u_prefix ff_v_prefix. ((((exists ff_h_prefix_start. ff_h_prefix_start + S (0) = S ((S (0)) * ff_v_prefix)) /\ exists ff_q_prefix_start. ff_u_prefix = ff_q_prefix_start * S ((S (0)) * ff_v_prefix) + (0))) /\ ((((exists ff_h_prefix_terminal. ff_h_prefix_terminal + S (r) = S ((S (l)) * ff_v_prefix)) /\ exists ff_q_prefix_terminal. ff_u_prefix = ff_q_prefix_terminal * S ((S (l)) * ff_v_prefix) + (r))) /\ forall ff_i_prefix. (exists ff_lt_prefix_bound. ff_lt_prefix_bound + S ff_i_prefix = l) -> exists ff_a_prefix ff_r_prefix ff_s_prefix. ((((exists ff_h_prefix_summand. ff_h_prefix_summand + S (ff_a_prefix) = S ((S (ff_i_prefix)) * c)) /\ exists ff_q_prefix_summand. b = ff_q_prefix_summand * S ((S (ff_i_prefix)) * c) + (ff_a_prefix))) /\ ((((exists ff_h_prefix_partial. ff_h_prefix_partial + S (ff_r_prefix) = S ((S (ff_i_prefix)) * ff_v_prefix)) /\ exists ff_q_prefix_partial. ff_u_prefix = ff_q_prefix_partial * S ((S (ff_i_prefix)) * ff_v_prefix) + (ff_r_prefix))) /\ ((((exists ff_h_prefix_successor. ff_h_prefix_successor + S (ff_s_prefix) = S ((S (S ff_i_prefix)) * ff_v_prefix)) /\ exists ff_q_prefix_successor. ff_u_prefix = ff_q_prefix_successor * S ((S (S ff_i_prefix)) * ff_v_prefix) + (ff_s_prefix))) /\ ff_s_prefix = ff_r_prefix + ff_a_prefix)))))) /\ n = r + a)
Complete replay recipe: dependency imports + authored proof
pa prove forall b c l n. (exists fs_u_succ fs_v_succ. ((((exists fs_h_succ_body_start. fs_h_succ_body_start + S (0) = S ((S (0)) * fs_v_succ)) /\ exists fs_q_succ_body_start. fs_u_succ = fs_q_succ_body_start * S ((S (0)) * fs_v_succ) + (0))) /\ ((((exists fs_h_succ_body_terminal. fs_h_succ_body_terminal + S (n) = S ((S (S l)) * fs_v_succ)) /\ exists fs_q_succ_body_terminal. fs_u_succ = fs_q_succ_body_terminal * S ((S (S l)) * fs_v_succ) + (n))) /\ forall fs_i_succ_body_steps. (exists fs_lt_succ_body_steps_bound. fs_lt_succ_body_steps_bound + S fs_i_succ_body_steps = S l) -> exists fs_a_succ_body_steps fs_r_succ_body_steps fs_s_succ_body_steps. ((((exists fs_h_succ_body_steps_summand. fs_h_succ_body_steps_summand + S (fs_a_succ_body_steps) = S ((S (fs_i_succ_body_steps)) * c)) /\ exists fs_q_succ_body_steps_summand. b = fs_q_succ_body_steps_summand * S ((S (fs_i_succ_body_steps)) * c) + (fs_a_succ_body_steps))) /\ ((((exists fs_h_succ_body_steps_partial. fs_h_succ_body_steps_partial + S (fs_r_succ_body_steps) = S ((S (fs_i_succ_body_steps)) * fs_v_succ)) /\ exists fs_q_succ_body_steps_partial. fs_u_succ = fs_q_succ_body_steps_partial * S ((S (fs_i_succ_body_steps)) * fs_v_succ) + (fs_r_succ_body_steps))) /\ ((((exists fs_h_succ_body_steps_successor. fs_h_succ_body_steps_successor + S (fs_s_succ_body_steps) = S ((S (S fs_i_succ_body_steps)) * fs_v_succ)) /\ exists fs_q_succ_body_steps_successor. fs_u_succ = fs_q_succ_body_steps_successor * S ((S (S fs_i_succ_body_steps)) * fs_v_succ) + (fs_s_succ_body_steps))) /\ fs_s_succ_body_steps = fs_r_succ_body_steps + fs_a_succ_body_steps)))))) -> exists a r. (((exists fs_h_succ_factor. fs_h_succ_factor + S (a) = S ((S (l)) * c)) /\ exists fs_q_succ_factor. b = fs_q_succ_factor * S ((S (l)) * c) + (a))) /\ ((exists ff_u_prefix ff_v_prefix. ((((exists ff_h_prefix_start. ff_h_prefix_start + S (0) = S ((S (0)) * ff_v_prefix)) /\ exists ff_q_prefix_start. ff_u_prefix = ff_q_prefix_start * S ((S (0)) * ff_v_prefix) + (0))) /\ ((((exists ff_h_prefix_terminal. ff_h_prefix_terminal + S (r) = S ((S (l)) * ff_v_prefix)) /\ exists ff_q_prefix_terminal. ff_u_prefix = ff_q_prefix_terminal * S ((S (l)) * ff_v_prefix) + (r))) /\ forall ff_i_prefix. (exists ff_lt_prefix_bound. ff_lt_prefix_bound + S ff_i_prefix = l) -> exists ff_a_prefix ff_r_prefix ff_s_prefix. ((((exists ff_h_prefix_summand. ff_h_prefix_summand + S (ff_a_prefix) = S ((S (ff_i_prefix)) * c)) /\ exists ff_q_prefix_summand. b = ff_q_prefix_summand * S ((S (ff_i_prefix)) * c) + (ff_a_prefix))) /\ ((((exists ff_h_prefix_partial. ff_h_prefix_partial + S (ff_r_prefix) = S ((S (ff_i_prefix)) * ff_v_prefix)) /\ exists ff_q_prefix_partial. ff_u_prefix = ff_q_prefix_partial * S ((S (ff_i_prefix)) * ff_v_prefix) + (ff_r_prefix))) /\ ((((exists ff_h_prefix_successor. ff_h_prefix_successor + S (ff_s_prefix) = S ((S (S ff_i_prefix)) * ff_v_prefix)) /\ exists ff_q_prefix_successor. ff_u_prefix = ff_q_prefix_successor * S ((S (S ff_i_prefix)) * ff_v_prefix) + (ff_s_prefix))) /\ ff_s_prefix = ff_r_prefix + ff_a_prefix)))))) /\ n = r + a)
use le_refl
use le_succ
use beta_at_unique
intro b
intro c
intro l
intro n
intro hsum
cases hsum
cases hsum_witness
cases hsum_witness_witness
cases hsum_witness_witness_right
have hstep : exists a r s. ((((exists fs_h_decomp_factor. fs_h_decomp_factor + S (a) = S ((S (l)) * c)) /\ exists fs_q_decomp_factor. b = fs_q_decomp_factor * S ((S (l)) * c) + (a))) /\ ((((exists fs_h_decomp_partial. fs_h_decomp_partial + S (r) = S ((S (l)) * x1)) /\ exists fs_q_decomp_partial. x = fs_q_decomp_partial * S ((S (l)) * x1) + (r))) /\ ((((exists fs_h_decomp_successor. fs_h_decomp_successor + S (s) = S ((S (S l)) * x1)) /\ exists fs_q_decomp_successor. x = fs_q_decomp_successor * S ((S (S l)) * x1) + (s))) /\ s = r + a)))
specialize hsum_witness_witness_right_right l
apply hsum_witness_witness_right_right
specialize le_refl (S l)
exact le_refl
cases hstep
cases hstep_witness
cases hstep_witness_witness
cases hstep_witness_witness_witness
cases hstep_witness_witness_witness_right
cases hstep_witness_witness_witness_right_right
have hn : n = x4
specialize beta_at_unique x
specialize beta_at_unique x1
specialize beta_at_unique (S l)
specialize beta_at_unique n
specialize beta_at_unique x4
apply beta_at_unique
exact hsum_witness_witness_right_left
exact hstep_witness_witness_witness_right_right_left
exists x2
exists x3
split
exact hstep_witness_witness_witness_left
split
exists x
exists x1
split
exact hsum_witness_witness_left
split
exact hstep_witness_witness_witness_right_left
intro i
intro hi
specialize hsum_witness_witness_right_right i
apply hsum_witness_witness_right_right
specialize le_succ (S i)
specialize le_succ l
apply le_succ
exact hi
trans x4
exact hn
exact hstep_witness_witness_witness_right_right_right
qed
- Occurrences
- 1,257
- Distinct objects
- 784
- Reused references
- 39
- Depth
- 62
- Cuts
- 35
- Certificate SHA-256
810c7005959f…
beta_product_pointwise_mod_congruentBeta product pointwise mod congruent
Quadratic reciprocity campaign
checked
Pointwise congruent decoded prefixes have congruent finite products.
Exact expanded PA statement
forall m b c d e l n q. (forall i a z. (exists fc_h_pp. fc_h_pp + S i = l) -> (((exists ff_h_pp_la. ff_h_pp_la + S (a) = S ((S (i)) * c)) /\ exists ff_q_pp_la. b = ff_q_pp_la * S ((S (i)) * c) + (a))) -> (((exists ff_h_pp_ra. ff_h_pp_ra + S (z) = S ((S (i)) * e)) /\ exists ff_q_pp_ra. d = ff_q_pp_ra * S ((S (i)) * e) + (z))) -> exists fc_u_pp_me fc_v_pp_me. a + m * fc_u_pp_me = z + m * fc_v_pp_me) -> (exists ff_u_pl ff_v_pl. ((((exists ff_h_pl_start. ff_h_pl_start + S (1) = S ((S (0)) * ff_v_pl)) /\ exists ff_q_pl_start. ff_u_pl = ff_q_pl_start * S ((S (0)) * ff_v_pl) + (1))) /\ ((((exists ff_h_pl_terminal. ff_h_pl_terminal + S (n) = S ((S (l)) * ff_v_pl)) /\ exists ff_q_pl_terminal. ff_u_pl = ff_q_pl_terminal * S ((S (l)) * ff_v_pl) + (n))) /\ forall ff_i_pl. (exists ff_lt_pl_bound. ff_lt_pl_bound + S ff_i_pl = l) -> exists ff_p_pl ff_r_pl ff_s_pl. ((((exists ff_h_pl_factor. ff_h_pl_factor + S (ff_p_pl) = S ((S (ff_i_pl)) * c)) /\ exists ff_q_pl_factor. b = ff_q_pl_factor * S ((S (ff_i_pl)) * c) + (ff_p_pl))) /\ ((((exists ff_h_pl_partial. ff_h_pl_partial + S (ff_r_pl) = S ((S (ff_i_pl)) * ff_v_pl)) /\ exists ff_q_pl_partial. ff_u_pl = ff_q_pl_partial * S ((S (ff_i_pl)) * ff_v_pl) + (ff_r_pl))) /\ ((((exists ff_h_pl_successor. ff_h_pl_successor + S (ff_s_pl) = S ((S (S ff_i_pl)) * ff_v_pl)) /\ exists ff_q_pl_successor. ff_u_pl = ff_q_pl_successor * S ((S (S ff_i_pl)) * ff_v_pl) + (ff_s_pl))) /\ ff_s_pl = ff_r_pl * ff_p_pl)))))) -> (exists ff_u_pr ff_v_pr. ((((exists ff_h_pr_start. ff_h_pr_start + S (1) = S ((S (0)) * ff_v_pr)) /\ exists ff_q_pr_start. ff_u_pr = ff_q_pr_start * S ((S (0)) * ff_v_pr) + (1))) /\ ((((exists ff_h_pr_terminal. ff_h_pr_terminal + S (q) = S ((S (l)) * ff_v_pr)) /\ exists ff_q_pr_terminal. ff_u_pr = ff_q_pr_terminal * S ((S (l)) * ff_v_pr) + (q))) /\ forall ff_i_pr. (exists ff_lt_pr_bound. ff_lt_pr_bound + S ff_i_pr = l) -> exists ff_p_pr ff_r_pr ff_s_pr. ((((exists ff_h_pr_factor. ff_h_pr_factor + S (ff_p_pr) = S ((S (ff_i_pr)) * e)) /\ exists ff_q_pr_factor. d = ff_q_pr_factor * S ((S (ff_i_pr)) * e) + (ff_p_pr))) /\ ((((exists ff_h_pr_partial. ff_h_pr_partial + S (ff_r_pr) = S ((S (ff_i_pr)) * ff_v_pr)) /\ exists ff_q_pr_partial. ff_u_pr = ff_q_pr_partial * S ((S (ff_i_pr)) * ff_v_pr) + (ff_r_pr))) /\ ((((exists ff_h_pr_successor. ff_h_pr_successor + S (ff_s_pr) = S ((S (S ff_i_pr)) * ff_v_pr)) /\ exists ff_q_pr_successor. ff_u_pr = ff_q_pr_successor * S ((S (S ff_i_pr)) * ff_v_pr) + (ff_s_pr))) /\ ff_s_pr = ff_r_pr * ff_p_pr)))))) -> exists fc_u_pv fc_v_pv. n + m * fc_u_pv = q + m * fc_v_pv
Complete replay recipe: dependency imports + authored proof
pa prove forall m b c d e l n q. (forall i a z. (exists fc_h_pp. fc_h_pp + S i = l) -> (((exists ff_h_pp_la. ff_h_pp_la + S (a) = S ((S (i)) * c)) /\ exists ff_q_pp_la. b = ff_q_pp_la * S ((S (i)) * c) + (a))) -> (((exists ff_h_pp_ra. ff_h_pp_ra + S (z) = S ((S (i)) * e)) /\ exists ff_q_pp_ra. d = ff_q_pp_ra * S ((S (i)) * e) + (z))) -> exists fc_u_pp_me fc_v_pp_me. a + m * fc_u_pp_me = z + m * fc_v_pp_me) -> (exists ff_u_pl ff_v_pl. ((((exists ff_h_pl_start. ff_h_pl_start + S (1) = S ((S (0)) * ff_v_pl)) /\ exists ff_q_pl_start. ff_u_pl = ff_q_pl_start * S ((S (0)) * ff_v_pl) + (1))) /\ ((((exists ff_h_pl_terminal. ff_h_pl_terminal + S (n) = S ((S (l)) * ff_v_pl)) /\ exists ff_q_pl_terminal. ff_u_pl = ff_q_pl_terminal * S ((S (l)) * ff_v_pl) + (n))) /\ forall ff_i_pl. (exists ff_lt_pl_bound. ff_lt_pl_bound + S ff_i_pl = l) -> exists ff_p_pl ff_r_pl ff_s_pl. ((((exists ff_h_pl_factor. ff_h_pl_factor + S (ff_p_pl) = S ((S (ff_i_pl)) * c)) /\ exists ff_q_pl_factor. b = ff_q_pl_factor * S ((S (ff_i_pl)) * c) + (ff_p_pl))) /\ ((((exists ff_h_pl_partial. ff_h_pl_partial + S (ff_r_pl) = S ((S (ff_i_pl)) * ff_v_pl)) /\ exists ff_q_pl_partial. ff_u_pl = ff_q_pl_partial * S ((S (ff_i_pl)) * ff_v_pl) + (ff_r_pl))) /\ ((((exists ff_h_pl_successor. ff_h_pl_successor + S (ff_s_pl) = S ((S (S ff_i_pl)) * ff_v_pl)) /\ exists ff_q_pl_successor. ff_u_pl = ff_q_pl_successor * S ((S (S ff_i_pl)) * ff_v_pl) + (ff_s_pl))) /\ ff_s_pl = ff_r_pl * ff_p_pl)))))) -> (exists ff_u_pr ff_v_pr. ((((exists ff_h_pr_start. ff_h_pr_start + S (1) = S ((S (0)) * ff_v_pr)) /\ exists ff_q_pr_start. ff_u_pr = ff_q_pr_start * S ((S (0)) * ff_v_pr) + (1))) /\ ((((exists ff_h_pr_terminal. ff_h_pr_terminal + S (q) = S ((S (l)) * ff_v_pr)) /\ exists ff_q_pr_terminal. ff_u_pr = ff_q_pr_terminal * S ((S (l)) * ff_v_pr) + (q))) /\ forall ff_i_pr. (exists ff_lt_pr_bound. ff_lt_pr_bound + S ff_i_pr = l) -> exists ff_p_pr ff_r_pr ff_s_pr. ((((exists ff_h_pr_factor. ff_h_pr_factor + S (ff_p_pr) = S ((S (ff_i_pr)) * e)) /\ exists ff_q_pr_factor. d = ff_q_pr_factor * S ((S (ff_i_pr)) * e) + (ff_p_pr))) /\ ((((exists ff_h_pr_partial. ff_h_pr_partial + S (ff_r_pr) = S ((S (ff_i_pr)) * ff_v_pr)) /\ exists ff_q_pr_partial. ff_u_pr = ff_q_pr_partial * S ((S (ff_i_pr)) * ff_v_pr) + (ff_r_pr))) /\ ((((exists ff_h_pr_successor. ff_h_pr_successor + S (ff_s_pr) = S ((S (S ff_i_pr)) * ff_v_pr)) /\ exists ff_q_pr_successor. ff_u_pr = ff_q_pr_successor * S ((S (S ff_i_pr)) * ff_v_pr) + (ff_s_pr))) /\ ff_s_pr = ff_r_pr * ff_p_pr)))))) -> exists fc_u_pv fc_v_pv. n + m * fc_u_pv = q + m * fc_v_pv
use beta_product_zero
use beta_product_succ_decompose
use le_succ
use le_refl
use mod_eq_refl
use mod_eq_mul
intro m
intro b
intro c
intro d
intro e
induction l
intro n
intro q
intro hpw
intro hn
intro hq
have hn1 : n = 1
specialize beta_product_zero b
specialize beta_product_zero c
specialize beta_product_zero n
apply beta_product_zero
exact hn
have hq1 : q = 1
specialize beta_product_zero d
specialize beta_product_zero e
specialize beta_product_zero q
apply beta_product_zero
exact hq
rewrite hn1
rewrite hq1
specialize mod_eq_refl m
specialize mod_eq_refl 1
exact mod_eq_refl
intro n
intro q
intro hpw
intro hn
intro hq
have hnd : exists a r. (((exists ff_h_pd_l_a. ff_h_pd_l_a + S (a) = S ((S (l)) * c)) /\ exists ff_q_pd_l_a. b = ff_q_pd_l_a * S ((S (l)) * c) + (a))) /\ ((exists ff_u_pd_l_p ff_v_pd_l_p. ((((exists ff_h_pd_l_p_start. ff_h_pd_l_p_start + S (1) = S ((S (0)) * ff_v_pd_l_p)) /\ exists ff_q_pd_l_p_start. ff_u_pd_l_p = ff_q_pd_l_p_start * S ((S (0)) * ff_v_pd_l_p) + (1))) /\ ((((exists ff_h_pd_l_p_terminal. ff_h_pd_l_p_terminal + S (r) = S ((S (l)) * ff_v_pd_l_p)) /\ exists ff_q_pd_l_p_terminal. ff_u_pd_l_p = ff_q_pd_l_p_terminal * S ((S (l)) * ff_v_pd_l_p) + (r))) /\ forall ff_i_pd_l_p. (exists ff_lt_pd_l_p_bound. ff_lt_pd_l_p_bound + S ff_i_pd_l_p = l) -> exists ff_p_pd_l_p ff_r_pd_l_p ff_s_pd_l_p. ((((exists ff_h_pd_l_p_factor. ff_h_pd_l_p_factor + S (ff_p_pd_l_p) = S ((S (ff_i_pd_l_p)) * c)) /\ exists ff_q_pd_l_p_factor. b = ff_q_pd_l_p_factor * S ((S (ff_i_pd_l_p)) * c) + (ff_p_pd_l_p))) /\ ((((exists ff_h_pd_l_p_partial. ff_h_pd_l_p_partial + S (ff_r_pd_l_p) = S ((S (ff_i_pd_l_p)) * ff_v_pd_l_p)) /\ exists ff_q_pd_l_p_partial. ff_u_pd_l_p = ff_q_pd_l_p_partial * S ((S (ff_i_pd_l_p)) * ff_v_pd_l_p) + (ff_r_pd_l_p))) /\ ((((exists ff_h_pd_l_p_successor. ff_h_pd_l_p_successor + S (ff_s_pd_l_p) = S ((S (S ff_i_pd_l_p)) * ff_v_pd_l_p)) /\ exists ff_q_pd_l_p_successor. ff_u_pd_l_p = ff_q_pd_l_p_successor * S ((S (S ff_i_pd_l_p)) * ff_v_pd_l_p) + (ff_s_pd_l_p))) /\ ff_s_pd_l_p = ff_r_pd_l_p * ff_p_pd_l_p)))))) /\ n = r * a)
specialize beta_product_succ_decompose b
specialize beta_product_succ_decompose c
specialize beta_product_succ_decompose l
specialize beta_product_succ_decompose n
apply beta_product_succ_decompose
exact hn
cases hnd
cases hnd_witness
cases hnd_witness_witness
cases hnd_witness_witness_right
have hqd : exists a r. (((exists ff_h_pd_r_a. ff_h_pd_r_a + S (a) = S ((S (l)) * e)) /\ exists ff_q_pd_r_a. d = ff_q_pd_r_a * S ((S (l)) * e) + (a))) /\ ((exists ff_u_pd_r_p ff_v_pd_r_p. ((((exists ff_h_pd_r_p_start. ff_h_pd_r_p_start + S (1) = S ((S (0)) * ff_v_pd_r_p)) /\ exists ff_q_pd_r_p_start. ff_u_pd_r_p = ff_q_pd_r_p_start * S ((S (0)) * ff_v_pd_r_p) + (1))) /\ ((((exists ff_h_pd_r_p_terminal. ff_h_pd_r_p_terminal + S (r) = S ((S (l)) * ff_v_pd_r_p)) /\ exists ff_q_pd_r_p_terminal. ff_u_pd_r_p = ff_q_pd_r_p_terminal * S ((S (l)) * ff_v_pd_r_p) + (r))) /\ forall ff_i_pd_r_p. (exists ff_lt_pd_r_p_bound. ff_lt_pd_r_p_bound + S ff_i_pd_r_p = l) -> exists ff_p_pd_r_p ff_r_pd_r_p ff_s_pd_r_p. ((((exists ff_h_pd_r_p_factor. ff_h_pd_r_p_factor + S (ff_p_pd_r_p) = S ((S (ff_i_pd_r_p)) * e)) /\ exists ff_q_pd_r_p_factor. d = ff_q_pd_r_p_factor * S ((S (ff_i_pd_r_p)) * e) + (ff_p_pd_r_p))) /\ ((((exists ff_h_pd_r_p_partial. ff_h_pd_r_p_partial + S (ff_r_pd_r_p) = S ((S (ff_i_pd_r_p)) * ff_v_pd_r_p)) /\ exists ff_q_pd_r_p_partial. ff_u_pd_r_p = ff_q_pd_r_p_partial * S ((S (ff_i_pd_r_p)) * ff_v_pd_r_p) + (ff_r_pd_r_p))) /\ ((((exists ff_h_pd_r_p_successor. ff_h_pd_r_p_successor + S (ff_s_pd_r_p) = S ((S (S ff_i_pd_r_p)) * ff_v_pd_r_p)) /\ exists ff_q_pd_r_p_successor. ff_u_pd_r_p = ff_q_pd_r_p_successor * S ((S (S ff_i_pd_r_p)) * ff_v_pd_r_p) + (ff_s_pd_r_p))) /\ ff_s_pd_r_p = ff_r_pd_r_p * ff_p_pd_r_p)))))) /\ q = r * a)
specialize beta_product_succ_decompose d
specialize beta_product_succ_decompose e
specialize beta_product_succ_decompose l
specialize beta_product_succ_decompose q
apply beta_product_succ_decompose
exact hq
cases hqd
cases hqd_witness
cases hqd_witness_witness
cases hqd_witness_witness_right
have hpw_prefix : forall i a z. (exists fc_h_pp_pre. fc_h_pp_pre + S i = l) -> (((exists ff_h_pp_pre_la. ff_h_pp_pre_la + S (a) = S ((S (i)) * c)) /\ exists ff_q_pp_pre_la. b = ff_q_pp_pre_la * S ((S (i)) * c) + (a))) -> (((exists ff_h_pp_pre_ra. ff_h_pp_pre_ra + S (z) = S ((S (i)) * e)) /\ exists ff_q_pp_pre_ra. d = ff_q_pp_pre_ra * S ((S (i)) * e) + (z))) -> exists fc_u_pp_pre_me fc_v_pp_pre_me. a + m * fc_u_pp_pre_me = z + m * fc_v_pp_pre_me
intro i
intro a
intro z
intro hi
intro ha
intro hz
specialize hpw i
specialize hpw a
specialize hpw z
apply hpw
specialize le_succ (S i)
specialize le_succ l
apply le_succ
exact hi
exact ha
exact hz
have hprefix : exists u v. x1 + m * u = x3 + m * v
specialize IH x1
specialize IH x3
apply IH
exact hpw_prefix
exact hnd_witness_witness_right_left
exact hqd_witness_witness_right_left
have hentry : exists u v. x + m * u = x2 + m * v
specialize hpw l
specialize hpw x
specialize hpw x2
apply hpw
specialize le_refl (S l)
exact le_refl
exact hnd_witness_witness_left
exact hqd_witness_witness_left
have hfold : exists u v. (x1 * x) + m * u = (x3 * x2) + m * v
specialize mod_eq_mul m
specialize mod_eq_mul x1
specialize mod_eq_mul x3
specialize mod_eq_mul x
specialize mod_eq_mul x2
apply mod_eq_mul
exact hprefix
exact hentry
rewrite hnd_witness_witness_right_right
rewrite hqd_witness_witness_right_right
exact hfold
qed
- Occurrences
- 4,129
- Distinct objects
- 1,198
- Reused references
- 57
- Depth
- 64
- Cuts
- 117
- Certificate SHA-256
eade7d849228…
beta_sum_pointwise_mod_congruentBeta sum pointwise mod congruent
Quadratic reciprocity campaign
checked
Pointwise congruent decoded prefixes have congruent finite sums.
Exact expanded PA statement
forall m b c d e l n q. (forall i a z. (exists fc_h_sp. fc_h_sp + S i = l) -> (((exists ff_h_sp_la. ff_h_sp_la + S (a) = S ((S (i)) * c)) /\ exists ff_q_sp_la. b = ff_q_sp_la * S ((S (i)) * c) + (a))) -> (((exists ff_h_sp_ra. ff_h_sp_ra + S (z) = S ((S (i)) * e)) /\ exists ff_q_sp_ra. d = ff_q_sp_ra * S ((S (i)) * e) + (z))) -> exists fc_u_sp_me fc_v_sp_me. a + m * fc_u_sp_me = z + m * fc_v_sp_me) -> (exists ff_u_sl ff_v_sl. ((((exists ff_h_sl_start. ff_h_sl_start + S (0) = S ((S (0)) * ff_v_sl)) /\ exists ff_q_sl_start. ff_u_sl = ff_q_sl_start * S ((S (0)) * ff_v_sl) + (0))) /\ ((((exists ff_h_sl_terminal. ff_h_sl_terminal + S (n) = S ((S (l)) * ff_v_sl)) /\ exists ff_q_sl_terminal. ff_u_sl = ff_q_sl_terminal * S ((S (l)) * ff_v_sl) + (n))) /\ forall ff_i_sl. (exists ff_lt_sl_bound. ff_lt_sl_bound + S ff_i_sl = l) -> exists ff_a_sl ff_r_sl ff_s_sl. ((((exists ff_h_sl_summand. ff_h_sl_summand + S (ff_a_sl) = S ((S (ff_i_sl)) * c)) /\ exists ff_q_sl_summand. b = ff_q_sl_summand * S ((S (ff_i_sl)) * c) + (ff_a_sl))) /\ ((((exists ff_h_sl_partial. ff_h_sl_partial + S (ff_r_sl) = S ((S (ff_i_sl)) * ff_v_sl)) /\ exists ff_q_sl_partial. ff_u_sl = ff_q_sl_partial * S ((S (ff_i_sl)) * ff_v_sl) + (ff_r_sl))) /\ ((((exists ff_h_sl_successor. ff_h_sl_successor + S (ff_s_sl) = S ((S (S ff_i_sl)) * ff_v_sl)) /\ exists ff_q_sl_successor. ff_u_sl = ff_q_sl_successor * S ((S (S ff_i_sl)) * ff_v_sl) + (ff_s_sl))) /\ ff_s_sl = ff_r_sl + ff_a_sl)))))) -> (exists ff_u_sr ff_v_sr. ((((exists ff_h_sr_start. ff_h_sr_start + S (0) = S ((S (0)) * ff_v_sr)) /\ exists ff_q_sr_start. ff_u_sr = ff_q_sr_start * S ((S (0)) * ff_v_sr) + (0))) /\ ((((exists ff_h_sr_terminal. ff_h_sr_terminal + S (q) = S ((S (l)) * ff_v_sr)) /\ exists ff_q_sr_terminal. ff_u_sr = ff_q_sr_terminal * S ((S (l)) * ff_v_sr) + (q))) /\ forall ff_i_sr. (exists ff_lt_sr_bound. ff_lt_sr_bound + S ff_i_sr = l) -> exists ff_a_sr ff_r_sr ff_s_sr. ((((exists ff_h_sr_summand. ff_h_sr_summand + S (ff_a_sr) = S ((S (ff_i_sr)) * e)) /\ exists ff_q_sr_summand. d = ff_q_sr_summand * S ((S (ff_i_sr)) * e) + (ff_a_sr))) /\ ((((exists ff_h_sr_partial. ff_h_sr_partial + S (ff_r_sr) = S ((S (ff_i_sr)) * ff_v_sr)) /\ exists ff_q_sr_partial. ff_u_sr = ff_q_sr_partial * S ((S (ff_i_sr)) * ff_v_sr) + (ff_r_sr))) /\ ((((exists ff_h_sr_successor. ff_h_sr_successor + S (ff_s_sr) = S ((S (S ff_i_sr)) * ff_v_sr)) /\ exists ff_q_sr_successor. ff_u_sr = ff_q_sr_successor * S ((S (S ff_i_sr)) * ff_v_sr) + (ff_s_sr))) /\ ff_s_sr = ff_r_sr + ff_a_sr)))))) -> exists fc_u_sv fc_v_sv. n + m * fc_u_sv = q + m * fc_v_sv
Complete replay recipe: dependency imports + authored proof
pa prove forall m b c d e l n q. (forall i a z. (exists fc_h_sp. fc_h_sp + S i = l) -> (((exists ff_h_sp_la. ff_h_sp_la + S (a) = S ((S (i)) * c)) /\ exists ff_q_sp_la. b = ff_q_sp_la * S ((S (i)) * c) + (a))) -> (((exists ff_h_sp_ra. ff_h_sp_ra + S (z) = S ((S (i)) * e)) /\ exists ff_q_sp_ra. d = ff_q_sp_ra * S ((S (i)) * e) + (z))) -> exists fc_u_sp_me fc_v_sp_me. a + m * fc_u_sp_me = z + m * fc_v_sp_me) -> (exists ff_u_sl ff_v_sl. ((((exists ff_h_sl_start. ff_h_sl_start + S (0) = S ((S (0)) * ff_v_sl)) /\ exists ff_q_sl_start. ff_u_sl = ff_q_sl_start * S ((S (0)) * ff_v_sl) + (0))) /\ ((((exists ff_h_sl_terminal. ff_h_sl_terminal + S (n) = S ((S (l)) * ff_v_sl)) /\ exists ff_q_sl_terminal. ff_u_sl = ff_q_sl_terminal * S ((S (l)) * ff_v_sl) + (n))) /\ forall ff_i_sl. (exists ff_lt_sl_bound. ff_lt_sl_bound + S ff_i_sl = l) -> exists ff_a_sl ff_r_sl ff_s_sl. ((((exists ff_h_sl_summand. ff_h_sl_summand + S (ff_a_sl) = S ((S (ff_i_sl)) * c)) /\ exists ff_q_sl_summand. b = ff_q_sl_summand * S ((S (ff_i_sl)) * c) + (ff_a_sl))) /\ ((((exists ff_h_sl_partial. ff_h_sl_partial + S (ff_r_sl) = S ((S (ff_i_sl)) * ff_v_sl)) /\ exists ff_q_sl_partial. ff_u_sl = ff_q_sl_partial * S ((S (ff_i_sl)) * ff_v_sl) + (ff_r_sl))) /\ ((((exists ff_h_sl_successor. ff_h_sl_successor + S (ff_s_sl) = S ((S (S ff_i_sl)) * ff_v_sl)) /\ exists ff_q_sl_successor. ff_u_sl = ff_q_sl_successor * S ((S (S ff_i_sl)) * ff_v_sl) + (ff_s_sl))) /\ ff_s_sl = ff_r_sl + ff_a_sl)))))) -> (exists ff_u_sr ff_v_sr. ((((exists ff_h_sr_start. ff_h_sr_start + S (0) = S ((S (0)) * ff_v_sr)) /\ exists ff_q_sr_start. ff_u_sr = ff_q_sr_start * S ((S (0)) * ff_v_sr) + (0))) /\ ((((exists ff_h_sr_terminal. ff_h_sr_terminal + S (q) = S ((S (l)) * ff_v_sr)) /\ exists ff_q_sr_terminal. ff_u_sr = ff_q_sr_terminal * S ((S (l)) * ff_v_sr) + (q))) /\ forall ff_i_sr. (exists ff_lt_sr_bound. ff_lt_sr_bound + S ff_i_sr = l) -> exists ff_a_sr ff_r_sr ff_s_sr. ((((exists ff_h_sr_summand. ff_h_sr_summand + S (ff_a_sr) = S ((S (ff_i_sr)) * e)) /\ exists ff_q_sr_summand. d = ff_q_sr_summand * S ((S (ff_i_sr)) * e) + (ff_a_sr))) /\ ((((exists ff_h_sr_partial. ff_h_sr_partial + S (ff_r_sr) = S ((S (ff_i_sr)) * ff_v_sr)) /\ exists ff_q_sr_partial. ff_u_sr = ff_q_sr_partial * S ((S (ff_i_sr)) * ff_v_sr) + (ff_r_sr))) /\ ((((exists ff_h_sr_successor. ff_h_sr_successor + S (ff_s_sr) = S ((S (S ff_i_sr)) * ff_v_sr)) /\ exists ff_q_sr_successor. ff_u_sr = ff_q_sr_successor * S ((S (S ff_i_sr)) * ff_v_sr) + (ff_s_sr))) /\ ff_s_sr = ff_r_sr + ff_a_sr)))))) -> exists fc_u_sv fc_v_sv. n + m * fc_u_sv = q + m * fc_v_sv
use beta_sum_zero
use beta_sum_succ_decompose
use le_succ
use le_refl
use mod_eq_refl
use mod_eq_add
intro m
intro b
intro c
intro d
intro e
induction l
intro n
intro q
intro hpw
intro hn
intro hq
have hn0 : n = 0
specialize beta_sum_zero b
specialize beta_sum_zero c
specialize beta_sum_zero n
apply beta_sum_zero
exact hn
have hq0 : q = 0
specialize beta_sum_zero d
specialize beta_sum_zero e
specialize beta_sum_zero q
apply beta_sum_zero
exact hq
rewrite hn0
rewrite hq0
specialize mod_eq_refl m
specialize mod_eq_refl 0
exact mod_eq_refl
intro n
intro q
intro hpw
intro hn
intro hq
have hnd : exists a r. (((exists ff_h_sd_l_a. ff_h_sd_l_a + S (a) = S ((S (l)) * c)) /\ exists ff_q_sd_l_a. b = ff_q_sd_l_a * S ((S (l)) * c) + (a))) /\ ((exists ff_u_sd_l_p ff_v_sd_l_p. ((((exists ff_h_sd_l_p_start. ff_h_sd_l_p_start + S (0) = S ((S (0)) * ff_v_sd_l_p)) /\ exists ff_q_sd_l_p_start. ff_u_sd_l_p = ff_q_sd_l_p_start * S ((S (0)) * ff_v_sd_l_p) + (0))) /\ ((((exists ff_h_sd_l_p_terminal. ff_h_sd_l_p_terminal + S (r) = S ((S (l)) * ff_v_sd_l_p)) /\ exists ff_q_sd_l_p_terminal. ff_u_sd_l_p = ff_q_sd_l_p_terminal * S ((S (l)) * ff_v_sd_l_p) + (r))) /\ forall ff_i_sd_l_p. (exists ff_lt_sd_l_p_bound. ff_lt_sd_l_p_bound + S ff_i_sd_l_p = l) -> exists ff_a_sd_l_p ff_r_sd_l_p ff_s_sd_l_p. ((((exists ff_h_sd_l_p_summand. ff_h_sd_l_p_summand + S (ff_a_sd_l_p) = S ((S (ff_i_sd_l_p)) * c)) /\ exists ff_q_sd_l_p_summand. b = ff_q_sd_l_p_summand * S ((S (ff_i_sd_l_p)) * c) + (ff_a_sd_l_p))) /\ ((((exists ff_h_sd_l_p_partial. ff_h_sd_l_p_partial + S (ff_r_sd_l_p) = S ((S (ff_i_sd_l_p)) * ff_v_sd_l_p)) /\ exists ff_q_sd_l_p_partial. ff_u_sd_l_p = ff_q_sd_l_p_partial * S ((S (ff_i_sd_l_p)) * ff_v_sd_l_p) + (ff_r_sd_l_p))) /\ ((((exists ff_h_sd_l_p_successor. ff_h_sd_l_p_successor + S (ff_s_sd_l_p) = S ((S (S ff_i_sd_l_p)) * ff_v_sd_l_p)) /\ exists ff_q_sd_l_p_successor. ff_u_sd_l_p = ff_q_sd_l_p_successor * S ((S (S ff_i_sd_l_p)) * ff_v_sd_l_p) + (ff_s_sd_l_p))) /\ ff_s_sd_l_p = ff_r_sd_l_p + ff_a_sd_l_p)))))) /\ n = r + a)
specialize beta_sum_succ_decompose b
specialize beta_sum_succ_decompose c
specialize beta_sum_succ_decompose l
specialize beta_sum_succ_decompose n
apply beta_sum_succ_decompose
exact hn
cases hnd
cases hnd_witness
cases hnd_witness_witness
cases hnd_witness_witness_right
have hqd : exists a r. (((exists ff_h_sd_r_a. ff_h_sd_r_a + S (a) = S ((S (l)) * e)) /\ exists ff_q_sd_r_a. d = ff_q_sd_r_a * S ((S (l)) * e) + (a))) /\ ((exists ff_u_sd_r_p ff_v_sd_r_p. ((((exists ff_h_sd_r_p_start. ff_h_sd_r_p_start + S (0) = S ((S (0)) * ff_v_sd_r_p)) /\ exists ff_q_sd_r_p_start. ff_u_sd_r_p = ff_q_sd_r_p_start * S ((S (0)) * ff_v_sd_r_p) + (0))) /\ ((((exists ff_h_sd_r_p_terminal. ff_h_sd_r_p_terminal + S (r) = S ((S (l)) * ff_v_sd_r_p)) /\ exists ff_q_sd_r_p_terminal. ff_u_sd_r_p = ff_q_sd_r_p_terminal * S ((S (l)) * ff_v_sd_r_p) + (r))) /\ forall ff_i_sd_r_p. (exists ff_lt_sd_r_p_bound. ff_lt_sd_r_p_bound + S ff_i_sd_r_p = l) -> exists ff_a_sd_r_p ff_r_sd_r_p ff_s_sd_r_p. ((((exists ff_h_sd_r_p_summand. ff_h_sd_r_p_summand + S (ff_a_sd_r_p) = S ((S (ff_i_sd_r_p)) * e)) /\ exists ff_q_sd_r_p_summand. d = ff_q_sd_r_p_summand * S ((S (ff_i_sd_r_p)) * e) + (ff_a_sd_r_p))) /\ ((((exists ff_h_sd_r_p_partial. ff_h_sd_r_p_partial + S (ff_r_sd_r_p) = S ((S (ff_i_sd_r_p)) * ff_v_sd_r_p)) /\ exists ff_q_sd_r_p_partial. ff_u_sd_r_p = ff_q_sd_r_p_partial * S ((S (ff_i_sd_r_p)) * ff_v_sd_r_p) + (ff_r_sd_r_p))) /\ ((((exists ff_h_sd_r_p_successor. ff_h_sd_r_p_successor + S (ff_s_sd_r_p) = S ((S (S ff_i_sd_r_p)) * ff_v_sd_r_p)) /\ exists ff_q_sd_r_p_successor. ff_u_sd_r_p = ff_q_sd_r_p_successor * S ((S (S ff_i_sd_r_p)) * ff_v_sd_r_p) + (ff_s_sd_r_p))) /\ ff_s_sd_r_p = ff_r_sd_r_p + ff_a_sd_r_p)))))) /\ q = r + a)
specialize beta_sum_succ_decompose d
specialize beta_sum_succ_decompose e
specialize beta_sum_succ_decompose l
specialize beta_sum_succ_decompose q
apply beta_sum_succ_decompose
exact hq
cases hqd
cases hqd_witness
cases hqd_witness_witness
cases hqd_witness_witness_right
have hpw_prefix : forall i a z. (exists fc_h_sp_pre. fc_h_sp_pre + S i = l) -> (((exists ff_h_sp_pre_la. ff_h_sp_pre_la + S (a) = S ((S (i)) * c)) /\ exists ff_q_sp_pre_la. b = ff_q_sp_pre_la * S ((S (i)) * c) + (a))) -> (((exists ff_h_sp_pre_ra. ff_h_sp_pre_ra + S (z) = S ((S (i)) * e)) /\ exists ff_q_sp_pre_ra. d = ff_q_sp_pre_ra * S ((S (i)) * e) + (z))) -> exists fc_u_sp_pre_me fc_v_sp_pre_me. a + m * fc_u_sp_pre_me = z + m * fc_v_sp_pre_me
intro i
intro a
intro z
intro hi
intro ha
intro hz
specialize hpw i
specialize hpw a
specialize hpw z
apply hpw
specialize le_succ (S i)
specialize le_succ l
apply le_succ
exact hi
exact ha
exact hz
have hprefix : exists u v. x1 + m * u = x3 + m * v
specialize IH x1
specialize IH x3
apply IH
exact hpw_prefix
exact hnd_witness_witness_right_left
exact hqd_witness_witness_right_left
have hentry : exists u v. x + m * u = x2 + m * v
specialize hpw l
specialize hpw x
specialize hpw x2
apply hpw
specialize le_refl (S l)
exact le_refl
exact hnd_witness_witness_left
exact hqd_witness_witness_left
have hfold : exists u v. (x1 + x) + m * u = (x3 + x2) + m * v
specialize mod_eq_add m
specialize mod_eq_add x1
specialize mod_eq_add x3
specialize mod_eq_add x
specialize mod_eq_add x2
apply mod_eq_add
exact hprefix
exact hentry
rewrite hnd_witness_witness_right_right
rewrite hqd_witness_witness_right_right
exact hfold
qed
- Occurrences
- 2,994
- Distinct objects
- 1,079
- Reused references
- 46
- Depth
- 64
- Cuts
- 84
- Certificate SHA-256
3e8170b1fba3…
all_bits_zeroAll bits zero
Quadratic reciprocity campaign
checked
The empty decoded prefix consists only of bits, vacuously.
Exact expanded PA statement
forall b c l. l = 0 -> (forall ff_i_empty. (exists ff_lt_empty_bound. ff_lt_empty_bound + S ff_i_empty = l) -> exists ff_bit_empty. ((((exists ff_h_empty_decoded. ff_h_empty_decoded + S (ff_bit_empty) = S ((S (ff_i_empty)) * c)) /\ exists ff_q_empty_decoded. b = ff_q_empty_decoded * S ((S (ff_i_empty)) * c) + (ff_bit_empty))) /\ (ff_bit_empty = 0 \/ ff_bit_empty = 1)))
Complete replay recipe: dependency imports + authored proof
pa prove forall b c l. l = 0 -> (forall ff_i_empty. (exists ff_lt_empty_bound. ff_lt_empty_bound + S ff_i_empty = l) -> exists ff_bit_empty. ((((exists ff_h_empty_decoded. ff_h_empty_decoded + S (ff_bit_empty) = S ((S (ff_i_empty)) * c)) /\ exists ff_q_empty_decoded. b = ff_q_empty_decoded * S ((S (ff_i_empty)) * c) + (ff_bit_empty))) /\ (ff_bit_empty = 0 \/ ff_bit_empty = 1)))
use add_eq_zero_right
use succ_ne_zero
intro b
intro c
intro l
intro hl
intro i
intro hi
rewrite hl at hi
exfalso
cases hi
have hsi : S i = 0
specialize add_eq_zero_right x
specialize add_eq_zero_right (S i)
apply add_eq_zero_right
exact hi_witness
specialize succ_ne_zero i
apply succ_ne_zero
exact hsi
qed
- Occurrences
- 41
- Distinct objects
- 41
- Reused references
- 0
- Depth
- 15
- Cuts
- 2
- Certificate SHA-256
1dff5495e030…
all_bits_prefix_succAll bits prefix succ
Quadratic reciprocity campaign
checked
Dropping the final entry preserves the all-bits invariant.
Exact expanded PA statement
forall b c l sl. sl = S l -> (forall ff_i_successor. (exists ff_lt_successor_bound. ff_lt_successor_bound + S ff_i_successor = sl) -> exists ff_bit_successor. ((((exists ff_h_successor_decoded. ff_h_successor_decoded + S (ff_bit_successor) = S ((S (ff_i_successor)) * c)) /\ exists ff_q_successor_decoded. b = ff_q_successor_decoded * S ((S (ff_i_successor)) * c) + (ff_bit_successor))) /\ (ff_bit_successor = 0 \/ ff_bit_successor = 1))) -> (forall ff_i_prefix. (exists ff_lt_prefix_bound. ff_lt_prefix_bound + S ff_i_prefix = l) -> exists ff_bit_prefix. ((((exists ff_h_prefix_decoded. ff_h_prefix_decoded + S (ff_bit_prefix) = S ((S (ff_i_prefix)) * c)) /\ exists ff_q_prefix_decoded. b = ff_q_prefix_decoded * S ((S (ff_i_prefix)) * c) + (ff_bit_prefix))) /\ (ff_bit_prefix = 0 \/ ff_bit_prefix = 1)))
Complete replay recipe: dependency imports + authored proof
pa prove forall b c l sl. sl = S l -> (forall ff_i_successor. (exists ff_lt_successor_bound. ff_lt_successor_bound + S ff_i_successor = sl) -> exists ff_bit_successor. ((((exists ff_h_successor_decoded. ff_h_successor_decoded + S (ff_bit_successor) = S ((S (ff_i_successor)) * c)) /\ exists ff_q_successor_decoded. b = ff_q_successor_decoded * S ((S (ff_i_successor)) * c) + (ff_bit_successor))) /\ (ff_bit_successor = 0 \/ ff_bit_successor = 1))) -> (forall ff_i_prefix. (exists ff_lt_prefix_bound. ff_lt_prefix_bound + S ff_i_prefix = l) -> exists ff_bit_prefix. ((((exists ff_h_prefix_decoded. ff_h_prefix_decoded + S (ff_bit_prefix) = S ((S (ff_i_prefix)) * c)) /\ exists ff_q_prefix_decoded. b = ff_q_prefix_decoded * S ((S (ff_i_prefix)) * c) + (ff_bit_prefix))) /\ (ff_bit_prefix = 0 \/ ff_bit_prefix = 1)))
use le_succ
intro b
intro c
intro l
intro sl
intro hsl
intro hbits
rewrite hsl at hbits
intro i
intro hi
specialize hbits i
apply hbits
specialize le_succ (S i)
specialize le_succ l
apply le_succ
exact hi
qed
- Occurrences
- 71
- Distinct objects
- 69
- Reused references
- 2
- Depth
- 20
- Cuts
- 2
- Certificate SHA-256
ed2b35b3bbd8…
all_bits_last_succAll bits last succ
Quadratic reciprocity campaign
checked
The final entry of a nonempty all-bits prefix is zero or one.
Exact expanded PA statement
forall b c l sl. sl = S l -> (forall ff_i_successor. (exists ff_lt_successor_bound. ff_lt_successor_bound + S ff_i_successor = sl) -> exists ff_bit_successor. ((((exists ff_h_successor_decoded. ff_h_successor_decoded + S (ff_bit_successor) = S ((S (ff_i_successor)) * c)) /\ exists ff_q_successor_decoded. b = ff_q_successor_decoded * S ((S (ff_i_successor)) * c) + (ff_bit_successor))) /\ (ff_bit_successor = 0 \/ ff_bit_successor = 1))) -> exists a. ((((exists ff_h_last. ff_h_last + S (a) = S ((S (l)) * c)) /\ exists ff_q_last. b = ff_q_last * S ((S (l)) * c) + (a))) /\ (a = 0 \/ a = 1))
Complete replay recipe: dependency imports + authored proof
pa prove forall b c l sl. sl = S l -> (forall ff_i_successor. (exists ff_lt_successor_bound. ff_lt_successor_bound + S ff_i_successor = sl) -> exists ff_bit_successor. ((((exists ff_h_successor_decoded. ff_h_successor_decoded + S (ff_bit_successor) = S ((S (ff_i_successor)) * c)) /\ exists ff_q_successor_decoded. b = ff_q_successor_decoded * S ((S (ff_i_successor)) * c) + (ff_bit_successor))) /\ (ff_bit_successor = 0 \/ ff_bit_successor = 1))) -> exists a. ((((exists ff_h_last. ff_h_last + S (a) = S ((S (l)) * c)) /\ exists ff_q_last. b = ff_q_last * S ((S (l)) * c) + (a))) /\ (a = 0 \/ a = 1))
use le_refl
intro b
intro c
intro l
intro sl
intro hsl
intro hbits
rewrite hsl at hbits
specialize hbits l
apply hbits
specialize le_refl (S l)
exact le_refl
qed
- Occurrences
- 48
- Distinct objects
- 48
- Reused references
- 0
- Depth
- 15
- Cuts
- 2
- Certificate SHA-256
11b88553710c…
bit_count_existsBit count exists
Quadratic reciprocity campaign
checked
Every all-bits prefix has a relational count of its ones.
Exact expanded PA statement
forall b c l. (forall ff_i_a. (exists ff_lt_a_bound. ff_lt_a_bound + S ff_i_a = l) -> exists ff_bit_a. ((((exists ff_h_a_decoded. ff_h_a_decoded + S (ff_bit_a) = S ((S (ff_i_a)) * c)) /\ exists ff_q_a_decoded. b = ff_q_a_decoded * S ((S (ff_i_a)) * c) + (ff_bit_a))) /\ (ff_bit_a = 0 \/ ff_bit_a = 1))) -> exists n. (((exists ff_u_b_sum ff_v_b_sum. ((((exists ff_h_b_sum_start. ff_h_b_sum_start + S (0) = S ((S (0)) * ff_v_b_sum)) /\ exists ff_q_b_sum_start. ff_u_b_sum = ff_q_b_sum_start * S ((S (0)) * ff_v_b_sum) + (0))) /\ ((((exists ff_h_b_sum_terminal. ff_h_b_sum_terminal + S (n) = S ((S (l)) * ff_v_b_sum)) /\ exists ff_q_b_sum_terminal. ff_u_b_sum = ff_q_b_sum_terminal * S ((S (l)) * ff_v_b_sum) + (n))) /\ forall ff_i_b_sum. (exists ff_lt_b_sum_bound. ff_lt_b_sum_bound + S ff_i_b_sum = l) -> exists ff_a_b_sum ff_r_b_sum ff_s_b_sum. ((((exists ff_h_b_sum_summand. ff_h_b_sum_summand + S (ff_a_b_sum) = S ((S (ff_i_b_sum)) * c)) /\ exists ff_q_b_sum_summand. b = ff_q_b_sum_summand * S ((S (ff_i_b_sum)) * c) + (ff_a_b_sum))) /\ ((((exists ff_h_b_sum_partial. ff_h_b_sum_partial + S (ff_r_b_sum) = S ((S (ff_i_b_sum)) * ff_v_b_sum)) /\ exists ff_q_b_sum_partial. ff_u_b_sum = ff_q_b_sum_partial * S ((S (ff_i_b_sum)) * ff_v_b_sum) + (ff_r_b_sum))) /\ ((((exists ff_h_b_sum_successor. ff_h_b_sum_successor + S (ff_s_b_sum) = S ((S (S ff_i_b_sum)) * ff_v_b_sum)) /\ exists ff_q_b_sum_successor. ff_u_b_sum = ff_q_b_sum_successor * S ((S (S ff_i_b_sum)) * ff_v_b_sum) + (ff_s_b_sum))) /\ ff_s_b_sum = ff_r_b_sum + ff_a_b_sum)))))) /\ (forall ff_i_b_bits. (exists ff_lt_b_bits_bound. ff_lt_b_bits_bound + S ff_i_b_bits = l) -> exists ff_bit_b_bits. ((((exists ff_h_b_bits_decoded. ff_h_b_bits_decoded + S (ff_bit_b_bits) = S ((S (ff_i_b_bits)) * c)) /\ exists ff_q_b_bits_decoded. b = ff_q_b_bits_decoded * S ((S (ff_i_b_bits)) * c) + (ff_bit_b_bits))) /\ (ff_bit_b_bits = 0 \/ ff_bit_b_bits = 1)))))
Complete replay recipe: dependency imports + authored proof
pa prove forall b c l. (forall ff_i_a. (exists ff_lt_a_bound. ff_lt_a_bound + S ff_i_a = l) -> exists ff_bit_a. ((((exists ff_h_a_decoded. ff_h_a_decoded + S (ff_bit_a) = S ((S (ff_i_a)) * c)) /\ exists ff_q_a_decoded. b = ff_q_a_decoded * S ((S (ff_i_a)) * c) + (ff_bit_a))) /\ (ff_bit_a = 0 \/ ff_bit_a = 1))) -> exists n. (((exists ff_u_b_sum ff_v_b_sum. ((((exists ff_h_b_sum_start. ff_h_b_sum_start + S (0) = S ((S (0)) * ff_v_b_sum)) /\ exists ff_q_b_sum_start. ff_u_b_sum = ff_q_b_sum_start * S ((S (0)) * ff_v_b_sum) + (0))) /\ ((((exists ff_h_b_sum_terminal. ff_h_b_sum_terminal + S (n) = S ((S (l)) * ff_v_b_sum)) /\ exists ff_q_b_sum_terminal. ff_u_b_sum = ff_q_b_sum_terminal * S ((S (l)) * ff_v_b_sum) + (n))) /\ forall ff_i_b_sum. (exists ff_lt_b_sum_bound. ff_lt_b_sum_bound + S ff_i_b_sum = l) -> exists ff_a_b_sum ff_r_b_sum ff_s_b_sum. ((((exists ff_h_b_sum_summand. ff_h_b_sum_summand + S (ff_a_b_sum) = S ((S (ff_i_b_sum)) * c)) /\ exists ff_q_b_sum_summand. b = ff_q_b_sum_summand * S ((S (ff_i_b_sum)) * c) + (ff_a_b_sum))) /\ ((((exists ff_h_b_sum_partial. ff_h_b_sum_partial + S (ff_r_b_sum) = S ((S (ff_i_b_sum)) * ff_v_b_sum)) /\ exists ff_q_b_sum_partial. ff_u_b_sum = ff_q_b_sum_partial * S ((S (ff_i_b_sum)) * ff_v_b_sum) + (ff_r_b_sum))) /\ ((((exists ff_h_b_sum_successor. ff_h_b_sum_successor + S (ff_s_b_sum) = S ((S (S ff_i_b_sum)) * ff_v_b_sum)) /\ exists ff_q_b_sum_successor. ff_u_b_sum = ff_q_b_sum_successor * S ((S (S ff_i_b_sum)) * ff_v_b_sum) + (ff_s_b_sum))) /\ ff_s_b_sum = ff_r_b_sum + ff_a_b_sum)))))) /\ (forall ff_i_b_bits. (exists ff_lt_b_bits_bound. ff_lt_b_bits_bound + S ff_i_b_bits = l) -> exists ff_bit_b_bits. ((((exists ff_h_b_bits_decoded. ff_h_b_bits_decoded + S (ff_bit_b_bits) = S ((S (ff_i_b_bits)) * c)) /\ exists ff_q_b_bits_decoded. b = ff_q_b_bits_decoded * S ((S (ff_i_b_bits)) * c) + (ff_bit_b_bits))) /\ (ff_bit_b_bits = 0 \/ ff_bit_b_bits = 1)))))
use beta_sum_exists
intro b
intro c
intro l
intro hbits
specialize beta_sum_exists b
specialize beta_sum_exists c
specialize beta_sum_exists l
cases beta_sum_exists
exists x
split
exact beta_sum_exists_witness
exact hbits
qed
- Occurrences
- 30,514
- Distinct objects
- 4,771
- Reused references
- 236
- Depth
- 87
- Cuts
- 917
- Certificate SHA-256
547a69863934…
bit_count_functionalBit count functional
Quadratic reciprocity campaign
checked
The relational count of a fixed all-bits prefix is unique.
Exact expanded PA statement
forall b c l n m. (((exists ff_u_l_sum ff_v_l_sum. ((((exists ff_h_l_sum_start. ff_h_l_sum_start + S (0) = S ((S (0)) * ff_v_l_sum)) /\ exists ff_q_l_sum_start. ff_u_l_sum = ff_q_l_sum_start * S ((S (0)) * ff_v_l_sum) + (0))) /\ ((((exists ff_h_l_sum_terminal. ff_h_l_sum_terminal + S (n) = S ((S (l)) * ff_v_l_sum)) /\ exists ff_q_l_sum_terminal. ff_u_l_sum = ff_q_l_sum_terminal * S ((S (l)) * ff_v_l_sum) + (n))) /\ forall ff_i_l_sum. (exists ff_lt_l_sum_bound. ff_lt_l_sum_bound + S ff_i_l_sum = l) -> exists ff_a_l_sum ff_r_l_sum ff_s_l_sum. ((((exists ff_h_l_sum_summand. ff_h_l_sum_summand + S (ff_a_l_sum) = S ((S (ff_i_l_sum)) * c)) /\ exists ff_q_l_sum_summand. b = ff_q_l_sum_summand * S ((S (ff_i_l_sum)) * c) + (ff_a_l_sum))) /\ ((((exists ff_h_l_sum_partial. ff_h_l_sum_partial + S (ff_r_l_sum) = S ((S (ff_i_l_sum)) * ff_v_l_sum)) /\ exists ff_q_l_sum_partial. ff_u_l_sum = ff_q_l_sum_partial * S ((S (ff_i_l_sum)) * ff_v_l_sum) + (ff_r_l_sum))) /\ ((((exists ff_h_l_sum_successor. ff_h_l_sum_successor + S (ff_s_l_sum) = S ((S (S ff_i_l_sum)) * ff_v_l_sum)) /\ exists ff_q_l_sum_successor. ff_u_l_sum = ff_q_l_sum_successor * S ((S (S ff_i_l_sum)) * ff_v_l_sum) + (ff_s_l_sum))) /\ ff_s_l_sum = ff_r_l_sum + ff_a_l_sum)))))) /\ (forall ff_i_l_bits. (exists ff_lt_l_bits_bound. ff_lt_l_bits_bound + S ff_i_l_bits = l) -> exists ff_bit_l_bits. ((((exists ff_h_l_bits_decoded. ff_h_l_bits_decoded + S (ff_bit_l_bits) = S ((S (ff_i_l_bits)) * c)) /\ exists ff_q_l_bits_decoded. b = ff_q_l_bits_decoded * S ((S (ff_i_l_bits)) * c) + (ff_bit_l_bits))) /\ (ff_bit_l_bits = 0 \/ ff_bit_l_bits = 1))))) -> (((exists ff_u_r_sum ff_v_r_sum. ((((exists ff_h_r_sum_start. ff_h_r_sum_start + S (0) = S ((S (0)) * ff_v_r_sum)) /\ exists ff_q_r_sum_start. ff_u_r_sum = ff_q_r_sum_start * S ((S (0)) * ff_v_r_sum) + (0))) /\ ((((exists ff_h_r_sum_terminal. ff_h_r_sum_terminal + S (m) = S ((S (l)) * ff_v_r_sum)) /\ exists ff_q_r_sum_terminal. ff_u_r_sum = ff_q_r_sum_terminal * S ((S (l)) * ff_v_r_sum) + (m))) /\ forall ff_i_r_sum. (exists ff_lt_r_sum_bound. ff_lt_r_sum_bound + S ff_i_r_sum = l) -> exists ff_a_r_sum ff_r_r_sum ff_s_r_sum. ((((exists ff_h_r_sum_summand. ff_h_r_sum_summand + S (ff_a_r_sum) = S ((S (ff_i_r_sum)) * c)) /\ exists ff_q_r_sum_summand. b = ff_q_r_sum_summand * S ((S (ff_i_r_sum)) * c) + (ff_a_r_sum))) /\ ((((exists ff_h_r_sum_partial. ff_h_r_sum_partial + S (ff_r_r_sum) = S ((S (ff_i_r_sum)) * ff_v_r_sum)) /\ exists ff_q_r_sum_partial. ff_u_r_sum = ff_q_r_sum_partial * S ((S (ff_i_r_sum)) * ff_v_r_sum) + (ff_r_r_sum))) /\ ((((exists ff_h_r_sum_successor. ff_h_r_sum_successor + S (ff_s_r_sum) = S ((S (S ff_i_r_sum)) * ff_v_r_sum)) /\ exists ff_q_r_sum_successor. ff_u_r_sum = ff_q_r_sum_successor * S ((S (S ff_i_r_sum)) * ff_v_r_sum) + (ff_s_r_sum))) /\ ff_s_r_sum = ff_r_r_sum + ff_a_r_sum)))))) /\ (forall ff_i_r_bits. (exists ff_lt_r_bits_bound. ff_lt_r_bits_bound + S ff_i_r_bits = l) -> exists ff_bit_r_bits. ((((exists ff_h_r_bits_decoded. ff_h_r_bits_decoded + S (ff_bit_r_bits) = S ((S (ff_i_r_bits)) * c)) /\ exists ff_q_r_bits_decoded. b = ff_q_r_bits_decoded * S ((S (ff_i_r_bits)) * c) + (ff_bit_r_bits))) /\ (ff_bit_r_bits = 0 \/ ff_bit_r_bits = 1))))) -> n = m
Complete replay recipe: dependency imports + authored proof
pa prove forall b c l n m. (((exists ff_u_l_sum ff_v_l_sum. ((((exists ff_h_l_sum_start. ff_h_l_sum_start + S (0) = S ((S (0)) * ff_v_l_sum)) /\ exists ff_q_l_sum_start. ff_u_l_sum = ff_q_l_sum_start * S ((S (0)) * ff_v_l_sum) + (0))) /\ ((((exists ff_h_l_sum_terminal. ff_h_l_sum_terminal + S (n) = S ((S (l)) * ff_v_l_sum)) /\ exists ff_q_l_sum_terminal. ff_u_l_sum = ff_q_l_sum_terminal * S ((S (l)) * ff_v_l_sum) + (n))) /\ forall ff_i_l_sum. (exists ff_lt_l_sum_bound. ff_lt_l_sum_bound + S ff_i_l_sum = l) -> exists ff_a_l_sum ff_r_l_sum ff_s_l_sum. ((((exists ff_h_l_sum_summand. ff_h_l_sum_summand + S (ff_a_l_sum) = S ((S (ff_i_l_sum)) * c)) /\ exists ff_q_l_sum_summand. b = ff_q_l_sum_summand * S ((S (ff_i_l_sum)) * c) + (ff_a_l_sum))) /\ ((((exists ff_h_l_sum_partial. ff_h_l_sum_partial + S (ff_r_l_sum) = S ((S (ff_i_l_sum)) * ff_v_l_sum)) /\ exists ff_q_l_sum_partial. ff_u_l_sum = ff_q_l_sum_partial * S ((S (ff_i_l_sum)) * ff_v_l_sum) + (ff_r_l_sum))) /\ ((((exists ff_h_l_sum_successor. ff_h_l_sum_successor + S (ff_s_l_sum) = S ((S (S ff_i_l_sum)) * ff_v_l_sum)) /\ exists ff_q_l_sum_successor. ff_u_l_sum = ff_q_l_sum_successor * S ((S (S ff_i_l_sum)) * ff_v_l_sum) + (ff_s_l_sum))) /\ ff_s_l_sum = ff_r_l_sum + ff_a_l_sum)))))) /\ (forall ff_i_l_bits. (exists ff_lt_l_bits_bound. ff_lt_l_bits_bound + S ff_i_l_bits = l) -> exists ff_bit_l_bits. ((((exists ff_h_l_bits_decoded. ff_h_l_bits_decoded + S (ff_bit_l_bits) = S ((S (ff_i_l_bits)) * c)) /\ exists ff_q_l_bits_decoded. b = ff_q_l_bits_decoded * S ((S (ff_i_l_bits)) * c) + (ff_bit_l_bits))) /\ (ff_bit_l_bits = 0 \/ ff_bit_l_bits = 1))))) -> (((exists ff_u_r_sum ff_v_r_sum. ((((exists ff_h_r_sum_start. ff_h_r_sum_start + S (0) = S ((S (0)) * ff_v_r_sum)) /\ exists ff_q_r_sum_start. ff_u_r_sum = ff_q_r_sum_start * S ((S (0)) * ff_v_r_sum) + (0))) /\ ((((exists ff_h_r_sum_terminal. ff_h_r_sum_terminal + S (m) = S ((S (l)) * ff_v_r_sum)) /\ exists ff_q_r_sum_terminal. ff_u_r_sum = ff_q_r_sum_terminal * S ((S (l)) * ff_v_r_sum) + (m))) /\ forall ff_i_r_sum. (exists ff_lt_r_sum_bound. ff_lt_r_sum_bound + S ff_i_r_sum = l) -> exists ff_a_r_sum ff_r_r_sum ff_s_r_sum. ((((exists ff_h_r_sum_summand. ff_h_r_sum_summand + S (ff_a_r_sum) = S ((S (ff_i_r_sum)) * c)) /\ exists ff_q_r_sum_summand. b = ff_q_r_sum_summand * S ((S (ff_i_r_sum)) * c) + (ff_a_r_sum))) /\ ((((exists ff_h_r_sum_partial. ff_h_r_sum_partial + S (ff_r_r_sum) = S ((S (ff_i_r_sum)) * ff_v_r_sum)) /\ exists ff_q_r_sum_partial. ff_u_r_sum = ff_q_r_sum_partial * S ((S (ff_i_r_sum)) * ff_v_r_sum) + (ff_r_r_sum))) /\ ((((exists ff_h_r_sum_successor. ff_h_r_sum_successor + S (ff_s_r_sum) = S ((S (S ff_i_r_sum)) * ff_v_r_sum)) /\ exists ff_q_r_sum_successor. ff_u_r_sum = ff_q_r_sum_successor * S ((S (S ff_i_r_sum)) * ff_v_r_sum) + (ff_s_r_sum))) /\ ff_s_r_sum = ff_r_r_sum + ff_a_r_sum)))))) /\ (forall ff_i_r_bits. (exists ff_lt_r_bits_bound. ff_lt_r_bits_bound + S ff_i_r_bits = l) -> exists ff_bit_r_bits. ((((exists ff_h_r_bits_decoded. ff_h_r_bits_decoded + S (ff_bit_r_bits) = S ((S (ff_i_r_bits)) * c)) /\ exists ff_q_r_bits_decoded. b = ff_q_r_bits_decoded * S ((S (ff_i_r_bits)) * c) + (ff_bit_r_bits))) /\ (ff_bit_r_bits = 0 \/ ff_bit_r_bits = 1))))) -> n = m
use beta_sum_functional
intro b
intro c
intro l
intro n
intro m
intro hn
intro hm
cases hn
cases hm
specialize beta_sum_functional b
specialize beta_sum_functional c
specialize beta_sum_functional l
specialize beta_sum_functional n
specialize beta_sum_functional m
apply beta_sum_functional
exact hn_left
exact hm_left
qed
- Occurrences
- 1,488
- Distinct objects
- 1,015
- Reused references
- 39
- Depth
- 62
- Cuts
- 38
- Certificate SHA-256
f92a1960a142…
bit_count_zeroBit count zero
Quadratic reciprocity campaign
checked
An empty bit prefix contains zero ones.
Exact expanded PA statement
forall b c l n. l = 0 -> (((exists ff_u_zero_sum ff_v_zero_sum. ((((exists ff_h_zero_sum_start. ff_h_zero_sum_start + S (0) = S ((S (0)) * ff_v_zero_sum)) /\ exists ff_q_zero_sum_start. ff_u_zero_sum = ff_q_zero_sum_start * S ((S (0)) * ff_v_zero_sum) + (0))) /\ ((((exists ff_h_zero_sum_terminal. ff_h_zero_sum_terminal + S (n) = S ((S (l)) * ff_v_zero_sum)) /\ exists ff_q_zero_sum_terminal. ff_u_zero_sum = ff_q_zero_sum_terminal * S ((S (l)) * ff_v_zero_sum) + (n))) /\ forall ff_i_zero_sum. (exists ff_lt_zero_sum_bound. ff_lt_zero_sum_bound + S ff_i_zero_sum = l) -> exists ff_a_zero_sum ff_r_zero_sum ff_s_zero_sum. ((((exists ff_h_zero_sum_summand. ff_h_zero_sum_summand + S (ff_a_zero_sum) = S ((S (ff_i_zero_sum)) * c)) /\ exists ff_q_zero_sum_summand. b = ff_q_zero_sum_summand * S ((S (ff_i_zero_sum)) * c) + (ff_a_zero_sum))) /\ ((((exists ff_h_zero_sum_partial. ff_h_zero_sum_partial + S (ff_r_zero_sum) = S ((S (ff_i_zero_sum)) * ff_v_zero_sum)) /\ exists ff_q_zero_sum_partial. ff_u_zero_sum = ff_q_zero_sum_partial * S ((S (ff_i_zero_sum)) * ff_v_zero_sum) + (ff_r_zero_sum))) /\ ((((exists ff_h_zero_sum_successor. ff_h_zero_sum_successor + S (ff_s_zero_sum) = S ((S (S ff_i_zero_sum)) * ff_v_zero_sum)) /\ exists ff_q_zero_sum_successor. ff_u_zero_sum = ff_q_zero_sum_successor * S ((S (S ff_i_zero_sum)) * ff_v_zero_sum) + (ff_s_zero_sum))) /\ ff_s_zero_sum = ff_r_zero_sum + ff_a_zero_sum)))))) /\ (forall ff_i_zero_bits. (exists ff_lt_zero_bits_bound. ff_lt_zero_bits_bound + S ff_i_zero_bits = l) -> exists ff_bit_zero_bits. ((((exists ff_h_zero_bits_decoded. ff_h_zero_bits_decoded + S (ff_bit_zero_bits) = S ((S (ff_i_zero_bits)) * c)) /\ exists ff_q_zero_bits_decoded. b = ff_q_zero_bits_decoded * S ((S (ff_i_zero_bits)) * c) + (ff_bit_zero_bits))) /\ (ff_bit_zero_bits = 0 \/ ff_bit_zero_bits = 1))))) -> n = 0
Complete replay recipe: dependency imports + authored proof
pa prove forall b c l n. l = 0 -> (((exists ff_u_zero_sum ff_v_zero_sum. ((((exists ff_h_zero_sum_start. ff_h_zero_sum_start + S (0) = S ((S (0)) * ff_v_zero_sum)) /\ exists ff_q_zero_sum_start. ff_u_zero_sum = ff_q_zero_sum_start * S ((S (0)) * ff_v_zero_sum) + (0))) /\ ((((exists ff_h_zero_sum_terminal. ff_h_zero_sum_terminal + S (n) = S ((S (l)) * ff_v_zero_sum)) /\ exists ff_q_zero_sum_terminal. ff_u_zero_sum = ff_q_zero_sum_terminal * S ((S (l)) * ff_v_zero_sum) + (n))) /\ forall ff_i_zero_sum. (exists ff_lt_zero_sum_bound. ff_lt_zero_sum_bound + S ff_i_zero_sum = l) -> exists ff_a_zero_sum ff_r_zero_sum ff_s_zero_sum. ((((exists ff_h_zero_sum_summand. ff_h_zero_sum_summand + S (ff_a_zero_sum) = S ((S (ff_i_zero_sum)) * c)) /\ exists ff_q_zero_sum_summand. b = ff_q_zero_sum_summand * S ((S (ff_i_zero_sum)) * c) + (ff_a_zero_sum))) /\ ((((exists ff_h_zero_sum_partial. ff_h_zero_sum_partial + S (ff_r_zero_sum) = S ((S (ff_i_zero_sum)) * ff_v_zero_sum)) /\ exists ff_q_zero_sum_partial. ff_u_zero_sum = ff_q_zero_sum_partial * S ((S (ff_i_zero_sum)) * ff_v_zero_sum) + (ff_r_zero_sum))) /\ ((((exists ff_h_zero_sum_successor. ff_h_zero_sum_successor + S (ff_s_zero_sum) = S ((S (S ff_i_zero_sum)) * ff_v_zero_sum)) /\ exists ff_q_zero_sum_successor. ff_u_zero_sum = ff_q_zero_sum_successor * S ((S (S ff_i_zero_sum)) * ff_v_zero_sum) + (ff_s_zero_sum))) /\ ff_s_zero_sum = ff_r_zero_sum + ff_a_zero_sum)))))) /\ (forall ff_i_zero_bits. (exists ff_lt_zero_bits_bound. ff_lt_zero_bits_bound + S ff_i_zero_bits = l) -> exists ff_bit_zero_bits. ((((exists ff_h_zero_bits_decoded. ff_h_zero_bits_decoded + S (ff_bit_zero_bits) = S ((S (ff_i_zero_bits)) * c)) /\ exists ff_q_zero_bits_decoded. b = ff_q_zero_bits_decoded * S ((S (ff_i_zero_bits)) * c) + (ff_bit_zero_bits))) /\ (ff_bit_zero_bits = 0 \/ ff_bit_zero_bits = 1))))) -> n = 0
use beta_sum_zero
intro b
intro c
intro l
intro n
intro hl
intro hcount
rewrite hl at hcount
rewrite hl at hcount
rewrite hl at hcount
cases hcount
specialize beta_sum_zero b
specialize beta_sum_zero c
specialize beta_sum_zero n
apply beta_sum_zero
exact hcount_left
qed
- Occurrences
- 1,216
- Distinct objects
- 787
- Reused references
- 37
- Depth
- 61
- Cuts
- 32
- Certificate SHA-256
d7b3bef13355…
bit_count_succ_decomposeBit count succ decompose
Quadratic reciprocity campaign
checked
A successor count is its prefix count plus a final zero-or-one bit.
Exact expanded PA statement
forall b c l sl n. sl = S l -> (((exists ff_u_successor_sum ff_v_successor_sum. ((((exists ff_h_successor_sum_start. ff_h_successor_sum_start + S (0) = S ((S (0)) * ff_v_successor_sum)) /\ exists ff_q_successor_sum_start. ff_u_successor_sum = ff_q_successor_sum_start * S ((S (0)) * ff_v_successor_sum) + (0))) /\ ((((exists ff_h_successor_sum_terminal. ff_h_successor_sum_terminal + S (n) = S ((S (sl)) * ff_v_successor_sum)) /\ exists ff_q_successor_sum_terminal. ff_u_successor_sum = ff_q_successor_sum_terminal * S ((S (sl)) * ff_v_successor_sum) + (n))) /\ forall ff_i_successor_sum. (exists ff_lt_successor_sum_bound. ff_lt_successor_sum_bound + S ff_i_successor_sum = sl) -> exists ff_a_successor_sum ff_r_successor_sum ff_s_successor_sum. ((((exists ff_h_successor_sum_summand. ff_h_successor_sum_summand + S (ff_a_successor_sum) = S ((S (ff_i_successor_sum)) * c)) /\ exists ff_q_successor_sum_summand. b = ff_q_successor_sum_summand * S ((S (ff_i_successor_sum)) * c) + (ff_a_successor_sum))) /\ ((((exists ff_h_successor_sum_partial. ff_h_successor_sum_partial + S (ff_r_successor_sum) = S ((S (ff_i_successor_sum)) * ff_v_successor_sum)) /\ exists ff_q_successor_sum_partial. ff_u_successor_sum = ff_q_successor_sum_partial * S ((S (ff_i_successor_sum)) * ff_v_successor_sum) + (ff_r_successor_sum))) /\ ((((exists ff_h_successor_sum_successor. ff_h_successor_sum_successor + S (ff_s_successor_sum) = S ((S (S ff_i_successor_sum)) * ff_v_successor_sum)) /\ exists ff_q_successor_sum_successor. ff_u_successor_sum = ff_q_successor_sum_successor * S ((S (S ff_i_successor_sum)) * ff_v_successor_sum) + (ff_s_successor_sum))) /\ ff_s_successor_sum = ff_r_successor_sum + ff_a_successor_sum)))))) /\ (forall ff_i_successor_bits. (exists ff_lt_successor_bits_bound. ff_lt_successor_bits_bound + S ff_i_successor_bits = sl) -> exists ff_bit_successor_bits. ((((exists ff_h_successor_bits_decoded. ff_h_successor_bits_decoded + S (ff_bit_successor_bits) = S ((S (ff_i_successor_bits)) * c)) /\ exists ff_q_successor_bits_decoded. b = ff_q_successor_bits_decoded * S ((S (ff_i_successor_bits)) * c) + (ff_bit_successor_bits))) /\ (ff_bit_successor_bits = 0 \/ ff_bit_successor_bits = 1))))) -> exists a r. (((exists ff_h_last. ff_h_last + S (a) = S ((S (l)) * c)) /\ exists ff_q_last. b = ff_q_last * S ((S (l)) * c) + (a))) /\ ((((exists ff_u_prefix_sum ff_v_prefix_sum. ((((exists ff_h_prefix_sum_start. ff_h_prefix_sum_start + S (0) = S ((S (0)) * ff_v_prefix_sum)) /\ exists ff_q_prefix_sum_start. ff_u_prefix_sum = ff_q_prefix_sum_start * S ((S (0)) * ff_v_prefix_sum) + (0))) /\ ((((exists ff_h_prefix_sum_terminal. ff_h_prefix_sum_terminal + S (r) = S ((S (l)) * ff_v_prefix_sum)) /\ exists ff_q_prefix_sum_terminal. ff_u_prefix_sum = ff_q_prefix_sum_terminal * S ((S (l)) * ff_v_prefix_sum) + (r))) /\ forall ff_i_prefix_sum. (exists ff_lt_prefix_sum_bound. ff_lt_prefix_sum_bound + S ff_i_prefix_sum = l) -> exists ff_a_prefix_sum ff_r_prefix_sum ff_s_prefix_sum. ((((exists ff_h_prefix_sum_summand. ff_h_prefix_sum_summand + S (ff_a_prefix_sum) = S ((S (ff_i_prefix_sum)) * c)) /\ exists ff_q_prefix_sum_summand. b = ff_q_prefix_sum_summand * S ((S (ff_i_prefix_sum)) * c) + (ff_a_prefix_sum))) /\ ((((exists ff_h_prefix_sum_partial. ff_h_prefix_sum_partial + S (ff_r_prefix_sum) = S ((S (ff_i_prefix_sum)) * ff_v_prefix_sum)) /\ exists ff_q_prefix_sum_partial. ff_u_prefix_sum = ff_q_prefix_sum_partial * S ((S (ff_i_prefix_sum)) * ff_v_prefix_sum) + (ff_r_prefix_sum))) /\ ((((exists ff_h_prefix_sum_successor. ff_h_prefix_sum_successor + S (ff_s_prefix_sum) = S ((S (S ff_i_prefix_sum)) * ff_v_prefix_sum)) /\ exists ff_q_prefix_sum_successor. ff_u_prefix_sum = ff_q_prefix_sum_successor * S ((S (S ff_i_prefix_sum)) * ff_v_prefix_sum) + (ff_s_prefix_sum))) /\ ff_s_prefix_sum = ff_r_prefix_sum + ff_a_prefix_sum)))))) /\ (forall ff_i_prefix_bits. (exists ff_lt_prefix_bits_bound. ff_lt_prefix_bits_bound + S ff_i_prefix_bits = l) -> exists ff_bit_prefix_bits. ((((exists ff_h_prefix_bits_decoded. ff_h_prefix_bits_decoded + S (ff_bit_prefix_bits) = S ((S (ff_i_prefix_bits)) * c)) /\ exists ff_q_prefix_bits_decoded. b = ff_q_prefix_bits_decoded * S ((S (ff_i_prefix_bits)) * c) + (ff_bit_prefix_bits))) /\ (ff_bit_prefix_bits = 0 \/ ff_bit_prefix_bits = 1))))) /\ ((a = 0 \/ a = 1) /\ n = r + a))
Complete replay recipe: dependency imports + authored proof
pa prove forall b c l sl n. sl = S l -> (((exists ff_u_successor_sum ff_v_successor_sum. ((((exists ff_h_successor_sum_start. ff_h_successor_sum_start + S (0) = S ((S (0)) * ff_v_successor_sum)) /\ exists ff_q_successor_sum_start. ff_u_successor_sum = ff_q_successor_sum_start * S ((S (0)) * ff_v_successor_sum) + (0))) /\ ((((exists ff_h_successor_sum_terminal. ff_h_successor_sum_terminal + S (n) = S ((S (sl)) * ff_v_successor_sum)) /\ exists ff_q_successor_sum_terminal. ff_u_successor_sum = ff_q_successor_sum_terminal * S ((S (sl)) * ff_v_successor_sum) + (n))) /\ forall ff_i_successor_sum. (exists ff_lt_successor_sum_bound. ff_lt_successor_sum_bound + S ff_i_successor_sum = sl) -> exists ff_a_successor_sum ff_r_successor_sum ff_s_successor_sum. ((((exists ff_h_successor_sum_summand. ff_h_successor_sum_summand + S (ff_a_successor_sum) = S ((S (ff_i_successor_sum)) * c)) /\ exists ff_q_successor_sum_summand. b = ff_q_successor_sum_summand * S ((S (ff_i_successor_sum)) * c) + (ff_a_successor_sum))) /\ ((((exists ff_h_successor_sum_partial. ff_h_successor_sum_partial + S (ff_r_successor_sum) = S ((S (ff_i_successor_sum)) * ff_v_successor_sum)) /\ exists ff_q_successor_sum_partial. ff_u_successor_sum = ff_q_successor_sum_partial * S ((S (ff_i_successor_sum)) * ff_v_successor_sum) + (ff_r_successor_sum))) /\ ((((exists ff_h_successor_sum_successor. ff_h_successor_sum_successor + S (ff_s_successor_sum) = S ((S (S ff_i_successor_sum)) * ff_v_successor_sum)) /\ exists ff_q_successor_sum_successor. ff_u_successor_sum = ff_q_successor_sum_successor * S ((S (S ff_i_successor_sum)) * ff_v_successor_sum) + (ff_s_successor_sum))) /\ ff_s_successor_sum = ff_r_successor_sum + ff_a_successor_sum)))))) /\ (forall ff_i_successor_bits. (exists ff_lt_successor_bits_bound. ff_lt_successor_bits_bound + S ff_i_successor_bits = sl) -> exists ff_bit_successor_bits. ((((exists ff_h_successor_bits_decoded. ff_h_successor_bits_decoded + S (ff_bit_successor_bits) = S ((S (ff_i_successor_bits)) * c)) /\ exists ff_q_successor_bits_decoded. b = ff_q_successor_bits_decoded * S ((S (ff_i_successor_bits)) * c) + (ff_bit_successor_bits))) /\ (ff_bit_successor_bits = 0 \/ ff_bit_successor_bits = 1))))) -> exists a r. (((exists ff_h_last. ff_h_last + S (a) = S ((S (l)) * c)) /\ exists ff_q_last. b = ff_q_last * S ((S (l)) * c) + (a))) /\ ((((exists ff_u_prefix_sum ff_v_prefix_sum. ((((exists ff_h_prefix_sum_start. ff_h_prefix_sum_start + S (0) = S ((S (0)) * ff_v_prefix_sum)) /\ exists ff_q_prefix_sum_start. ff_u_prefix_sum = ff_q_prefix_sum_start * S ((S (0)) * ff_v_prefix_sum) + (0))) /\ ((((exists ff_h_prefix_sum_terminal. ff_h_prefix_sum_terminal + S (r) = S ((S (l)) * ff_v_prefix_sum)) /\ exists ff_q_prefix_sum_terminal. ff_u_prefix_sum = ff_q_prefix_sum_terminal * S ((S (l)) * ff_v_prefix_sum) + (r))) /\ forall ff_i_prefix_sum. (exists ff_lt_prefix_sum_bound. ff_lt_prefix_sum_bound + S ff_i_prefix_sum = l) -> exists ff_a_prefix_sum ff_r_prefix_sum ff_s_prefix_sum. ((((exists ff_h_prefix_sum_summand. ff_h_prefix_sum_summand + S (ff_a_prefix_sum) = S ((S (ff_i_prefix_sum)) * c)) /\ exists ff_q_prefix_sum_summand. b = ff_q_prefix_sum_summand * S ((S (ff_i_prefix_sum)) * c) + (ff_a_prefix_sum))) /\ ((((exists ff_h_prefix_sum_partial. ff_h_prefix_sum_partial + S (ff_r_prefix_sum) = S ((S (ff_i_prefix_sum)) * ff_v_prefix_sum)) /\ exists ff_q_prefix_sum_partial. ff_u_prefix_sum = ff_q_prefix_sum_partial * S ((S (ff_i_prefix_sum)) * ff_v_prefix_sum) + (ff_r_prefix_sum))) /\ ((((exists ff_h_prefix_sum_successor. ff_h_prefix_sum_successor + S (ff_s_prefix_sum) = S ((S (S ff_i_prefix_sum)) * ff_v_prefix_sum)) /\ exists ff_q_prefix_sum_successor. ff_u_prefix_sum = ff_q_prefix_sum_successor * S ((S (S ff_i_prefix_sum)) * ff_v_prefix_sum) + (ff_s_prefix_sum))) /\ ff_s_prefix_sum = ff_r_prefix_sum + ff_a_prefix_sum)))))) /\ (forall ff_i_prefix_bits. (exists ff_lt_prefix_bits_bound. ff_lt_prefix_bits_bound + S ff_i_prefix_bits = l) -> exists ff_bit_prefix_bits. ((((exists ff_h_prefix_bits_decoded. ff_h_prefix_bits_decoded + S (ff_bit_prefix_bits) = S ((S (ff_i_prefix_bits)) * c)) /\ exists ff_q_prefix_bits_decoded. b = ff_q_prefix_bits_decoded * S ((S (ff_i_prefix_bits)) * c) + (ff_bit_prefix_bits))) /\ (ff_bit_prefix_bits = 0 \/ ff_bit_prefix_bits = 1))))) /\ ((a = 0 \/ a = 1) /\ n = r + a))
use beta_sum_succ_decompose
use all_bits_prefix_succ
use all_bits_last_succ
use beta_at_unique
intro b
intro c
intro l
intro sl
intro n
intro hsl
intro hcount
rewrite hsl at hcount
rewrite hsl at hcount
rewrite hsl at hcount
rewrite hsl at hcount
cases hcount
have hsum : exists a r. (((exists ff_h_sum_last. ff_h_sum_last + S (a) = S ((S (l)) * c)) /\ exists ff_q_sum_last. b = ff_q_sum_last * S ((S (l)) * c) + (a))) /\ ((exists ff_u_sum_prefix ff_v_sum_prefix. ((((exists ff_h_sum_prefix_start. ff_h_sum_prefix_start + S (0) = S ((S (0)) * ff_v_sum_prefix)) /\ exists ff_q_sum_prefix_start. ff_u_sum_prefix = ff_q_sum_prefix_start * S ((S (0)) * ff_v_sum_prefix) + (0))) /\ ((((exists ff_h_sum_prefix_terminal. ff_h_sum_prefix_terminal + S (r) = S ((S (l)) * ff_v_sum_prefix)) /\ exists ff_q_sum_prefix_terminal. ff_u_sum_prefix = ff_q_sum_prefix_terminal * S ((S (l)) * ff_v_sum_prefix) + (r))) /\ forall ff_i_sum_prefix. (exists ff_lt_sum_prefix_bound. ff_lt_sum_prefix_bound + S ff_i_sum_prefix = l) -> exists ff_a_sum_prefix ff_r_sum_prefix ff_s_sum_prefix. ((((exists ff_h_sum_prefix_summand. ff_h_sum_prefix_summand + S (ff_a_sum_prefix) = S ((S (ff_i_sum_prefix)) * c)) /\ exists ff_q_sum_prefix_summand. b = ff_q_sum_prefix_summand * S ((S (ff_i_sum_prefix)) * c) + (ff_a_sum_prefix))) /\ ((((exists ff_h_sum_prefix_partial. ff_h_sum_prefix_partial + S (ff_r_sum_prefix) = S ((S (ff_i_sum_prefix)) * ff_v_sum_prefix)) /\ exists ff_q_sum_prefix_partial. ff_u_sum_prefix = ff_q_sum_prefix_partial * S ((S (ff_i_sum_prefix)) * ff_v_sum_prefix) + (ff_r_sum_prefix))) /\ ((((exists ff_h_sum_prefix_successor. ff_h_sum_prefix_successor + S (ff_s_sum_prefix) = S ((S (S ff_i_sum_prefix)) * ff_v_sum_prefix)) /\ exists ff_q_sum_prefix_successor. ff_u_sum_prefix = ff_q_sum_prefix_successor * S ((S (S ff_i_sum_prefix)) * ff_v_sum_prefix) + (ff_s_sum_prefix))) /\ ff_s_sum_prefix = ff_r_sum_prefix + ff_a_sum_prefix)))))) /\ n = r + a)
specialize beta_sum_succ_decompose b
specialize beta_sum_succ_decompose c
specialize beta_sum_succ_decompose l
specialize beta_sum_succ_decompose n
apply beta_sum_succ_decompose
exact hcount_left
cases hsum
cases hsum_witness
cases hsum_witness_witness
cases hsum_witness_witness_right
have hlast : exists a. ((((exists ff_h_bits_last. ff_h_bits_last + S (a) = S ((S (l)) * c)) /\ exists ff_q_bits_last. b = ff_q_bits_last * S ((S (l)) * c) + (a))) /\ (a = 0 \/ a = 1))
specialize all_bits_last_succ b
specialize all_bits_last_succ c
specialize all_bits_last_succ l
specialize all_bits_last_succ (S l)
apply all_bits_last_succ
refl
exact hcount_right
cases hlast
cases hlast_witness
have ha : x = x2
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique l
specialize beta_at_unique x
specialize beta_at_unique x2
apply beta_at_unique
exact hsum_witness_witness_left
exact hlast_witness_left
have hprefix : forall ff_i_kept_prefix. (exists ff_lt_kept_prefix_bound. ff_lt_kept_prefix_bound + S ff_i_kept_prefix = l) -> exists ff_bit_kept_prefix. ((((exists ff_h_kept_prefix_decoded. ff_h_kept_prefix_decoded + S (ff_bit_kept_prefix) = S ((S (ff_i_kept_prefix)) * c)) /\ exists ff_q_kept_prefix_decoded. b = ff_q_kept_prefix_decoded * S ((S (ff_i_kept_prefix)) * c) + (ff_bit_kept_prefix))) /\ (ff_bit_kept_prefix = 0 \/ ff_bit_kept_prefix = 1))
specialize all_bits_prefix_succ b
specialize all_bits_prefix_succ c
specialize all_bits_prefix_succ l
specialize all_bits_prefix_succ (S l)
apply all_bits_prefix_succ
refl
exact hcount_right
exists x
exists x1
split
exact hsum_witness_witness_left
split
split
exact hsum_witness_witness_right_left
exact hprefix
split
rewrite ha
rewrite ha
exact hlast_witness_right
exact hsum_witness_witness_right_right
qed
- Occurrences
- 2,608
- Distinct objects
- 949
- Reused references
- 42
- Depth
- 63
- Cuts
- 73
- Certificate SHA-256
e4dbc903d361…
bit_count_boundedBit count bounded
Quadratic reciprocity campaign
checked
A zero/one count never exceeds the length of its decoded prefix.
Exact expanded PA statement
forall b c l n. (((exists ff_u_b_sum ff_v_b_sum. ((((exists ff_h_b_sum_start. ff_h_b_sum_start + S (0) = S ((S (0)) * ff_v_b_sum)) /\ exists ff_q_b_sum_start. ff_u_b_sum = ff_q_b_sum_start * S ((S (0)) * ff_v_b_sum) + (0))) /\ ((((exists ff_h_b_sum_terminal. ff_h_b_sum_terminal + S (n) = S ((S (l)) * ff_v_b_sum)) /\ exists ff_q_b_sum_terminal. ff_u_b_sum = ff_q_b_sum_terminal * S ((S (l)) * ff_v_b_sum) + (n))) /\ forall ff_i_b_sum. (exists ff_lt_b_sum_bound. ff_lt_b_sum_bound + S ff_i_b_sum = l) -> exists ff_a_b_sum ff_r_b_sum ff_s_b_sum. ((((exists ff_h_b_sum_summand. ff_h_b_sum_summand + S (ff_a_b_sum) = S ((S (ff_i_b_sum)) * c)) /\ exists ff_q_b_sum_summand. b = ff_q_b_sum_summand * S ((S (ff_i_b_sum)) * c) + (ff_a_b_sum))) /\ ((((exists ff_h_b_sum_partial. ff_h_b_sum_partial + S (ff_r_b_sum) = S ((S (ff_i_b_sum)) * ff_v_b_sum)) /\ exists ff_q_b_sum_partial. ff_u_b_sum = ff_q_b_sum_partial * S ((S (ff_i_b_sum)) * ff_v_b_sum) + (ff_r_b_sum))) /\ ((((exists ff_h_b_sum_successor. ff_h_b_sum_successor + S (ff_s_b_sum) = S ((S (S ff_i_b_sum)) * ff_v_b_sum)) /\ exists ff_q_b_sum_successor. ff_u_b_sum = ff_q_b_sum_successor * S ((S (S ff_i_b_sum)) * ff_v_b_sum) + (ff_s_b_sum))) /\ ff_s_b_sum = ff_r_b_sum + ff_a_b_sum)))))) /\ (forall ff_i_b_bits. (exists ff_lt_b_bits_bound. ff_lt_b_bits_bound + S ff_i_b_bits = l) -> exists ff_bit_b_bits. ((((exists ff_h_b_bits_decoded. ff_h_b_bits_decoded + S (ff_bit_b_bits) = S ((S (ff_i_b_bits)) * c)) /\ exists ff_q_b_bits_decoded. b = ff_q_b_bits_decoded * S ((S (ff_i_b_bits)) * c) + (ff_bit_b_bits))) /\ (ff_bit_b_bits = 0 \/ ff_bit_b_bits = 1))))) -> exists h. h + n = l
Complete replay recipe: dependency imports + authored proof
pa prove forall b c l n. (((exists ff_u_b_sum ff_v_b_sum. ((((exists ff_h_b_sum_start. ff_h_b_sum_start + S (0) = S ((S (0)) * ff_v_b_sum)) /\ exists ff_q_b_sum_start. ff_u_b_sum = ff_q_b_sum_start * S ((S (0)) * ff_v_b_sum) + (0))) /\ ((((exists ff_h_b_sum_terminal. ff_h_b_sum_terminal + S (n) = S ((S (l)) * ff_v_b_sum)) /\ exists ff_q_b_sum_terminal. ff_u_b_sum = ff_q_b_sum_terminal * S ((S (l)) * ff_v_b_sum) + (n))) /\ forall ff_i_b_sum. (exists ff_lt_b_sum_bound. ff_lt_b_sum_bound + S ff_i_b_sum = l) -> exists ff_a_b_sum ff_r_b_sum ff_s_b_sum. ((((exists ff_h_b_sum_summand. ff_h_b_sum_summand + S (ff_a_b_sum) = S ((S (ff_i_b_sum)) * c)) /\ exists ff_q_b_sum_summand. b = ff_q_b_sum_summand * S ((S (ff_i_b_sum)) * c) + (ff_a_b_sum))) /\ ((((exists ff_h_b_sum_partial. ff_h_b_sum_partial + S (ff_r_b_sum) = S ((S (ff_i_b_sum)) * ff_v_b_sum)) /\ exists ff_q_b_sum_partial. ff_u_b_sum = ff_q_b_sum_partial * S ((S (ff_i_b_sum)) * ff_v_b_sum) + (ff_r_b_sum))) /\ ((((exists ff_h_b_sum_successor. ff_h_b_sum_successor + S (ff_s_b_sum) = S ((S (S ff_i_b_sum)) * ff_v_b_sum)) /\ exists ff_q_b_sum_successor. ff_u_b_sum = ff_q_b_sum_successor * S ((S (S ff_i_b_sum)) * ff_v_b_sum) + (ff_s_b_sum))) /\ ff_s_b_sum = ff_r_b_sum + ff_a_b_sum)))))) /\ (forall ff_i_b_bits. (exists ff_lt_b_bits_bound. ff_lt_b_bits_bound + S ff_i_b_bits = l) -> exists ff_bit_b_bits. ((((exists ff_h_b_bits_decoded. ff_h_b_bits_decoded + S (ff_bit_b_bits) = S ((S (ff_i_b_bits)) * c)) /\ exists ff_q_b_bits_decoded. b = ff_q_b_bits_decoded * S ((S (ff_i_b_bits)) * c) + (ff_bit_b_bits))) /\ (ff_bit_b_bits = 0 \/ ff_bit_b_bits = 1))))) -> exists h. h + n = l
use bit_count_zero
use bit_count_succ_decompose
use add_succ_left
use add_assoc
intro b
intro c
induction l
intro n
intro hcount
have hn : n = 0
specialize bit_count_zero b
specialize bit_count_zero c
specialize bit_count_zero 0
specialize bit_count_zero n
apply bit_count_zero
refl
exact hcount
exists 0
rewrite hn
rewrite PA3
refl
intro n
intro hcount
have hdecomp : exists a r. (((exists ff_h_last. ff_h_last + S (a) = S ((S (l)) * c)) /\ exists ff_q_last. b = ff_q_last * S ((S (l)) * c) + (a))) /\ ((((exists ff_u_prefix_sum ff_v_prefix_sum. ((((exists ff_h_prefix_sum_start. ff_h_prefix_sum_start + S (0) = S ((S (0)) * ff_v_prefix_sum)) /\ exists ff_q_prefix_sum_start. ff_u_prefix_sum = ff_q_prefix_sum_start * S ((S (0)) * ff_v_prefix_sum) + (0))) /\ ((((exists ff_h_prefix_sum_terminal. ff_h_prefix_sum_terminal + S (r) = S ((S (l)) * ff_v_prefix_sum)) /\ exists ff_q_prefix_sum_terminal. ff_u_prefix_sum = ff_q_prefix_sum_terminal * S ((S (l)) * ff_v_prefix_sum) + (r))) /\ forall ff_i_prefix_sum. (exists ff_lt_prefix_sum_bound. ff_lt_prefix_sum_bound + S ff_i_prefix_sum = l) -> exists ff_a_prefix_sum ff_r_prefix_sum ff_s_prefix_sum. ((((exists ff_h_prefix_sum_summand. ff_h_prefix_sum_summand + S (ff_a_prefix_sum) = S ((S (ff_i_prefix_sum)) * c)) /\ exists ff_q_prefix_sum_summand. b = ff_q_prefix_sum_summand * S ((S (ff_i_prefix_sum)) * c) + (ff_a_prefix_sum))) /\ ((((exists ff_h_prefix_sum_partial. ff_h_prefix_sum_partial + S (ff_r_prefix_sum) = S ((S (ff_i_prefix_sum)) * ff_v_prefix_sum)) /\ exists ff_q_prefix_sum_partial. ff_u_prefix_sum = ff_q_prefix_sum_partial * S ((S (ff_i_prefix_sum)) * ff_v_prefix_sum) + (ff_r_prefix_sum))) /\ ((((exists ff_h_prefix_sum_successor. ff_h_prefix_sum_successor + S (ff_s_prefix_sum) = S ((S (S ff_i_prefix_sum)) * ff_v_prefix_sum)) /\ exists ff_q_prefix_sum_successor. ff_u_prefix_sum = ff_q_prefix_sum_successor * S ((S (S ff_i_prefix_sum)) * ff_v_prefix_sum) + (ff_s_prefix_sum))) /\ ff_s_prefix_sum = ff_r_prefix_sum + ff_a_prefix_sum)))))) /\ (forall ff_i_prefix_bits. (exists ff_lt_prefix_bits_bound. ff_lt_prefix_bits_bound + S ff_i_prefix_bits = l) -> exists ff_bit_prefix_bits. ((((exists ff_h_prefix_bits_decoded. ff_h_prefix_bits_decoded + S (ff_bit_prefix_bits) = S ((S (ff_i_prefix_bits)) * c)) /\ exists ff_q_prefix_bits_decoded. b = ff_q_prefix_bits_decoded * S ((S (ff_i_prefix_bits)) * c) + (ff_bit_prefix_bits))) /\ (ff_bit_prefix_bits = 0 \/ ff_bit_prefix_bits = 1))))) /\ ((a = 0 \/ a = 1) /\ n = r + a))
specialize bit_count_succ_decompose b
specialize bit_count_succ_decompose c
specialize bit_count_succ_decompose l
specialize bit_count_succ_decompose (S l)
specialize bit_count_succ_decompose n
apply bit_count_succ_decompose
refl
exact hcount
cases hdecomp
cases hdecomp_witness
cases hdecomp_witness_witness
cases hdecomp_witness_witness_right
cases hdecomp_witness_witness_right_right
have hr : exists h. h + x1 = l
specialize IH x1
apply IH
exact hdecomp_witness_witness_right_left
cases hr
cases hdecomp_witness_witness_right_right_left
exists S x2
rewrite hdecomp_witness_witness_right_right_right
rewrite hdecomp_witness_witness_right_right_left_left
rewrite PA3
specialize add_succ_left x2
specialize add_succ_left x1
rewrite add_succ_left
congr
exact hr_witness
exists x2
rewrite hdecomp_witness_witness_right_right_right
rewrite hdecomp_witness_witness_right_right_left_right
trans (x2 + x1) + 1
symm
apply add_assoc
rewrite PA4
rewrite PA3
congr
exact hr_witness
qed
- Occurrences
- 3,987
- Distinct objects
- 1,147
- Reused references
- 45
- Depth
- 65
- Cuts
- 109
- Certificate SHA-256
53aa30ac1659…
prime_coprime_or_dividesPrime coprime or divides
Quadratic reciprocity campaign
checked
A prime is constructively either coprime to a natural or divides it.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use gcd_exists_relational
use prime_divisor_eq_one_or_self
use is_gcd_one_to_coprime
intro p
intro a
intro hp
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)
apply gcd_exists_relational
cases hg
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)
exact hg_witness
cases hg_witness
cases hg_witness_left
have hfactor : x = 1 \/ p = x
specialize prime_divisor_eq_one_or_self p
specialize prime_divisor_eq_one_or_self x
apply prime_divisor_eq_one_or_self
exact hp
exact hg_witness_left_left
cases hfactor
left
apply is_gcd_one_to_coprime
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)
rewrite <- hfactor_left
rewrite <- hfactor_left
rewrite <- hfactor_left
exact hgfull
exact hg1
right
cases hg_witness_left_right
exists x1
rewrite hfactor_right
exact hg_witness_left_right_witness
qed
- Occurrences
- 1,572
- Distinct objects
- 1,069
- Reused references
- 66
- Depth
- 47
- Cuts
- 48
- Certificate SHA-256
8d298ff62d8d…
prime_not_divides_coprimePrime not divides coprime
Quadratic reciprocity campaign
checked
A prime not dividing a natural is coprime to that natural.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use prime_coprime_or_divides
intro p
intro a
intro hp
intro hnot
specialize prime_coprime_or_divides p
specialize prime_coprime_or_divides a
have hsplit : (forall d. (exists x. p = d * x) -> (exists y. a = d * y) -> d = 1) \/ exists k. a = p * k
apply prime_coprime_or_divides
exact hp
cases hsplit
exact hsplit_left
exfalso
apply hnot
exact hsplit_right
qed
- Occurrences
- 1,588
- Distinct objects
- 1,085
- Reused references
- 66
- Depth
- 48
- Cuts
- 49
- Certificate SHA-256
cc42611e7af1…
distinct_primes_coprimeDistinct primes coprime
Quadratic reciprocity campaign
checked
Distinct primes are coprime in the expanded common-divisor relation.
Exact expanded PA statement
forall p q. (~(p = 1) /\ forall c e. p = c * e -> c = 1 \/ e = 1) -> (~(q = 1) /\ forall c e. q = c * e -> c = 1 \/ e = 1) -> ~(p = q) -> forall d. (exists x. p = d * x) -> (exists y. q = d * y) -> d = 1
Complete replay recipe: dependency imports + authored proof
pa prove forall p q. (~(p = 1) /\ forall c e. p = c * e -> c = 1 \/ e = 1) -> (~(q = 1) /\ forall c e. q = c * e -> c = 1 \/ e = 1) -> ~(p = q) -> forall d. (exists x. p = d * x) -> (exists y. q = d * y) -> d = 1
use prime_divisor_eq_one_or_self
use prime_not_divides_coprime
intro p
intro q
intro hp
intro hq
intro hpq
have hnot : ~(exists k. q = p * k)
intro hdiv
specialize prime_divisor_eq_one_or_self q
specialize prime_divisor_eq_one_or_self p
have hfactor : p = 1 \/ q = p
apply prime_divisor_eq_one_or_self
exact hq
exact hdiv
cases hfactor
cases hp
apply hp_left
exact hfactor_left
apply hpq
symm
exact hfactor_right
specialize prime_not_divides_coprime p
specialize prime_not_divides_coprime q
apply prime_not_divides_coprime
exact hp
exact hnot
qed
- Occurrences
- 1,675
- Distinct objects
- 1,115
- Reused references
- 67
- Depth
- 50
- Cuts
- 53
- Certificate SHA-256
16d0eddcf30a…
coprime_balanced_mod_inverseCoprime balanced mod inverse
Quadratic reciprocity campaign
checked
Balanced Bezout coefficients give a subtraction-free modular inverse.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use coprime_balanced_bezout
use add_assoc
intro a
intro m
intro hcop
have hbez : exists xp yp xn yn. a * xp + m * yp = 1 + (a * xn + m * yn)
specialize coprime_balanced_bezout a
specialize coprime_balanced_bezout m
apply coprime_balanced_bezout
exact hcop
cases hbez
cases hbez_witness
cases hbez_witness_witness
cases hbez_witness_witness_witness
exists x
exists x2
exists x1
exists x3
trans 1 + (a * x2 + m * x3)
exact hbez_witness_witness_witness_witness
symm
apply add_assoc
qed
- Occurrences
- 2,365
- Distinct objects
- 1,269
- Reused references
- 82
- Depth
- 49
- Cuts
- 69
- Certificate SHA-256
3b82b2213ae1…
coprime_mod_inverseCoprime mod inverse
Quadratic reciprocity campaign
checked
A nonzero modulus turns balanced Bezout data into a natural modular inverse.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use nonzero_is_succ
use coprime_balanced_mod_inverse
use mod_eq_refl
use mod_eq_add
use mod_eq_predecessor_cancel
use mod_eq_trans
use mul_add
use mul_assoc
use mul_comm
intro a
intro m
intro hm
intro hcop
have hms : exists k. m = S k
specialize nonzero_is_succ m
apply nonzero_is_succ
exact hm
have hbal : exists xp xn u v. a * xp + m * u = (1 + a * xn) + m * v
specialize coprime_balanced_mod_inverse a
specialize coprime_balanced_mod_inverse m
apply coprime_balanced_mod_inverse
exact hcop
cases hms
cases hbal
cases hbal_witness
cases hbal_witness_witness
cases hbal_witness_witness_witness
have hself : exists u v. (x * (a * x2)) + m * u = (x * (a * x2)) + m * v
specialize mod_eq_refl m
specialize mod_eq_refl (x * (a * x2))
apply mod_eq_refl
have hadd : exists u v. ((a * x1) + x * (a * x2)) + m * u = ((1 + a * x2) + x * (a * x2)) + m * v
specialize mod_eq_add m
specialize mod_eq_add (a * x1)
specialize mod_eq_add (1 + a * x2)
specialize mod_eq_add (x * (a * x2))
specialize mod_eq_add (x * (a * x2))
apply mod_eq_add
exists x3
exists x4
exact hbal_witness_witness_witness_witness
exact hself
have hcancel : exists u v. ((1 + a * x2) + x * (a * x2)) + m * u = 1 + m * v
specialize mod_eq_predecessor_cancel x
specialize mod_eq_predecessor_cancel 1
specialize mod_eq_predecessor_cancel (a * x2)
have hkcancel : exists u v. ((1 + a * x2) + x * (a * x2)) + S x * u = 1 + S x * v
apply mod_eq_predecessor_cancel
rewrite <- hms_witness at hkcancel
rewrite <- hms_witness at hkcancel
exact hkcancel
have hfinal : exists u v. ((a * x1) + x * (a * x2)) + m * u = 1 + m * v
specialize mod_eq_trans m
specialize mod_eq_trans ((a * x1) + x * (a * x2))
specialize mod_eq_trans ((1 + a * x2) + x * (a * x2))
specialize mod_eq_trans 1
apply mod_eq_trans
exact hadd
exact hcancel
have hnorm : a * (x1 + x * x2) = (a * x1) + x * (a * x2)
trans a * x1 + a * (x * x2)
apply mul_add
congr
refl
trans (a * x) * x2
symm
apply mul_assoc
trans (x * a) * x2
congr
apply mul_comm
refl
apply mul_assoc
exists x1 + x * x2
rewrite hnorm
exact hfinal
qed
- Occurrences
- 3,820
- Distinct objects
- 1,549
- Reused references
- 94
- Depth
- 51
- Cuts
- 112
- Certificate SHA-256
f60b0a6bf024…
mod_eq_cancel_coprimeMod eq cancel coprime
Quadratic reciprocity campaign
checked
A coprime factor cancels from balanced congruence at nonzero modulus.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use coprime_mod_inverse
use mod_eq_mul_right
use mod_eq_mul_left
use mod_eq_symm
use mod_eq_trans
use mul_assoc
use mul_comm
use mul_one
intro m
intro a
intro x
intro y
intro hm
intro hcop
intro hxy
have hinv : exists z u v. a * z + m * u = 1 + m * v
specialize coprime_mod_inverse a
specialize coprime_mod_inverse m
apply coprime_mod_inverse
exact hm
exact hcop
cases hinv
cases hinv_witness
cases hinv_witness_witness
have hzx : exists u v. (x * (a * x1)) + m * u = (x * 1) + m * v
specialize mod_eq_mul_left m
specialize mod_eq_mul_left (a * x1)
specialize mod_eq_mul_left 1
specialize mod_eq_mul_left x
apply mod_eq_mul_left
exists x2
exists x3
exact hinv_witness_witness_witness
have hnormx : x * (a * x1) = (a * x) * x1
trans (x * a) * x1
symm
apply mul_assoc
trans (a * x) * x1
congr
apply mul_comm
refl
refl
have honex : x * 1 = x
apply mul_one
have hxprod : exists u v. ((a * x) * x1) + m * u = x + m * v
cases hzx
cases hzx_witness
exists x4
exists x5
trans (x * (a * x1)) + m * x4
congr
symm
exact hnormx
refl
trans (x * 1) + m * x5
exact hzx_witness_witness
congr
exact honex
refl
have hxhprod : exists u v. x + m * u = ((a * x) * x1) + m * v
specialize mod_eq_symm m
specialize mod_eq_symm ((a * x) * x1)
specialize mod_eq_symm x
apply mod_eq_symm
exact hxprod
have hscaled : exists u v. ((a * x) * x1) + m * u = ((a * y) * x1) + m * v
specialize mod_eq_mul_right m
specialize mod_eq_mul_right (a * x)
specialize mod_eq_mul_right (a * y)
specialize mod_eq_mul_right x1
apply mod_eq_mul_right
exact hxy
have hzy : exists u v. (y * (a * x1)) + m * u = (y * 1) + m * v
specialize mod_eq_mul_left m
specialize mod_eq_mul_left (a * x1)
specialize mod_eq_mul_left 1
specialize mod_eq_mul_left y
apply mod_eq_mul_left
exists x2
exists x3
exact hinv_witness_witness_witness
have hnormy : y * (a * x1) = (a * y) * x1
trans (y * a) * x1
symm
apply mul_assoc
trans (a * y) * x1
congr
apply mul_comm
refl
refl
have honey : y * 1 = y
apply mul_one
have hyprod : exists u v. ((a * y) * x1) + m * u = y + m * v
cases hzy
cases hzy_witness
exists x4
exists x5
trans (y * (a * x1)) + m * x4
congr
symm
exact hnormy
refl
trans (y * 1) + m * x5
exact hzy_witness_witness
congr
exact honey
refl
have hmid : exists u v. x + m * u = ((a * y) * x1) + m * v
specialize mod_eq_trans m
specialize mod_eq_trans x
specialize mod_eq_trans ((a * x) * x1)
specialize mod_eq_trans ((a * y) * x1)
apply mod_eq_trans
exact hxhprod
exact hscaled
specialize mod_eq_trans m
specialize mod_eq_trans x
specialize mod_eq_trans ((a * y) * x1)
specialize mod_eq_trans y
apply mod_eq_trans
exact hmid
exact hyprod
qed
- Occurrences
- 5,804
- Distinct objects
- 1,762
- Reused references
- 102
- Depth
- 52
- Cuts
- 169
- Certificate SHA-256
d7a55457c6e7…
prime_mod_inversePrime mod inverse
Quadratic reciprocity campaign
checked
A nonzero residue modulo a prime has a natural modular inverse.
Exact expanded PA statement
forall p a. (~(p = 1) /\ forall c e. p = c * e -> c = 1 \/ e = 1) -> ~(exists k. a = p * k) -> exists z u v. a * z + p * u = 1 + p * v
Complete replay recipe: dependency imports + authored proof
pa prove forall p a. (~(p = 1) /\ forall c e. p = c * e -> c = 1 \/ e = 1) -> ~(exists k. a = p * k) -> exists z u v. a * z + p * u = 1 + p * v
use prime_nonzero
use prime_not_divides_coprime
use coprime_mod_inverse
intro p
intro a
intro hp
intro hnot
have hp0 : ~(p = 0)
intro hpzero
specialize prime_nonzero p
apply prime_nonzero
exact hp
exact hpzero
have hcop : forall d. (exists x. a = d * x) -> (exists y. p = d * y) -> d = 1
have hpacop : forall d. (exists x. p = d * x) -> (exists y. a = d * y) -> d = 1
specialize prime_not_divides_coprime p
specialize prime_not_divides_coprime a
apply prime_not_divides_coprime
exact hp
exact hnot
intro d
intro hda
intro hdp
specialize hpacop d
apply hpacop
exact hdp
exact hda
specialize coprime_mod_inverse a
specialize coprime_mod_inverse p
apply coprime_mod_inverse
exact hp0
exact hcop
qed
- Occurrences
- 5,491
- Distinct objects
- 1,946
- Reused references
- 118
- Depth
- 54
- Cuts
- 166
- Certificate SHA-256
84f40e5a8c10…
prime_mod_cancelPrime mod cancel
Quadratic reciprocity campaign
checked
A nonzero residue factor cancels from congruence modulo a prime.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use prime_nonzero
use prime_not_divides_coprime
use coprime_symm
use mod_eq_cancel_coprime
intro p
intro a
intro x
intro y
intro hp
intro hnot
intro hxy
have hp0 : ~(p = 0)
intro hpzero
specialize prime_nonzero p
apply prime_nonzero
exact hp
exact hpzero
have hpacop : forall d. (exists u. p = d * u) -> (exists v. a = d * v) -> d = 1
specialize prime_not_divides_coprime p
specialize prime_not_divides_coprime a
apply prime_not_divides_coprime
exact hp
exact hnot
have hapcop : forall d. (exists u. a = d * u) -> (exists v. p = d * v) -> d = 1
specialize coprime_symm p
specialize coprime_symm a
apply coprime_symm
exact hpacop
specialize mod_eq_cancel_coprime p
specialize mod_eq_cancel_coprime a
specialize mod_eq_cancel_coprime x
specialize mod_eq_cancel_coprime y
apply mod_eq_cancel_coprime
exact hp0
exact hapcop
exact hxy
qed
- Occurrences
- 7,494
- Distinct objects
- 2,178
- Reused references
- 126
- Depth
- 56
- Cuts
- 224
- Certificate SHA-256
e6fdc689812f…
factorial_existsFactorial exists
Quadratic reciprocity campaign
checked
Every natural has a beta-coded relational factorial value.
Exact expanded PA statement
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))))))))
Complete replay recipe: dependency imports + authored proof
pa prove 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))))))))
use beta_range_exists
use beta_product_exists
intro n
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)))
specialize beta_range_exists 1
specialize beta_range_exists n
exact beta_range_exists
cases hrange
cases hrange_witness
specialize beta_product_exists x
specialize beta_product_exists x1
specialize beta_product_exists n
cases beta_product_exists
cases beta_product_exists_witness
cases beta_product_exists_witness_witness
exists x2
exists x
exists x1
split
exact hrange_witness_witness
exists x3
exists x4
exact beta_product_exists_witness_witness_witness
qed
- Occurrences
- 59,841
- Distinct objects
- 4,907
- Reused references
- 241
- Depth
- 88
- Cuts
- 1,795
- Certificate SHA-256
dd6a084e8622…
factorial_functionalFactorial functional
Quadratic reciprocity campaign
checked
The beta-coded relational factorial has a unique value.
Exact expanded PA statement
forall n z w. (exists ff_b_functional_l ff_c_functional_l. ((forall ff_i_functional_l_range. (exists ff_lt_functional_l_range_bound. ff_lt_functional_l_range_bound + S ff_i_functional_l_range = n) -> (((exists ff_h_functional_l_range_decoded. ff_h_functional_l_range_decoded + S (1 + ff_i_functional_l_range) = S ((S (ff_i_functional_l_range)) * ff_c_functional_l)) /\ exists ff_q_functional_l_range_decoded. ff_b_functional_l = ff_q_functional_l_range_decoded * S ((S (ff_i_functional_l_range)) * ff_c_functional_l) + (1 + ff_i_functional_l_range)))) /\ (exists ff_u_functional_l_product ff_v_functional_l_product. ((((exists ff_h_functional_l_product_start. ff_h_functional_l_product_start + S (1) = S ((S (0)) * ff_v_functional_l_product)) /\ exists ff_q_functional_l_product_start. ff_u_functional_l_product = ff_q_functional_l_product_start * S ((S (0)) * ff_v_functional_l_product) + (1))) /\ ((((exists ff_h_functional_l_product_terminal. ff_h_functional_l_product_terminal + S (z) = S ((S (n)) * ff_v_functional_l_product)) /\ exists ff_q_functional_l_product_terminal. ff_u_functional_l_product = ff_q_functional_l_product_terminal * S ((S (n)) * ff_v_functional_l_product) + (z))) /\ forall ff_i_functional_l_product. (exists ff_lt_functional_l_product_bound. ff_lt_functional_l_product_bound + S ff_i_functional_l_product = n) -> exists ff_p_functional_l_product ff_r_functional_l_product ff_s_functional_l_product. ((((exists ff_h_functional_l_product_factor. ff_h_functional_l_product_factor + S (ff_p_functional_l_product) = S ((S (ff_i_functional_l_product)) * ff_c_functional_l)) /\ exists ff_q_functional_l_product_factor. ff_b_functional_l = ff_q_functional_l_product_factor * S ((S (ff_i_functional_l_product)) * ff_c_functional_l) + (ff_p_functional_l_product))) /\ ((((exists ff_h_functional_l_product_partial. ff_h_functional_l_product_partial + S (ff_r_functional_l_product) = S ((S (ff_i_functional_l_product)) * ff_v_functional_l_product)) /\ exists ff_q_functional_l_product_partial. ff_u_functional_l_product = ff_q_functional_l_product_partial * S ((S (ff_i_functional_l_product)) * ff_v_functional_l_product) + (ff_r_functional_l_product))) /\ ((((exists ff_h_functional_l_product_successor. ff_h_functional_l_product_successor + S (ff_s_functional_l_product) = S ((S (S ff_i_functional_l_product)) * ff_v_functional_l_product)) /\ exists ff_q_functional_l_product_successor. ff_u_functional_l_product = ff_q_functional_l_product_successor * S ((S (S ff_i_functional_l_product)) * ff_v_functional_l_product) + (ff_s_functional_l_product))) /\ ff_s_functional_l_product = ff_r_functional_l_product * ff_p_functional_l_product)))))))) -> (exists ff_b_functional_r ff_c_functional_r. ((forall ff_i_functional_r_range. (exists ff_lt_functional_r_range_bound. ff_lt_functional_r_range_bound + S ff_i_functional_r_range = n) -> (((exists ff_h_functional_r_range_decoded. ff_h_functional_r_range_decoded + S (1 + ff_i_functional_r_range) = S ((S (ff_i_functional_r_range)) * ff_c_functional_r)) /\ exists ff_q_functional_r_range_decoded. ff_b_functional_r = ff_q_functional_r_range_decoded * S ((S (ff_i_functional_r_range)) * ff_c_functional_r) + (1 + ff_i_functional_r_range)))) /\ (exists ff_u_functional_r_product ff_v_functional_r_product. ((((exists ff_h_functional_r_product_start. ff_h_functional_r_product_start + S (1) = S ((S (0)) * ff_v_functional_r_product)) /\ exists ff_q_functional_r_product_start. ff_u_functional_r_product = ff_q_functional_r_product_start * S ((S (0)) * ff_v_functional_r_product) + (1))) /\ ((((exists ff_h_functional_r_product_terminal. ff_h_functional_r_product_terminal + S (w) = S ((S (n)) * ff_v_functional_r_product)) /\ exists ff_q_functional_r_product_terminal. ff_u_functional_r_product = ff_q_functional_r_product_terminal * S ((S (n)) * ff_v_functional_r_product) + (w))) /\ forall ff_i_functional_r_product. (exists ff_lt_functional_r_product_bound. ff_lt_functional_r_product_bound + S ff_i_functional_r_product = n) -> exists ff_p_functional_r_product ff_r_functional_r_product ff_s_functional_r_product. ((((exists ff_h_functional_r_product_factor. ff_h_functional_r_product_factor + S (ff_p_functional_r_product) = S ((S (ff_i_functional_r_product)) * ff_c_functional_r)) /\ exists ff_q_functional_r_product_factor. ff_b_functional_r = ff_q_functional_r_product_factor * S ((S (ff_i_functional_r_product)) * ff_c_functional_r) + (ff_p_functional_r_product))) /\ ((((exists ff_h_functional_r_product_partial. ff_h_functional_r_product_partial + S (ff_r_functional_r_product) = S ((S (ff_i_functional_r_product)) * ff_v_functional_r_product)) /\ exists ff_q_functional_r_product_partial. ff_u_functional_r_product = ff_q_functional_r_product_partial * S ((S (ff_i_functional_r_product)) * ff_v_functional_r_product) + (ff_r_functional_r_product))) /\ ((((exists ff_h_functional_r_product_successor. ff_h_functional_r_product_successor + S (ff_s_functional_r_product) = S ((S (S ff_i_functional_r_product)) * ff_v_functional_r_product)) /\ exists ff_q_functional_r_product_successor. ff_u_functional_r_product = ff_q_functional_r_product_successor * S ((S (S ff_i_functional_r_product)) * ff_v_functional_r_product) + (ff_s_functional_r_product))) /\ ff_s_functional_r_product = ff_r_functional_r_product * ff_p_functional_r_product)))))))) -> z = w
Complete replay recipe: dependency imports + authored proof
pa prove forall n z w. (exists ff_b_functional_l ff_c_functional_l. ((forall ff_i_functional_l_range. (exists ff_lt_functional_l_range_bound. ff_lt_functional_l_range_bound + S ff_i_functional_l_range = n) -> (((exists ff_h_functional_l_range_decoded. ff_h_functional_l_range_decoded + S (1 + ff_i_functional_l_range) = S ((S (ff_i_functional_l_range)) * ff_c_functional_l)) /\ exists ff_q_functional_l_range_decoded. ff_b_functional_l = ff_q_functional_l_range_decoded * S ((S (ff_i_functional_l_range)) * ff_c_functional_l) + (1 + ff_i_functional_l_range)))) /\ (exists ff_u_functional_l_product ff_v_functional_l_product. ((((exists ff_h_functional_l_product_start. ff_h_functional_l_product_start + S (1) = S ((S (0)) * ff_v_functional_l_product)) /\ exists ff_q_functional_l_product_start. ff_u_functional_l_product = ff_q_functional_l_product_start * S ((S (0)) * ff_v_functional_l_product) + (1))) /\ ((((exists ff_h_functional_l_product_terminal. ff_h_functional_l_product_terminal + S (z) = S ((S (n)) * ff_v_functional_l_product)) /\ exists ff_q_functional_l_product_terminal. ff_u_functional_l_product = ff_q_functional_l_product_terminal * S ((S (n)) * ff_v_functional_l_product) + (z))) /\ forall ff_i_functional_l_product. (exists ff_lt_functional_l_product_bound. ff_lt_functional_l_product_bound + S ff_i_functional_l_product = n) -> exists ff_p_functional_l_product ff_r_functional_l_product ff_s_functional_l_product. ((((exists ff_h_functional_l_product_factor. ff_h_functional_l_product_factor + S (ff_p_functional_l_product) = S ((S (ff_i_functional_l_product)) * ff_c_functional_l)) /\ exists ff_q_functional_l_product_factor. ff_b_functional_l = ff_q_functional_l_product_factor * S ((S (ff_i_functional_l_product)) * ff_c_functional_l) + (ff_p_functional_l_product))) /\ ((((exists ff_h_functional_l_product_partial. ff_h_functional_l_product_partial + S (ff_r_functional_l_product) = S ((S (ff_i_functional_l_product)) * ff_v_functional_l_product)) /\ exists ff_q_functional_l_product_partial. ff_u_functional_l_product = ff_q_functional_l_product_partial * S ((S (ff_i_functional_l_product)) * ff_v_functional_l_product) + (ff_r_functional_l_product))) /\ ((((exists ff_h_functional_l_product_successor. ff_h_functional_l_product_successor + S (ff_s_functional_l_product) = S ((S (S ff_i_functional_l_product)) * ff_v_functional_l_product)) /\ exists ff_q_functional_l_product_successor. ff_u_functional_l_product = ff_q_functional_l_product_successor * S ((S (S ff_i_functional_l_product)) * ff_v_functional_l_product) + (ff_s_functional_l_product))) /\ ff_s_functional_l_product = ff_r_functional_l_product * ff_p_functional_l_product)))))))) -> (exists ff_b_functional_r ff_c_functional_r. ((forall ff_i_functional_r_range. (exists ff_lt_functional_r_range_bound. ff_lt_functional_r_range_bound + S ff_i_functional_r_range = n) -> (((exists ff_h_functional_r_range_decoded. ff_h_functional_r_range_decoded + S (1 + ff_i_functional_r_range) = S ((S (ff_i_functional_r_range)) * ff_c_functional_r)) /\ exists ff_q_functional_r_range_decoded. ff_b_functional_r = ff_q_functional_r_range_decoded * S ((S (ff_i_functional_r_range)) * ff_c_functional_r) + (1 + ff_i_functional_r_range)))) /\ (exists ff_u_functional_r_product ff_v_functional_r_product. ((((exists ff_h_functional_r_product_start. ff_h_functional_r_product_start + S (1) = S ((S (0)) * ff_v_functional_r_product)) /\ exists ff_q_functional_r_product_start. ff_u_functional_r_product = ff_q_functional_r_product_start * S ((S (0)) * ff_v_functional_r_product) + (1))) /\ ((((exists ff_h_functional_r_product_terminal. ff_h_functional_r_product_terminal + S (w) = S ((S (n)) * ff_v_functional_r_product)) /\ exists ff_q_functional_r_product_terminal. ff_u_functional_r_product = ff_q_functional_r_product_terminal * S ((S (n)) * ff_v_functional_r_product) + (w))) /\ forall ff_i_functional_r_product. (exists ff_lt_functional_r_product_bound. ff_lt_functional_r_product_bound + S ff_i_functional_r_product = n) -> exists ff_p_functional_r_product ff_r_functional_r_product ff_s_functional_r_product. ((((exists ff_h_functional_r_product_factor. ff_h_functional_r_product_factor + S (ff_p_functional_r_product) = S ((S (ff_i_functional_r_product)) * ff_c_functional_r)) /\ exists ff_q_functional_r_product_factor. ff_b_functional_r = ff_q_functional_r_product_factor * S ((S (ff_i_functional_r_product)) * ff_c_functional_r) + (ff_p_functional_r_product))) /\ ((((exists ff_h_functional_r_product_partial. ff_h_functional_r_product_partial + S (ff_r_functional_r_product) = S ((S (ff_i_functional_r_product)) * ff_v_functional_r_product)) /\ exists ff_q_functional_r_product_partial. ff_u_functional_r_product = ff_q_functional_r_product_partial * S ((S (ff_i_functional_r_product)) * ff_v_functional_r_product) + (ff_r_functional_r_product))) /\ ((((exists ff_h_functional_r_product_successor. ff_h_functional_r_product_successor + S (ff_s_functional_r_product) = S ((S (S ff_i_functional_r_product)) * ff_v_functional_r_product)) /\ exists ff_q_functional_r_product_successor. ff_u_functional_r_product = ff_q_functional_r_product_successor * S ((S (S ff_i_functional_r_product)) * ff_v_functional_r_product) + (ff_s_functional_r_product))) /\ ff_s_functional_r_product = ff_r_functional_r_product * ff_p_functional_r_product)))))))) -> z = w
use beta_range_transport_entry
use beta_product_transport_prefix
use beta_product_functional
intro n
intro z
intro w
intro hz
intro hw
cases hz
cases hz_witness
cases hz_witness_witness
cases hw
cases hw_witness
cases hw_witness_witness
have htransport : exists ff_u_factorial_transport ff_v_factorial_transport. ((((exists ff_h_factorial_transport_start. ff_h_factorial_transport_start + S (1) = S ((S (0)) * ff_v_factorial_transport)) /\ exists ff_q_factorial_transport_start. ff_u_factorial_transport = ff_q_factorial_transport_start * S ((S (0)) * ff_v_factorial_transport) + (1))) /\ ((((exists ff_h_factorial_transport_terminal. ff_h_factorial_transport_terminal + S (z) = S ((S (n)) * ff_v_factorial_transport)) /\ exists ff_q_factorial_transport_terminal. ff_u_factorial_transport = ff_q_factorial_transport_terminal * S ((S (n)) * ff_v_factorial_transport) + (z))) /\ forall ff_i_factorial_transport. (exists ff_lt_factorial_transport_bound. ff_lt_factorial_transport_bound + S ff_i_factorial_transport = n) -> exists ff_p_factorial_transport ff_r_factorial_transport ff_s_factorial_transport. ((((exists ff_h_factorial_transport_factor. ff_h_factorial_transport_factor + S (ff_p_factorial_transport) = S ((S (ff_i_factorial_transport)) * x3)) /\ exists ff_q_factorial_transport_factor. x2 = ff_q_factorial_transport_factor * S ((S (ff_i_factorial_transport)) * x3) + (ff_p_factorial_transport))) /\ ((((exists ff_h_factorial_transport_partial. ff_h_factorial_transport_partial + S (ff_r_factorial_transport) = S ((S (ff_i_factorial_transport)) * ff_v_factorial_transport)) /\ exists ff_q_factorial_transport_partial. ff_u_factorial_transport = ff_q_factorial_transport_partial * S ((S (ff_i_factorial_transport)) * ff_v_factorial_transport) + (ff_r_factorial_transport))) /\ ((((exists ff_h_factorial_transport_successor. ff_h_factorial_transport_successor + S (ff_s_factorial_transport) = S ((S (S ff_i_factorial_transport)) * ff_v_factorial_transport)) /\ exists ff_q_factorial_transport_successor. ff_u_factorial_transport = ff_q_factorial_transport_successor * S ((S (S ff_i_factorial_transport)) * ff_v_factorial_transport) + (ff_s_factorial_transport))) /\ ff_s_factorial_transport = ff_r_factorial_transport * ff_p_factorial_transport)))))
specialize beta_product_transport_prefix x
specialize beta_product_transport_prefix x1
specialize beta_product_transport_prefix x2
specialize beta_product_transport_prefix x3
specialize beta_product_transport_prefix n
specialize beta_product_transport_prefix z
apply beta_product_transport_prefix
exact hz_witness_witness_right
intro i
intro p
intro hi
intro hp
specialize beta_range_transport_entry x
specialize beta_range_transport_entry x1
specialize beta_range_transport_entry x2
specialize beta_range_transport_entry x3
specialize beta_range_transport_entry 1
specialize beta_range_transport_entry n
have hentries : forall i p. (exists h. h + S i = n) -> (((exists ff_h_factorial_transport_l. ff_h_factorial_transport_l + S (p) = S ((S (i)) * x1)) /\ exists ff_q_factorial_transport_l. x = ff_q_factorial_transport_l * S ((S (i)) * x1) + (p))) -> (((exists ff_h_factorial_transport_r. ff_h_factorial_transport_r + S (p) = S ((S (i)) * x3)) /\ exists ff_q_factorial_transport_r. x2 = ff_q_factorial_transport_r * S ((S (i)) * x3) + (p)))
apply beta_range_transport_entry
exact hz_witness_witness_left
exact hw_witness_witness_left
specialize hentries i
specialize hentries p
apply hentries
exact hi
exact hp
cases htransport
cases htransport_witness
cases hw_witness_witness_right
cases hw_witness_witness_right_witness
specialize beta_product_functional x2
specialize beta_product_functional x3
specialize beta_product_functional n
specialize beta_product_functional z
specialize beta_product_functional x4
specialize beta_product_functional x5
specialize beta_product_functional w
specialize beta_product_functional x6
specialize beta_product_functional x7
apply beta_product_functional
exact htransport_witness_witness
exact hw_witness_witness_right_witness_witness
qed
- Occurrences
- 2,704
- Distinct objects
- 1,110
- Reused references
- 40
- Depth
- 63
- Cuts
- 71
- Certificate SHA-256
53e13da0d0ce…
factorial_zeroFactorial zero
Quadratic reciprocity campaign
checked
The relational factorial of zero is one.
Exact expanded PA statement
forall n z. n = 0 -> (exists ff_b_zero ff_c_zero. ((forall ff_i_zero_range. (exists ff_lt_zero_range_bound. ff_lt_zero_range_bound + S ff_i_zero_range = n) -> (((exists ff_h_zero_range_decoded. ff_h_zero_range_decoded + S (1 + ff_i_zero_range) = S ((S (ff_i_zero_range)) * ff_c_zero)) /\ exists ff_q_zero_range_decoded. ff_b_zero = ff_q_zero_range_decoded * S ((S (ff_i_zero_range)) * ff_c_zero) + (1 + ff_i_zero_range)))) /\ (exists ff_u_zero_product ff_v_zero_product. ((((exists ff_h_zero_product_start. ff_h_zero_product_start + S (1) = S ((S (0)) * ff_v_zero_product)) /\ exists ff_q_zero_product_start. ff_u_zero_product = ff_q_zero_product_start * S ((S (0)) * ff_v_zero_product) + (1))) /\ ((((exists ff_h_zero_product_terminal. ff_h_zero_product_terminal + S (z) = S ((S (n)) * ff_v_zero_product)) /\ exists ff_q_zero_product_terminal. ff_u_zero_product = ff_q_zero_product_terminal * S ((S (n)) * ff_v_zero_product) + (z))) /\ forall ff_i_zero_product. (exists ff_lt_zero_product_bound. ff_lt_zero_product_bound + S ff_i_zero_product = n) -> exists ff_p_zero_product ff_r_zero_product ff_s_zero_product. ((((exists ff_h_zero_product_factor. ff_h_zero_product_factor + S (ff_p_zero_product) = S ((S (ff_i_zero_product)) * ff_c_zero)) /\ exists ff_q_zero_product_factor. ff_b_zero = ff_q_zero_product_factor * S ((S (ff_i_zero_product)) * ff_c_zero) + (ff_p_zero_product))) /\ ((((exists ff_h_zero_product_partial. ff_h_zero_product_partial + S (ff_r_zero_product) = S ((S (ff_i_zero_product)) * ff_v_zero_product)) /\ exists ff_q_zero_product_partial. ff_u_zero_product = ff_q_zero_product_partial * S ((S (ff_i_zero_product)) * ff_v_zero_product) + (ff_r_zero_product))) /\ ((((exists ff_h_zero_product_successor. ff_h_zero_product_successor + S (ff_s_zero_product) = S ((S (S ff_i_zero_product)) * ff_v_zero_product)) /\ exists ff_q_zero_product_successor. ff_u_zero_product = ff_q_zero_product_successor * S ((S (S ff_i_zero_product)) * ff_v_zero_product) + (ff_s_zero_product))) /\ ff_s_zero_product = ff_r_zero_product * ff_p_zero_product)))))))) -> z = 1
Complete replay recipe: dependency imports + authored proof
pa prove forall n z. n = 0 -> (exists ff_b_zero ff_c_zero. ((forall ff_i_zero_range. (exists ff_lt_zero_range_bound. ff_lt_zero_range_bound + S ff_i_zero_range = n) -> (((exists ff_h_zero_range_decoded. ff_h_zero_range_decoded + S (1 + ff_i_zero_range) = S ((S (ff_i_zero_range)) * ff_c_zero)) /\ exists ff_q_zero_range_decoded. ff_b_zero = ff_q_zero_range_decoded * S ((S (ff_i_zero_range)) * ff_c_zero) + (1 + ff_i_zero_range)))) /\ (exists ff_u_zero_product ff_v_zero_product. ((((exists ff_h_zero_product_start. ff_h_zero_product_start + S (1) = S ((S (0)) * ff_v_zero_product)) /\ exists ff_q_zero_product_start. ff_u_zero_product = ff_q_zero_product_start * S ((S (0)) * ff_v_zero_product) + (1))) /\ ((((exists ff_h_zero_product_terminal. ff_h_zero_product_terminal + S (z) = S ((S (n)) * ff_v_zero_product)) /\ exists ff_q_zero_product_terminal. ff_u_zero_product = ff_q_zero_product_terminal * S ((S (n)) * ff_v_zero_product) + (z))) /\ forall ff_i_zero_product. (exists ff_lt_zero_product_bound. ff_lt_zero_product_bound + S ff_i_zero_product = n) -> exists ff_p_zero_product ff_r_zero_product ff_s_zero_product. ((((exists ff_h_zero_product_factor. ff_h_zero_product_factor + S (ff_p_zero_product) = S ((S (ff_i_zero_product)) * ff_c_zero)) /\ exists ff_q_zero_product_factor. ff_b_zero = ff_q_zero_product_factor * S ((S (ff_i_zero_product)) * ff_c_zero) + (ff_p_zero_product))) /\ ((((exists ff_h_zero_product_partial. ff_h_zero_product_partial + S (ff_r_zero_product) = S ((S (ff_i_zero_product)) * ff_v_zero_product)) /\ exists ff_q_zero_product_partial. ff_u_zero_product = ff_q_zero_product_partial * S ((S (ff_i_zero_product)) * ff_v_zero_product) + (ff_r_zero_product))) /\ ((((exists ff_h_zero_product_successor. ff_h_zero_product_successor + S (ff_s_zero_product) = S ((S (S ff_i_zero_product)) * ff_v_zero_product)) /\ exists ff_q_zero_product_successor. ff_u_zero_product = ff_q_zero_product_successor * S ((S (S ff_i_zero_product)) * ff_v_zero_product) + (ff_s_zero_product))) /\ ff_s_zero_product = ff_r_zero_product * ff_p_zero_product)))))))) -> z = 1
use beta_product_zero
intro n
intro z
intro hn
intro hfactorial
rewrite hn at hfactorial
rewrite hn at hfactorial
rewrite hn at hfactorial
rewrite hn at hfactorial
cases hfactorial
cases hfactorial_witness
cases hfactorial_witness_witness
specialize beta_product_zero x
specialize beta_product_zero x1
specialize beta_product_zero z
apply beta_product_zero
exact hfactorial_witness_witness_right
qed
- Occurrences
- 1,223
- Distinct objects
- 794
- Reused references
- 37
- Depth
- 61
- Cuts
- 32
- Certificate SHA-256
34038cedbd37…
factorial_succ_decomposeFactorial succ decompose
Quadratic reciprocity campaign
checked
A successor factorial is its predecessor factorial times the successor.
Exact expanded PA statement
forall n sn z. sn = S n -> (exists ff_b_successor ff_c_successor. ((forall ff_i_successor_range. (exists ff_lt_successor_range_bound. ff_lt_successor_range_bound + S ff_i_successor_range = sn) -> (((exists ff_h_successor_range_decoded. ff_h_successor_range_decoded + S (1 + ff_i_successor_range) = S ((S (ff_i_successor_range)) * ff_c_successor)) /\ exists ff_q_successor_range_decoded. ff_b_successor = ff_q_successor_range_decoded * S ((S (ff_i_successor_range)) * ff_c_successor) + (1 + ff_i_successor_range)))) /\ (exists ff_u_successor_product ff_v_successor_product. ((((exists ff_h_successor_product_start. ff_h_successor_product_start + S (1) = S ((S (0)) * ff_v_successor_product)) /\ exists ff_q_successor_product_start. ff_u_successor_product = ff_q_successor_product_start * S ((S (0)) * ff_v_successor_product) + (1))) /\ ((((exists ff_h_successor_product_terminal. ff_h_successor_product_terminal + S (z) = S ((S (sn)) * ff_v_successor_product)) /\ exists ff_q_successor_product_terminal. ff_u_successor_product = ff_q_successor_product_terminal * S ((S (sn)) * ff_v_successor_product) + (z))) /\ forall ff_i_successor_product. (exists ff_lt_successor_product_bound. ff_lt_successor_product_bound + S ff_i_successor_product = sn) -> exists ff_p_successor_product ff_r_successor_product ff_s_successor_product. ((((exists ff_h_successor_product_factor. ff_h_successor_product_factor + S (ff_p_successor_product) = S ((S (ff_i_successor_product)) * ff_c_successor)) /\ exists ff_q_successor_product_factor. ff_b_successor = ff_q_successor_product_factor * S ((S (ff_i_successor_product)) * ff_c_successor) + (ff_p_successor_product))) /\ ((((exists ff_h_successor_product_partial. ff_h_successor_product_partial + S (ff_r_successor_product) = S ((S (ff_i_successor_product)) * ff_v_successor_product)) /\ exists ff_q_successor_product_partial. ff_u_successor_product = ff_q_successor_product_partial * S ((S (ff_i_successor_product)) * ff_v_successor_product) + (ff_r_successor_product))) /\ ((((exists ff_h_successor_product_successor. ff_h_successor_product_successor + S (ff_s_successor_product) = S ((S (S ff_i_successor_product)) * ff_v_successor_product)) /\ exists ff_q_successor_product_successor. ff_u_successor_product = ff_q_successor_product_successor * S ((S (S ff_i_successor_product)) * ff_v_successor_product) + (ff_s_successor_product))) /\ ff_s_successor_product = ff_r_successor_product * ff_p_successor_product)))))))) -> exists r. (exists ff_b_predecessor ff_c_predecessor. ((forall ff_i_predecessor_range. (exists ff_lt_predecessor_range_bound. ff_lt_predecessor_range_bound + S ff_i_predecessor_range = n) -> (((exists ff_h_predecessor_range_decoded. ff_h_predecessor_range_decoded + S (1 + ff_i_predecessor_range) = S ((S (ff_i_predecessor_range)) * ff_c_predecessor)) /\ exists ff_q_predecessor_range_decoded. ff_b_predecessor = ff_q_predecessor_range_decoded * S ((S (ff_i_predecessor_range)) * ff_c_predecessor) + (1 + ff_i_predecessor_range)))) /\ (exists ff_u_predecessor_product ff_v_predecessor_product. ((((exists ff_h_predecessor_product_start. ff_h_predecessor_product_start + S (1) = S ((S (0)) * ff_v_predecessor_product)) /\ exists ff_q_predecessor_product_start. ff_u_predecessor_product = ff_q_predecessor_product_start * S ((S (0)) * ff_v_predecessor_product) + (1))) /\ ((((exists ff_h_predecessor_product_terminal. ff_h_predecessor_product_terminal + S (r) = S ((S (n)) * ff_v_predecessor_product)) /\ exists ff_q_predecessor_product_terminal. ff_u_predecessor_product = ff_q_predecessor_product_terminal * S ((S (n)) * ff_v_predecessor_product) + (r))) /\ forall ff_i_predecessor_product. (exists ff_lt_predecessor_product_bound. ff_lt_predecessor_product_bound + S ff_i_predecessor_product = n) -> exists ff_p_predecessor_product ff_r_predecessor_product ff_s_predecessor_product. ((((exists ff_h_predecessor_product_factor. ff_h_predecessor_product_factor + S (ff_p_predecessor_product) = S ((S (ff_i_predecessor_product)) * ff_c_predecessor)) /\ exists ff_q_predecessor_product_factor. ff_b_predecessor = ff_q_predecessor_product_factor * S ((S (ff_i_predecessor_product)) * ff_c_predecessor) + (ff_p_predecessor_product))) /\ ((((exists ff_h_predecessor_product_partial. ff_h_predecessor_product_partial + S (ff_r_predecessor_product) = S ((S (ff_i_predecessor_product)) * ff_v_predecessor_product)) /\ exists ff_q_predecessor_product_partial. ff_u_predecessor_product = ff_q_predecessor_product_partial * S ((S (ff_i_predecessor_product)) * ff_v_predecessor_product) + (ff_r_predecessor_product))) /\ ((((exists ff_h_predecessor_product_successor. ff_h_predecessor_product_successor + S (ff_s_predecessor_product) = S ((S (S ff_i_predecessor_product)) * ff_v_predecessor_product)) /\ exists ff_q_predecessor_product_successor. ff_u_predecessor_product = ff_q_predecessor_product_successor * S ((S (S ff_i_predecessor_product)) * ff_v_predecessor_product) + (ff_s_predecessor_product))) /\ ff_s_predecessor_product = ff_r_predecessor_product * ff_p_predecessor_product)))))))) /\ z = r * S n
Complete replay recipe: dependency imports + authored proof
pa prove forall n sn z. sn = S n -> (exists ff_b_successor ff_c_successor. ((forall ff_i_successor_range. (exists ff_lt_successor_range_bound. ff_lt_successor_range_bound + S ff_i_successor_range = sn) -> (((exists ff_h_successor_range_decoded. ff_h_successor_range_decoded + S (1 + ff_i_successor_range) = S ((S (ff_i_successor_range)) * ff_c_successor)) /\ exists ff_q_successor_range_decoded. ff_b_successor = ff_q_successor_range_decoded * S ((S (ff_i_successor_range)) * ff_c_successor) + (1 + ff_i_successor_range)))) /\ (exists ff_u_successor_product ff_v_successor_product. ((((exists ff_h_successor_product_start. ff_h_successor_product_start + S (1) = S ((S (0)) * ff_v_successor_product)) /\ exists ff_q_successor_product_start. ff_u_successor_product = ff_q_successor_product_start * S ((S (0)) * ff_v_successor_product) + (1))) /\ ((((exists ff_h_successor_product_terminal. ff_h_successor_product_terminal + S (z) = S ((S (sn)) * ff_v_successor_product)) /\ exists ff_q_successor_product_terminal. ff_u_successor_product = ff_q_successor_product_terminal * S ((S (sn)) * ff_v_successor_product) + (z))) /\ forall ff_i_successor_product. (exists ff_lt_successor_product_bound. ff_lt_successor_product_bound + S ff_i_successor_product = sn) -> exists ff_p_successor_product ff_r_successor_product ff_s_successor_product. ((((exists ff_h_successor_product_factor. ff_h_successor_product_factor + S (ff_p_successor_product) = S ((S (ff_i_successor_product)) * ff_c_successor)) /\ exists ff_q_successor_product_factor. ff_b_successor = ff_q_successor_product_factor * S ((S (ff_i_successor_product)) * ff_c_successor) + (ff_p_successor_product))) /\ ((((exists ff_h_successor_product_partial. ff_h_successor_product_partial + S (ff_r_successor_product) = S ((S (ff_i_successor_product)) * ff_v_successor_product)) /\ exists ff_q_successor_product_partial. ff_u_successor_product = ff_q_successor_product_partial * S ((S (ff_i_successor_product)) * ff_v_successor_product) + (ff_r_successor_product))) /\ ((((exists ff_h_successor_product_successor. ff_h_successor_product_successor + S (ff_s_successor_product) = S ((S (S ff_i_successor_product)) * ff_v_successor_product)) /\ exists ff_q_successor_product_successor. ff_u_successor_product = ff_q_successor_product_successor * S ((S (S ff_i_successor_product)) * ff_v_successor_product) + (ff_s_successor_product))) /\ ff_s_successor_product = ff_r_successor_product * ff_p_successor_product)))))))) -> exists r. (exists ff_b_predecessor ff_c_predecessor. ((forall ff_i_predecessor_range. (exists ff_lt_predecessor_range_bound. ff_lt_predecessor_range_bound + S ff_i_predecessor_range = n) -> (((exists ff_h_predecessor_range_decoded. ff_h_predecessor_range_decoded + S (1 + ff_i_predecessor_range) = S ((S (ff_i_predecessor_range)) * ff_c_predecessor)) /\ exists ff_q_predecessor_range_decoded. ff_b_predecessor = ff_q_predecessor_range_decoded * S ((S (ff_i_predecessor_range)) * ff_c_predecessor) + (1 + ff_i_predecessor_range)))) /\ (exists ff_u_predecessor_product ff_v_predecessor_product. ((((exists ff_h_predecessor_product_start. ff_h_predecessor_product_start + S (1) = S ((S (0)) * ff_v_predecessor_product)) /\ exists ff_q_predecessor_product_start. ff_u_predecessor_product = ff_q_predecessor_product_start * S ((S (0)) * ff_v_predecessor_product) + (1))) /\ ((((exists ff_h_predecessor_product_terminal. ff_h_predecessor_product_terminal + S (r) = S ((S (n)) * ff_v_predecessor_product)) /\ exists ff_q_predecessor_product_terminal. ff_u_predecessor_product = ff_q_predecessor_product_terminal * S ((S (n)) * ff_v_predecessor_product) + (r))) /\ forall ff_i_predecessor_product. (exists ff_lt_predecessor_product_bound. ff_lt_predecessor_product_bound + S ff_i_predecessor_product = n) -> exists ff_p_predecessor_product ff_r_predecessor_product ff_s_predecessor_product. ((((exists ff_h_predecessor_product_factor. ff_h_predecessor_product_factor + S (ff_p_predecessor_product) = S ((S (ff_i_predecessor_product)) * ff_c_predecessor)) /\ exists ff_q_predecessor_product_factor. ff_b_predecessor = ff_q_predecessor_product_factor * S ((S (ff_i_predecessor_product)) * ff_c_predecessor) + (ff_p_predecessor_product))) /\ ((((exists ff_h_predecessor_product_partial. ff_h_predecessor_product_partial + S (ff_r_predecessor_product) = S ((S (ff_i_predecessor_product)) * ff_v_predecessor_product)) /\ exists ff_q_predecessor_product_partial. ff_u_predecessor_product = ff_q_predecessor_product_partial * S ((S (ff_i_predecessor_product)) * ff_v_predecessor_product) + (ff_r_predecessor_product))) /\ ((((exists ff_h_predecessor_product_successor. ff_h_predecessor_product_successor + S (ff_s_predecessor_product) = S ((S (S ff_i_predecessor_product)) * ff_v_predecessor_product)) /\ exists ff_q_predecessor_product_successor. ff_u_predecessor_product = ff_q_predecessor_product_successor * S ((S (S ff_i_predecessor_product)) * ff_v_predecessor_product) + (ff_s_predecessor_product))) /\ ff_s_predecessor_product = ff_r_predecessor_product * ff_p_predecessor_product)))))))) /\ z = r * S n
use beta_product_succ_decompose
use beta_range_entry_eq
use le_refl
use le_succ
use add_succ_left
use zero_add
intro n
intro sn
intro z
intro hsn
intro hfactorial
rewrite hsn at hfactorial
rewrite hsn at hfactorial
rewrite hsn at hfactorial
rewrite hsn at hfactorial
cases hfactorial
cases hfactorial_witness
cases hfactorial_witness_witness
have hdecomp : exists p r. (((exists ff_h_factorial_succ_factor. ff_h_factorial_succ_factor + S (p) = S ((S (n)) * x1)) /\ exists ff_q_factorial_succ_factor. x = ff_q_factorial_succ_factor * S ((S (n)) * x1) + (p))) /\ ((exists ff_u_factorial_succ_prefix ff_v_factorial_succ_prefix. ((((exists ff_h_factorial_succ_prefix_start. ff_h_factorial_succ_prefix_start + S (1) = S ((S (0)) * ff_v_factorial_succ_prefix)) /\ exists ff_q_factorial_succ_prefix_start. ff_u_factorial_succ_prefix = ff_q_factorial_succ_prefix_start * S ((S (0)) * ff_v_factorial_succ_prefix) + (1))) /\ ((((exists ff_h_factorial_succ_prefix_terminal. ff_h_factorial_succ_prefix_terminal + S (r) = S ((S (n)) * ff_v_factorial_succ_prefix)) /\ exists ff_q_factorial_succ_prefix_terminal. ff_u_factorial_succ_prefix = ff_q_factorial_succ_prefix_terminal * S ((S (n)) * ff_v_factorial_succ_prefix) + (r))) /\ forall ff_i_factorial_succ_prefix. (exists ff_lt_factorial_succ_prefix_bound. ff_lt_factorial_succ_prefix_bound + S ff_i_factorial_succ_prefix = n) -> exists ff_p_factorial_succ_prefix ff_r_factorial_succ_prefix ff_s_factorial_succ_prefix. ((((exists ff_h_factorial_succ_prefix_factor. ff_h_factorial_succ_prefix_factor + S (ff_p_factorial_succ_prefix) = S ((S (ff_i_factorial_succ_prefix)) * x1)) /\ exists ff_q_factorial_succ_prefix_factor. x = ff_q_factorial_succ_prefix_factor * S ((S (ff_i_factorial_succ_prefix)) * x1) + (ff_p_factorial_succ_prefix))) /\ ((((exists ff_h_factorial_succ_prefix_partial. ff_h_factorial_succ_prefix_partial + S (ff_r_factorial_succ_prefix) = S ((S (ff_i_factorial_succ_prefix)) * ff_v_factorial_succ_prefix)) /\ exists ff_q_factorial_succ_prefix_partial. ff_u_factorial_succ_prefix = ff_q_factorial_succ_prefix_partial * S ((S (ff_i_factorial_succ_prefix)) * ff_v_factorial_succ_prefix) + (ff_r_factorial_succ_prefix))) /\ ((((exists ff_h_factorial_succ_prefix_successor. ff_h_factorial_succ_prefix_successor + S (ff_s_factorial_succ_prefix) = S ((S (S ff_i_factorial_succ_prefix)) * ff_v_factorial_succ_prefix)) /\ exists ff_q_factorial_succ_prefix_successor. ff_u_factorial_succ_prefix = ff_q_factorial_succ_prefix_successor * S ((S (S ff_i_factorial_succ_prefix)) * ff_v_factorial_succ_prefix) + (ff_s_factorial_succ_prefix))) /\ ff_s_factorial_succ_prefix = ff_r_factorial_succ_prefix * ff_p_factorial_succ_prefix)))))) /\ z = r * p)
specialize beta_product_succ_decompose x
specialize beta_product_succ_decompose x1
specialize beta_product_succ_decompose n
specialize beta_product_succ_decompose z
apply beta_product_succ_decompose
exact hfactorial_witness_witness_right
cases hdecomp
cases hdecomp_witness
cases hdecomp_witness_witness
cases hdecomp_witness_witness_right
have hp : x2 = 1 + n
specialize beta_range_entry_eq x
specialize beta_range_entry_eq x1
specialize beta_range_entry_eq 1
specialize beta_range_entry_eq (S n)
specialize beta_range_entry_eq n
specialize beta_range_entry_eq x2
apply beta_range_entry_eq
exact hfactorial_witness_witness_left
specialize le_refl (S n)
exact le_refl
exact hdecomp_witness_witness_left
exists x3
split
exists x
exists x1
split
intro i
intro hi
specialize hfactorial_witness_witness_left i
apply hfactorial_witness_witness_left
specialize le_succ (S i)
specialize le_succ n
apply le_succ
exact hi
exact hdecomp_witness_witness_right_left
trans x3 * x2
exact hdecomp_witness_witness_right_right
rewrite hp
congr
refl
specialize add_succ_left 0
specialize add_succ_left n
trans S (0 + n)
exact add_succ_left
congr
apply zero_add
qed
- Occurrences
- 2,594
- Distinct objects
- 891
- Reused references
- 44
- Depth
- 63
- Cuts
- 74
- Certificate SHA-256
8e876f042ad4…
pow_one_from_zero_successorPow one from zero successor
Quadratic reciprocity campaign
checked
A successor of a zero exponent gives the relational first power.
Exact expanded PA statement
forall a z e n. z = 0 -> e = S z -> (exists ff_b_one_carrier ff_c_one_carrier. ((forall ff_i_one_carrier_repeat. (exists ff_lt_one_carrier_repeat_bound. ff_lt_one_carrier_repeat_bound + S ff_i_one_carrier_repeat = e) -> (((exists ff_h_one_carrier_repeat_decoded. ff_h_one_carrier_repeat_decoded + S (a) = S ((S (ff_i_one_carrier_repeat)) * ff_c_one_carrier)) /\ exists ff_q_one_carrier_repeat_decoded. ff_b_one_carrier = ff_q_one_carrier_repeat_decoded * S ((S (ff_i_one_carrier_repeat)) * ff_c_one_carrier) + (a)))) /\ (exists ff_u_one_carrier_product ff_v_one_carrier_product. ((((exists ff_h_one_carrier_product_start. ff_h_one_carrier_product_start + S (1) = S ((S (0)) * ff_v_one_carrier_product)) /\ exists ff_q_one_carrier_product_start. ff_u_one_carrier_product = ff_q_one_carrier_product_start * S ((S (0)) * ff_v_one_carrier_product) + (1))) /\ ((((exists ff_h_one_carrier_product_terminal. ff_h_one_carrier_product_terminal + S (n) = S ((S (e)) * ff_v_one_carrier_product)) /\ exists ff_q_one_carrier_product_terminal. ff_u_one_carrier_product = ff_q_one_carrier_product_terminal * S ((S (e)) * ff_v_one_carrier_product) + (n))) /\ forall ff_i_one_carrier_product. (exists ff_lt_one_carrier_product_bound. ff_lt_one_carrier_product_bound + S ff_i_one_carrier_product = e) -> exists ff_p_one_carrier_product ff_r_one_carrier_product ff_s_one_carrier_product. ((((exists ff_h_one_carrier_product_factor. ff_h_one_carrier_product_factor + S (ff_p_one_carrier_product) = S ((S (ff_i_one_carrier_product)) * ff_c_one_carrier)) /\ exists ff_q_one_carrier_product_factor. ff_b_one_carrier = ff_q_one_carrier_product_factor * S ((S (ff_i_one_carrier_product)) * ff_c_one_carrier) + (ff_p_one_carrier_product))) /\ ((((exists ff_h_one_carrier_product_partial. ff_h_one_carrier_product_partial + S (ff_r_one_carrier_product) = S ((S (ff_i_one_carrier_product)) * ff_v_one_carrier_product)) /\ exists ff_q_one_carrier_product_partial. ff_u_one_carrier_product = ff_q_one_carrier_product_partial * S ((S (ff_i_one_carrier_product)) * ff_v_one_carrier_product) + (ff_r_one_carrier_product))) /\ ((((exists ff_h_one_carrier_product_successor. ff_h_one_carrier_product_successor + S (ff_s_one_carrier_product) = S ((S (S ff_i_one_carrier_product)) * ff_v_one_carrier_product)) /\ exists ff_q_one_carrier_product_successor. ff_u_one_carrier_product = ff_q_one_carrier_product_successor * S ((S (S ff_i_one_carrier_product)) * ff_v_one_carrier_product) + (ff_s_one_carrier_product))) /\ ff_s_one_carrier_product = ff_r_one_carrier_product * ff_p_one_carrier_product)))))))) -> n = a
Complete replay recipe: dependency imports + authored proof
pa prove forall a z e n. z = 0 -> e = S z -> (exists ff_b_one_carrier ff_c_one_carrier. ((forall ff_i_one_carrier_repeat. (exists ff_lt_one_carrier_repeat_bound. ff_lt_one_carrier_repeat_bound + S ff_i_one_carrier_repeat = e) -> (((exists ff_h_one_carrier_repeat_decoded. ff_h_one_carrier_repeat_decoded + S (a) = S ((S (ff_i_one_carrier_repeat)) * ff_c_one_carrier)) /\ exists ff_q_one_carrier_repeat_decoded. ff_b_one_carrier = ff_q_one_carrier_repeat_decoded * S ((S (ff_i_one_carrier_repeat)) * ff_c_one_carrier) + (a)))) /\ (exists ff_u_one_carrier_product ff_v_one_carrier_product. ((((exists ff_h_one_carrier_product_start. ff_h_one_carrier_product_start + S (1) = S ((S (0)) * ff_v_one_carrier_product)) /\ exists ff_q_one_carrier_product_start. ff_u_one_carrier_product = ff_q_one_carrier_product_start * S ((S (0)) * ff_v_one_carrier_product) + (1))) /\ ((((exists ff_h_one_carrier_product_terminal. ff_h_one_carrier_product_terminal + S (n) = S ((S (e)) * ff_v_one_carrier_product)) /\ exists ff_q_one_carrier_product_terminal. ff_u_one_carrier_product = ff_q_one_carrier_product_terminal * S ((S (e)) * ff_v_one_carrier_product) + (n))) /\ forall ff_i_one_carrier_product. (exists ff_lt_one_carrier_product_bound. ff_lt_one_carrier_product_bound + S ff_i_one_carrier_product = e) -> exists ff_p_one_carrier_product ff_r_one_carrier_product ff_s_one_carrier_product. ((((exists ff_h_one_carrier_product_factor. ff_h_one_carrier_product_factor + S (ff_p_one_carrier_product) = S ((S (ff_i_one_carrier_product)) * ff_c_one_carrier)) /\ exists ff_q_one_carrier_product_factor. ff_b_one_carrier = ff_q_one_carrier_product_factor * S ((S (ff_i_one_carrier_product)) * ff_c_one_carrier) + (ff_p_one_carrier_product))) /\ ((((exists ff_h_one_carrier_product_partial. ff_h_one_carrier_product_partial + S (ff_r_one_carrier_product) = S ((S (ff_i_one_carrier_product)) * ff_v_one_carrier_product)) /\ exists ff_q_one_carrier_product_partial. ff_u_one_carrier_product = ff_q_one_carrier_product_partial * S ((S (ff_i_one_carrier_product)) * ff_v_one_carrier_product) + (ff_r_one_carrier_product))) /\ ((((exists ff_h_one_carrier_product_successor. ff_h_one_carrier_product_successor + S (ff_s_one_carrier_product) = S ((S (S ff_i_one_carrier_product)) * ff_v_one_carrier_product)) /\ exists ff_q_one_carrier_product_successor. ff_u_one_carrier_product = ff_q_one_carrier_product_successor * S ((S (S ff_i_one_carrier_product)) * ff_v_one_carrier_product) + (ff_s_one_carrier_product))) /\ ff_s_one_carrier_product = ff_r_one_carrier_product * ff_p_one_carrier_product)))))))) -> n = a
use pow_successor_decompose
use pow_zero
use one_mul
intro a
intro z
intro e
intro n
intro hz
intro he
intro hpow
have hstep : exists r. (exists ff_b_one_predecessor ff_c_one_predecessor. ((forall ff_i_one_predecessor_repeat. (exists ff_lt_one_predecessor_repeat_bound. ff_lt_one_predecessor_repeat_bound + S ff_i_one_predecessor_repeat = z) -> (((exists ff_h_one_predecessor_repeat_decoded. ff_h_one_predecessor_repeat_decoded + S (a) = S ((S (ff_i_one_predecessor_repeat)) * ff_c_one_predecessor)) /\ exists ff_q_one_predecessor_repeat_decoded. ff_b_one_predecessor = ff_q_one_predecessor_repeat_decoded * S ((S (ff_i_one_predecessor_repeat)) * ff_c_one_predecessor) + (a)))) /\ (exists ff_u_one_predecessor_product ff_v_one_predecessor_product. ((((exists ff_h_one_predecessor_product_start. ff_h_one_predecessor_product_start + S (1) = S ((S (0)) * ff_v_one_predecessor_product)) /\ exists ff_q_one_predecessor_product_start. ff_u_one_predecessor_product = ff_q_one_predecessor_product_start * S ((S (0)) * ff_v_one_predecessor_product) + (1))) /\ ((((exists ff_h_one_predecessor_product_terminal. ff_h_one_predecessor_product_terminal + S (r) = S ((S (z)) * ff_v_one_predecessor_product)) /\ exists ff_q_one_predecessor_product_terminal. ff_u_one_predecessor_product = ff_q_one_predecessor_product_terminal * S ((S (z)) * ff_v_one_predecessor_product) + (r))) /\ forall ff_i_one_predecessor_product. (exists ff_lt_one_predecessor_product_bound. ff_lt_one_predecessor_product_bound + S ff_i_one_predecessor_product = z) -> exists ff_p_one_predecessor_product ff_r_one_predecessor_product ff_s_one_predecessor_product. ((((exists ff_h_one_predecessor_product_factor. ff_h_one_predecessor_product_factor + S (ff_p_one_predecessor_product) = S ((S (ff_i_one_predecessor_product)) * ff_c_one_predecessor)) /\ exists ff_q_one_predecessor_product_factor. ff_b_one_predecessor = ff_q_one_predecessor_product_factor * S ((S (ff_i_one_predecessor_product)) * ff_c_one_predecessor) + (ff_p_one_predecessor_product))) /\ ((((exists ff_h_one_predecessor_product_partial. ff_h_one_predecessor_product_partial + S (ff_r_one_predecessor_product) = S ((S (ff_i_one_predecessor_product)) * ff_v_one_predecessor_product)) /\ exists ff_q_one_predecessor_product_partial. ff_u_one_predecessor_product = ff_q_one_predecessor_product_partial * S ((S (ff_i_one_predecessor_product)) * ff_v_one_predecessor_product) + (ff_r_one_predecessor_product))) /\ ((((exists ff_h_one_predecessor_product_successor. ff_h_one_predecessor_product_successor + S (ff_s_one_predecessor_product) = S ((S (S ff_i_one_predecessor_product)) * ff_v_one_predecessor_product)) /\ exists ff_q_one_predecessor_product_successor. ff_u_one_predecessor_product = ff_q_one_predecessor_product_successor * S ((S (S ff_i_one_predecessor_product)) * ff_v_one_predecessor_product) + (ff_s_one_predecessor_product))) /\ ff_s_one_predecessor_product = ff_r_one_predecessor_product * ff_p_one_predecessor_product)))))))) /\ n = r * a
specialize pow_successor_decompose a
specialize pow_successor_decompose z
specialize pow_successor_decompose e
specialize pow_successor_decompose n
apply pow_successor_decompose
exact he
exact hpow
cases hstep
cases hstep_witness
have hr : x = 1
specialize pow_zero a
specialize pow_zero z
specialize pow_zero x
apply pow_zero
exact hz
exact hstep_witness_left
trans x * a
exact hstep_witness_right
rewrite hr
specialize one_mul a
exact one_mul
qed
- Occurrences
- 3,827
- Distinct objects
- 1,043
- Reused references
- 47
- Depth
- 64
- Cuts
- 107
- Certificate SHA-256
d709c0bb9f53…
pow_onePow one
Quadratic reciprocity campaign
checked
The relational first power of a natural is the natural itself.
Exact expanded PA statement
forall a e n. e = 1 -> (exists ff_b_one ff_c_one. ((forall ff_i_one_repeat. (exists ff_lt_one_repeat_bound. ff_lt_one_repeat_bound + S ff_i_one_repeat = e) -> (((exists ff_h_one_repeat_decoded. ff_h_one_repeat_decoded + S (a) = S ((S (ff_i_one_repeat)) * ff_c_one)) /\ exists ff_q_one_repeat_decoded. ff_b_one = ff_q_one_repeat_decoded * S ((S (ff_i_one_repeat)) * ff_c_one) + (a)))) /\ (exists ff_u_one_product ff_v_one_product. ((((exists ff_h_one_product_start. ff_h_one_product_start + S (1) = S ((S (0)) * ff_v_one_product)) /\ exists ff_q_one_product_start. ff_u_one_product = ff_q_one_product_start * S ((S (0)) * ff_v_one_product) + (1))) /\ ((((exists ff_h_one_product_terminal. ff_h_one_product_terminal + S (n) = S ((S (e)) * ff_v_one_product)) /\ exists ff_q_one_product_terminal. ff_u_one_product = ff_q_one_product_terminal * S ((S (e)) * ff_v_one_product) + (n))) /\ forall ff_i_one_product. (exists ff_lt_one_product_bound. ff_lt_one_product_bound + S ff_i_one_product = e) -> exists ff_p_one_product ff_r_one_product ff_s_one_product. ((((exists ff_h_one_product_factor. ff_h_one_product_factor + S (ff_p_one_product) = S ((S (ff_i_one_product)) * ff_c_one)) /\ exists ff_q_one_product_factor. ff_b_one = ff_q_one_product_factor * S ((S (ff_i_one_product)) * ff_c_one) + (ff_p_one_product))) /\ ((((exists ff_h_one_product_partial. ff_h_one_product_partial + S (ff_r_one_product) = S ((S (ff_i_one_product)) * ff_v_one_product)) /\ exists ff_q_one_product_partial. ff_u_one_product = ff_q_one_product_partial * S ((S (ff_i_one_product)) * ff_v_one_product) + (ff_r_one_product))) /\ ((((exists ff_h_one_product_successor. ff_h_one_product_successor + S (ff_s_one_product) = S ((S (S ff_i_one_product)) * ff_v_one_product)) /\ exists ff_q_one_product_successor. ff_u_one_product = ff_q_one_product_successor * S ((S (S ff_i_one_product)) * ff_v_one_product) + (ff_s_one_product))) /\ ff_s_one_product = ff_r_one_product * ff_p_one_product)))))))) -> n = a
Complete replay recipe: dependency imports + authored proof
pa prove forall a e n. e = 1 -> (exists ff_b_one ff_c_one. ((forall ff_i_one_repeat. (exists ff_lt_one_repeat_bound. ff_lt_one_repeat_bound + S ff_i_one_repeat = e) -> (((exists ff_h_one_repeat_decoded. ff_h_one_repeat_decoded + S (a) = S ((S (ff_i_one_repeat)) * ff_c_one)) /\ exists ff_q_one_repeat_decoded. ff_b_one = ff_q_one_repeat_decoded * S ((S (ff_i_one_repeat)) * ff_c_one) + (a)))) /\ (exists ff_u_one_product ff_v_one_product. ((((exists ff_h_one_product_start. ff_h_one_product_start + S (1) = S ((S (0)) * ff_v_one_product)) /\ exists ff_q_one_product_start. ff_u_one_product = ff_q_one_product_start * S ((S (0)) * ff_v_one_product) + (1))) /\ ((((exists ff_h_one_product_terminal. ff_h_one_product_terminal + S (n) = S ((S (e)) * ff_v_one_product)) /\ exists ff_q_one_product_terminal. ff_u_one_product = ff_q_one_product_terminal * S ((S (e)) * ff_v_one_product) + (n))) /\ forall ff_i_one_product. (exists ff_lt_one_product_bound. ff_lt_one_product_bound + S ff_i_one_product = e) -> exists ff_p_one_product ff_r_one_product ff_s_one_product. ((((exists ff_h_one_product_factor. ff_h_one_product_factor + S (ff_p_one_product) = S ((S (ff_i_one_product)) * ff_c_one)) /\ exists ff_q_one_product_factor. ff_b_one = ff_q_one_product_factor * S ((S (ff_i_one_product)) * ff_c_one) + (ff_p_one_product))) /\ ((((exists ff_h_one_product_partial. ff_h_one_product_partial + S (ff_r_one_product) = S ((S (ff_i_one_product)) * ff_v_one_product)) /\ exists ff_q_one_product_partial. ff_u_one_product = ff_q_one_product_partial * S ((S (ff_i_one_product)) * ff_v_one_product) + (ff_r_one_product))) /\ ((((exists ff_h_one_product_successor. ff_h_one_product_successor + S (ff_s_one_product) = S ((S (S ff_i_one_product)) * ff_v_one_product)) /\ exists ff_q_one_product_successor. ff_u_one_product = ff_q_one_product_successor * S ((S (S ff_i_one_product)) * ff_v_one_product) + (ff_s_one_product))) /\ ff_s_one_product = ff_r_one_product * ff_p_one_product)))))))) -> n = a
use pow_one_from_zero_successor
intro a
intro e
intro n
intro he
intro hpow
specialize pow_one_from_zero_successor a
specialize pow_one_from_zero_successor 0
specialize pow_one_from_zero_successor e
specialize pow_one_from_zero_successor n
apply pow_one_from_zero_successor
refl
exact he
exact hpow
qed
- Occurrences
- 3,856
- Distinct objects
- 1,072
- Reused references
- 47
- Depth
- 65
- Cuts
- 108
- Certificate SHA-256
16491d90b740…
pow_successor_pair_mulPow successor pair mul
Quadratic reciprocity campaign
checked
A successor power paired with its predecessor equals predecessor times base.
Exact expanded PA statement
forall a e se r n. se = S e -> (exists ff_b_pair_predecessor ff_c_pair_predecessor. ((forall ff_i_pair_predecessor_repeat. (exists ff_lt_pair_predecessor_repeat_bound. ff_lt_pair_predecessor_repeat_bound + S ff_i_pair_predecessor_repeat = e) -> (((exists ff_h_pair_predecessor_repeat_decoded. ff_h_pair_predecessor_repeat_decoded + S (a) = S ((S (ff_i_pair_predecessor_repeat)) * ff_c_pair_predecessor)) /\ exists ff_q_pair_predecessor_repeat_decoded. ff_b_pair_predecessor = ff_q_pair_predecessor_repeat_decoded * S ((S (ff_i_pair_predecessor_repeat)) * ff_c_pair_predecessor) + (a)))) /\ (exists ff_u_pair_predecessor_product ff_v_pair_predecessor_product. ((((exists ff_h_pair_predecessor_product_start. ff_h_pair_predecessor_product_start + S (1) = S ((S (0)) * ff_v_pair_predecessor_product)) /\ exists ff_q_pair_predecessor_product_start. ff_u_pair_predecessor_product = ff_q_pair_predecessor_product_start * S ((S (0)) * ff_v_pair_predecessor_product) + (1))) /\ ((((exists ff_h_pair_predecessor_product_terminal. ff_h_pair_predecessor_product_terminal + S (r) = S ((S (e)) * ff_v_pair_predecessor_product)) /\ exists ff_q_pair_predecessor_product_terminal. ff_u_pair_predecessor_product = ff_q_pair_predecessor_product_terminal * S ((S (e)) * ff_v_pair_predecessor_product) + (r))) /\ forall ff_i_pair_predecessor_product. (exists ff_lt_pair_predecessor_product_bound. ff_lt_pair_predecessor_product_bound + S ff_i_pair_predecessor_product = e) -> exists ff_p_pair_predecessor_product ff_r_pair_predecessor_product ff_s_pair_predecessor_product. ((((exists ff_h_pair_predecessor_product_factor. ff_h_pair_predecessor_product_factor + S (ff_p_pair_predecessor_product) = S ((S (ff_i_pair_predecessor_product)) * ff_c_pair_predecessor)) /\ exists ff_q_pair_predecessor_product_factor. ff_b_pair_predecessor = ff_q_pair_predecessor_product_factor * S ((S (ff_i_pair_predecessor_product)) * ff_c_pair_predecessor) + (ff_p_pair_predecessor_product))) /\ ((((exists ff_h_pair_predecessor_product_partial. ff_h_pair_predecessor_product_partial + S (ff_r_pair_predecessor_product) = S ((S (ff_i_pair_predecessor_product)) * ff_v_pair_predecessor_product)) /\ exists ff_q_pair_predecessor_product_partial. ff_u_pair_predecessor_product = ff_q_pair_predecessor_product_partial * S ((S (ff_i_pair_predecessor_product)) * ff_v_pair_predecessor_product) + (ff_r_pair_predecessor_product))) /\ ((((exists ff_h_pair_predecessor_product_successor. ff_h_pair_predecessor_product_successor + S (ff_s_pair_predecessor_product) = S ((S (S ff_i_pair_predecessor_product)) * ff_v_pair_predecessor_product)) /\ exists ff_q_pair_predecessor_product_successor. ff_u_pair_predecessor_product = ff_q_pair_predecessor_product_successor * S ((S (S ff_i_pair_predecessor_product)) * ff_v_pair_predecessor_product) + (ff_s_pair_predecessor_product))) /\ ff_s_pair_predecessor_product = ff_r_pair_predecessor_product * ff_p_pair_predecessor_product)))))))) -> (exists ff_b_pair_successor ff_c_pair_successor. ((forall ff_i_pair_successor_repeat. (exists ff_lt_pair_successor_repeat_bound. ff_lt_pair_successor_repeat_bound + S ff_i_pair_successor_repeat = se) -> (((exists ff_h_pair_successor_repeat_decoded. ff_h_pair_successor_repeat_decoded + S (a) = S ((S (ff_i_pair_successor_repeat)) * ff_c_pair_successor)) /\ exists ff_q_pair_successor_repeat_decoded. ff_b_pair_successor = ff_q_pair_successor_repeat_decoded * S ((S (ff_i_pair_successor_repeat)) * ff_c_pair_successor) + (a)))) /\ (exists ff_u_pair_successor_product ff_v_pair_successor_product. ((((exists ff_h_pair_successor_product_start. ff_h_pair_successor_product_start + S (1) = S ((S (0)) * ff_v_pair_successor_product)) /\ exists ff_q_pair_successor_product_start. ff_u_pair_successor_product = ff_q_pair_successor_product_start * S ((S (0)) * ff_v_pair_successor_product) + (1))) /\ ((((exists ff_h_pair_successor_product_terminal. ff_h_pair_successor_product_terminal + S (n) = S ((S (se)) * ff_v_pair_successor_product)) /\ exists ff_q_pair_successor_product_terminal. ff_u_pair_successor_product = ff_q_pair_successor_product_terminal * S ((S (se)) * ff_v_pair_successor_product) + (n))) /\ forall ff_i_pair_successor_product. (exists ff_lt_pair_successor_product_bound. ff_lt_pair_successor_product_bound + S ff_i_pair_successor_product = se) -> exists ff_p_pair_successor_product ff_r_pair_successor_product ff_s_pair_successor_product. ((((exists ff_h_pair_successor_product_factor. ff_h_pair_successor_product_factor + S (ff_p_pair_successor_product) = S ((S (ff_i_pair_successor_product)) * ff_c_pair_successor)) /\ exists ff_q_pair_successor_product_factor. ff_b_pair_successor = ff_q_pair_successor_product_factor * S ((S (ff_i_pair_successor_product)) * ff_c_pair_successor) + (ff_p_pair_successor_product))) /\ ((((exists ff_h_pair_successor_product_partial. ff_h_pair_successor_product_partial + S (ff_r_pair_successor_product) = S ((S (ff_i_pair_successor_product)) * ff_v_pair_successor_product)) /\ exists ff_q_pair_successor_product_partial. ff_u_pair_successor_product = ff_q_pair_successor_product_partial * S ((S (ff_i_pair_successor_product)) * ff_v_pair_successor_product) + (ff_r_pair_successor_product))) /\ ((((exists ff_h_pair_successor_product_successor. ff_h_pair_successor_product_successor + S (ff_s_pair_successor_product) = S ((S (S ff_i_pair_successor_product)) * ff_v_pair_successor_product)) /\ exists ff_q_pair_successor_product_successor. ff_u_pair_successor_product = ff_q_pair_successor_product_successor * S ((S (S ff_i_pair_successor_product)) * ff_v_pair_successor_product) + (ff_s_pair_successor_product))) /\ ff_s_pair_successor_product = ff_r_pair_successor_product * ff_p_pair_successor_product)))))))) -> n = r * a
Complete replay recipe: dependency imports + authored proof
pa prove forall a e se r n. se = S e -> (exists ff_b_pair_predecessor ff_c_pair_predecessor. ((forall ff_i_pair_predecessor_repeat. (exists ff_lt_pair_predecessor_repeat_bound. ff_lt_pair_predecessor_repeat_bound + S ff_i_pair_predecessor_repeat = e) -> (((exists ff_h_pair_predecessor_repeat_decoded. ff_h_pair_predecessor_repeat_decoded + S (a) = S ((S (ff_i_pair_predecessor_repeat)) * ff_c_pair_predecessor)) /\ exists ff_q_pair_predecessor_repeat_decoded. ff_b_pair_predecessor = ff_q_pair_predecessor_repeat_decoded * S ((S (ff_i_pair_predecessor_repeat)) * ff_c_pair_predecessor) + (a)))) /\ (exists ff_u_pair_predecessor_product ff_v_pair_predecessor_product. ((((exists ff_h_pair_predecessor_product_start. ff_h_pair_predecessor_product_start + S (1) = S ((S (0)) * ff_v_pair_predecessor_product)) /\ exists ff_q_pair_predecessor_product_start. ff_u_pair_predecessor_product = ff_q_pair_predecessor_product_start * S ((S (0)) * ff_v_pair_predecessor_product) + (1))) /\ ((((exists ff_h_pair_predecessor_product_terminal. ff_h_pair_predecessor_product_terminal + S (r) = S ((S (e)) * ff_v_pair_predecessor_product)) /\ exists ff_q_pair_predecessor_product_terminal. ff_u_pair_predecessor_product = ff_q_pair_predecessor_product_terminal * S ((S (e)) * ff_v_pair_predecessor_product) + (r))) /\ forall ff_i_pair_predecessor_product. (exists ff_lt_pair_predecessor_product_bound. ff_lt_pair_predecessor_product_bound + S ff_i_pair_predecessor_product = e) -> exists ff_p_pair_predecessor_product ff_r_pair_predecessor_product ff_s_pair_predecessor_product. ((((exists ff_h_pair_predecessor_product_factor. ff_h_pair_predecessor_product_factor + S (ff_p_pair_predecessor_product) = S ((S (ff_i_pair_predecessor_product)) * ff_c_pair_predecessor)) /\ exists ff_q_pair_predecessor_product_factor. ff_b_pair_predecessor = ff_q_pair_predecessor_product_factor * S ((S (ff_i_pair_predecessor_product)) * ff_c_pair_predecessor) + (ff_p_pair_predecessor_product))) /\ ((((exists ff_h_pair_predecessor_product_partial. ff_h_pair_predecessor_product_partial + S (ff_r_pair_predecessor_product) = S ((S (ff_i_pair_predecessor_product)) * ff_v_pair_predecessor_product)) /\ exists ff_q_pair_predecessor_product_partial. ff_u_pair_predecessor_product = ff_q_pair_predecessor_product_partial * S ((S (ff_i_pair_predecessor_product)) * ff_v_pair_predecessor_product) + (ff_r_pair_predecessor_product))) /\ ((((exists ff_h_pair_predecessor_product_successor. ff_h_pair_predecessor_product_successor + S (ff_s_pair_predecessor_product) = S ((S (S ff_i_pair_predecessor_product)) * ff_v_pair_predecessor_product)) /\ exists ff_q_pair_predecessor_product_successor. ff_u_pair_predecessor_product = ff_q_pair_predecessor_product_successor * S ((S (S ff_i_pair_predecessor_product)) * ff_v_pair_predecessor_product) + (ff_s_pair_predecessor_product))) /\ ff_s_pair_predecessor_product = ff_r_pair_predecessor_product * ff_p_pair_predecessor_product)))))))) -> (exists ff_b_pair_successor ff_c_pair_successor. ((forall ff_i_pair_successor_repeat. (exists ff_lt_pair_successor_repeat_bound. ff_lt_pair_successor_repeat_bound + S ff_i_pair_successor_repeat = se) -> (((exists ff_h_pair_successor_repeat_decoded. ff_h_pair_successor_repeat_decoded + S (a) = S ((S (ff_i_pair_successor_repeat)) * ff_c_pair_successor)) /\ exists ff_q_pair_successor_repeat_decoded. ff_b_pair_successor = ff_q_pair_successor_repeat_decoded * S ((S (ff_i_pair_successor_repeat)) * ff_c_pair_successor) + (a)))) /\ (exists ff_u_pair_successor_product ff_v_pair_successor_product. ((((exists ff_h_pair_successor_product_start. ff_h_pair_successor_product_start + S (1) = S ((S (0)) * ff_v_pair_successor_product)) /\ exists ff_q_pair_successor_product_start. ff_u_pair_successor_product = ff_q_pair_successor_product_start * S ((S (0)) * ff_v_pair_successor_product) + (1))) /\ ((((exists ff_h_pair_successor_product_terminal. ff_h_pair_successor_product_terminal + S (n) = S ((S (se)) * ff_v_pair_successor_product)) /\ exists ff_q_pair_successor_product_terminal. ff_u_pair_successor_product = ff_q_pair_successor_product_terminal * S ((S (se)) * ff_v_pair_successor_product) + (n))) /\ forall ff_i_pair_successor_product. (exists ff_lt_pair_successor_product_bound. ff_lt_pair_successor_product_bound + S ff_i_pair_successor_product = se) -> exists ff_p_pair_successor_product ff_r_pair_successor_product ff_s_pair_successor_product. ((((exists ff_h_pair_successor_product_factor. ff_h_pair_successor_product_factor + S (ff_p_pair_successor_product) = S ((S (ff_i_pair_successor_product)) * ff_c_pair_successor)) /\ exists ff_q_pair_successor_product_factor. ff_b_pair_successor = ff_q_pair_successor_product_factor * S ((S (ff_i_pair_successor_product)) * ff_c_pair_successor) + (ff_p_pair_successor_product))) /\ ((((exists ff_h_pair_successor_product_partial. ff_h_pair_successor_product_partial + S (ff_r_pair_successor_product) = S ((S (ff_i_pair_successor_product)) * ff_v_pair_successor_product)) /\ exists ff_q_pair_successor_product_partial. ff_u_pair_successor_product = ff_q_pair_successor_product_partial * S ((S (ff_i_pair_successor_product)) * ff_v_pair_successor_product) + (ff_r_pair_successor_product))) /\ ((((exists ff_h_pair_successor_product_successor. ff_h_pair_successor_product_successor + S (ff_s_pair_successor_product) = S ((S (S ff_i_pair_successor_product)) * ff_v_pair_successor_product)) /\ exists ff_q_pair_successor_product_successor. ff_u_pair_successor_product = ff_q_pair_successor_product_successor * S ((S (S ff_i_pair_successor_product)) * ff_v_pair_successor_product) + (ff_s_pair_successor_product))) /\ ff_s_pair_successor_product = ff_r_pair_successor_product * ff_p_pair_successor_product)))))))) -> n = r * a
use pow_successor_decompose
use pow_functional
intro a
intro e
intro se
intro r
intro n
intro hse
intro hprevious
intro hsuccessor
have hstep : exists z. (exists ff_b_pair_decomposed ff_c_pair_decomposed. ((forall ff_i_pair_decomposed_repeat. (exists ff_lt_pair_decomposed_repeat_bound. ff_lt_pair_decomposed_repeat_bound + S ff_i_pair_decomposed_repeat = e) -> (((exists ff_h_pair_decomposed_repeat_decoded. ff_h_pair_decomposed_repeat_decoded + S (a) = S ((S (ff_i_pair_decomposed_repeat)) * ff_c_pair_decomposed)) /\ exists ff_q_pair_decomposed_repeat_decoded. ff_b_pair_decomposed = ff_q_pair_decomposed_repeat_decoded * S ((S (ff_i_pair_decomposed_repeat)) * ff_c_pair_decomposed) + (a)))) /\ (exists ff_u_pair_decomposed_product ff_v_pair_decomposed_product. ((((exists ff_h_pair_decomposed_product_start. ff_h_pair_decomposed_product_start + S (1) = S ((S (0)) * ff_v_pair_decomposed_product)) /\ exists ff_q_pair_decomposed_product_start. ff_u_pair_decomposed_product = ff_q_pair_decomposed_product_start * S ((S (0)) * ff_v_pair_decomposed_product) + (1))) /\ ((((exists ff_h_pair_decomposed_product_terminal. ff_h_pair_decomposed_product_terminal + S (z) = S ((S (e)) * ff_v_pair_decomposed_product)) /\ exists ff_q_pair_decomposed_product_terminal. ff_u_pair_decomposed_product = ff_q_pair_decomposed_product_terminal * S ((S (e)) * ff_v_pair_decomposed_product) + (z))) /\ forall ff_i_pair_decomposed_product. (exists ff_lt_pair_decomposed_product_bound. ff_lt_pair_decomposed_product_bound + S ff_i_pair_decomposed_product = e) -> exists ff_p_pair_decomposed_product ff_r_pair_decomposed_product ff_s_pair_decomposed_product. ((((exists ff_h_pair_decomposed_product_factor. ff_h_pair_decomposed_product_factor + S (ff_p_pair_decomposed_product) = S ((S (ff_i_pair_decomposed_product)) * ff_c_pair_decomposed)) /\ exists ff_q_pair_decomposed_product_factor. ff_b_pair_decomposed = ff_q_pair_decomposed_product_factor * S ((S (ff_i_pair_decomposed_product)) * ff_c_pair_decomposed) + (ff_p_pair_decomposed_product))) /\ ((((exists ff_h_pair_decomposed_product_partial. ff_h_pair_decomposed_product_partial + S (ff_r_pair_decomposed_product) = S ((S (ff_i_pair_decomposed_product)) * ff_v_pair_decomposed_product)) /\ exists ff_q_pair_decomposed_product_partial. ff_u_pair_decomposed_product = ff_q_pair_decomposed_product_partial * S ((S (ff_i_pair_decomposed_product)) * ff_v_pair_decomposed_product) + (ff_r_pair_decomposed_product))) /\ ((((exists ff_h_pair_decomposed_product_successor. ff_h_pair_decomposed_product_successor + S (ff_s_pair_decomposed_product) = S ((S (S ff_i_pair_decomposed_product)) * ff_v_pair_decomposed_product)) /\ exists ff_q_pair_decomposed_product_successor. ff_u_pair_decomposed_product = ff_q_pair_decomposed_product_successor * S ((S (S ff_i_pair_decomposed_product)) * ff_v_pair_decomposed_product) + (ff_s_pair_decomposed_product))) /\ ff_s_pair_decomposed_product = ff_r_pair_decomposed_product * ff_p_pair_decomposed_product)))))))) /\ n = z * a
specialize pow_successor_decompose a
specialize pow_successor_decompose e
specialize pow_successor_decompose se
specialize pow_successor_decompose n
apply pow_successor_decompose
exact hse
exact hsuccessor
cases hstep
cases hstep_witness
have hz : x = r
specialize pow_functional a
specialize pow_functional e
specialize pow_functional x
specialize pow_functional r
apply pow_functional
exact hstep_witness_left
exact hprevious
trans x * a
exact hstep_witness_right
rewrite hz
refl
qed
- Occurrences
- 5,282
- Distinct objects
- 1,293
- Reused references
- 46
- Depth
- 65
- Cuts
- 145
- Certificate SHA-256
be60a3277b36…
pow_mod_congruentPow mod congruent
Quadratic reciprocity campaign
checked
Balanced-congruent bases have congruent relational powers at every exponent.
Exact expanded PA statement
forall m a b e x y. (exists qr_u_base qr_v_base. a + m * qr_u_base = b + m * qr_v_base) -> (exists ff_b_left ff_c_left. ((forall ff_i_left_repeat. (exists ff_lt_left_repeat_bound. ff_lt_left_repeat_bound + S ff_i_left_repeat = e) -> (((exists ff_h_left_repeat_decoded. ff_h_left_repeat_decoded + S (a) = S ((S (ff_i_left_repeat)) * ff_c_left)) /\ exists ff_q_left_repeat_decoded. ff_b_left = ff_q_left_repeat_decoded * S ((S (ff_i_left_repeat)) * ff_c_left) + (a)))) /\ (exists ff_u_left_product ff_v_left_product. ((((exists ff_h_left_product_start. ff_h_left_product_start + S (1) = S ((S (0)) * ff_v_left_product)) /\ exists ff_q_left_product_start. ff_u_left_product = ff_q_left_product_start * S ((S (0)) * ff_v_left_product) + (1))) /\ ((((exists ff_h_left_product_terminal. ff_h_left_product_terminal + S (x) = S ((S (e)) * ff_v_left_product)) /\ exists ff_q_left_product_terminal. ff_u_left_product = ff_q_left_product_terminal * S ((S (e)) * ff_v_left_product) + (x))) /\ forall ff_i_left_product. (exists ff_lt_left_product_bound. ff_lt_left_product_bound + S ff_i_left_product = e) -> exists ff_p_left_product ff_r_left_product ff_s_left_product. ((((exists ff_h_left_product_factor. ff_h_left_product_factor + S (ff_p_left_product) = S ((S (ff_i_left_product)) * ff_c_left)) /\ exists ff_q_left_product_factor. ff_b_left = ff_q_left_product_factor * S ((S (ff_i_left_product)) * ff_c_left) + (ff_p_left_product))) /\ ((((exists ff_h_left_product_partial. ff_h_left_product_partial + S (ff_r_left_product) = S ((S (ff_i_left_product)) * ff_v_left_product)) /\ exists ff_q_left_product_partial. ff_u_left_product = ff_q_left_product_partial * S ((S (ff_i_left_product)) * ff_v_left_product) + (ff_r_left_product))) /\ ((((exists ff_h_left_product_successor. ff_h_left_product_successor + S (ff_s_left_product) = S ((S (S ff_i_left_product)) * ff_v_left_product)) /\ exists ff_q_left_product_successor. ff_u_left_product = ff_q_left_product_successor * S ((S (S ff_i_left_product)) * ff_v_left_product) + (ff_s_left_product))) /\ ff_s_left_product = ff_r_left_product * ff_p_left_product)))))))) -> (exists ff_b_right ff_c_right. ((forall ff_i_right_repeat. (exists ff_lt_right_repeat_bound. ff_lt_right_repeat_bound + S ff_i_right_repeat = e) -> (((exists ff_h_right_repeat_decoded. ff_h_right_repeat_decoded + S (b) = S ((S (ff_i_right_repeat)) * ff_c_right)) /\ exists ff_q_right_repeat_decoded. ff_b_right = ff_q_right_repeat_decoded * S ((S (ff_i_right_repeat)) * ff_c_right) + (b)))) /\ (exists ff_u_right_product ff_v_right_product. ((((exists ff_h_right_product_start. ff_h_right_product_start + S (1) = S ((S (0)) * ff_v_right_product)) /\ exists ff_q_right_product_start. ff_u_right_product = ff_q_right_product_start * S ((S (0)) * ff_v_right_product) + (1))) /\ ((((exists ff_h_right_product_terminal. ff_h_right_product_terminal + S (y) = S ((S (e)) * ff_v_right_product)) /\ exists ff_q_right_product_terminal. ff_u_right_product = ff_q_right_product_terminal * S ((S (e)) * ff_v_right_product) + (y))) /\ forall ff_i_right_product. (exists ff_lt_right_product_bound. ff_lt_right_product_bound + S ff_i_right_product = e) -> exists ff_p_right_product ff_r_right_product ff_s_right_product. ((((exists ff_h_right_product_factor. ff_h_right_product_factor + S (ff_p_right_product) = S ((S (ff_i_right_product)) * ff_c_right)) /\ exists ff_q_right_product_factor. ff_b_right = ff_q_right_product_factor * S ((S (ff_i_right_product)) * ff_c_right) + (ff_p_right_product))) /\ ((((exists ff_h_right_product_partial. ff_h_right_product_partial + S (ff_r_right_product) = S ((S (ff_i_right_product)) * ff_v_right_product)) /\ exists ff_q_right_product_partial. ff_u_right_product = ff_q_right_product_partial * S ((S (ff_i_right_product)) * ff_v_right_product) + (ff_r_right_product))) /\ ((((exists ff_h_right_product_successor. ff_h_right_product_successor + S (ff_s_right_product) = S ((S (S ff_i_right_product)) * ff_v_right_product)) /\ exists ff_q_right_product_successor. ff_u_right_product = ff_q_right_product_successor * S ((S (S ff_i_right_product)) * ff_v_right_product) + (ff_s_right_product))) /\ ff_s_right_product = ff_r_right_product * ff_p_right_product)))))))) -> (exists qr_u_result qr_v_result. x + m * qr_u_result = y + m * qr_v_result)
Complete replay recipe: dependency imports + authored proof
pa prove forall m a b e x y. (exists qr_u_base qr_v_base. a + m * qr_u_base = b + m * qr_v_base) -> (exists ff_b_left ff_c_left. ((forall ff_i_left_repeat. (exists ff_lt_left_repeat_bound. ff_lt_left_repeat_bound + S ff_i_left_repeat = e) -> (((exists ff_h_left_repeat_decoded. ff_h_left_repeat_decoded + S (a) = S ((S (ff_i_left_repeat)) * ff_c_left)) /\ exists ff_q_left_repeat_decoded. ff_b_left = ff_q_left_repeat_decoded * S ((S (ff_i_left_repeat)) * ff_c_left) + (a)))) /\ (exists ff_u_left_product ff_v_left_product. ((((exists ff_h_left_product_start. ff_h_left_product_start + S (1) = S ((S (0)) * ff_v_left_product)) /\ exists ff_q_left_product_start. ff_u_left_product = ff_q_left_product_start * S ((S (0)) * ff_v_left_product) + (1))) /\ ((((exists ff_h_left_product_terminal. ff_h_left_product_terminal + S (x) = S ((S (e)) * ff_v_left_product)) /\ exists ff_q_left_product_terminal. ff_u_left_product = ff_q_left_product_terminal * S ((S (e)) * ff_v_left_product) + (x))) /\ forall ff_i_left_product. (exists ff_lt_left_product_bound. ff_lt_left_product_bound + S ff_i_left_product = e) -> exists ff_p_left_product ff_r_left_product ff_s_left_product. ((((exists ff_h_left_product_factor. ff_h_left_product_factor + S (ff_p_left_product) = S ((S (ff_i_left_product)) * ff_c_left)) /\ exists ff_q_left_product_factor. ff_b_left = ff_q_left_product_factor * S ((S (ff_i_left_product)) * ff_c_left) + (ff_p_left_product))) /\ ((((exists ff_h_left_product_partial. ff_h_left_product_partial + S (ff_r_left_product) = S ((S (ff_i_left_product)) * ff_v_left_product)) /\ exists ff_q_left_product_partial. ff_u_left_product = ff_q_left_product_partial * S ((S (ff_i_left_product)) * ff_v_left_product) + (ff_r_left_product))) /\ ((((exists ff_h_left_product_successor. ff_h_left_product_successor + S (ff_s_left_product) = S ((S (S ff_i_left_product)) * ff_v_left_product)) /\ exists ff_q_left_product_successor. ff_u_left_product = ff_q_left_product_successor * S ((S (S ff_i_left_product)) * ff_v_left_product) + (ff_s_left_product))) /\ ff_s_left_product = ff_r_left_product * ff_p_left_product)))))))) -> (exists ff_b_right ff_c_right. ((forall ff_i_right_repeat. (exists ff_lt_right_repeat_bound. ff_lt_right_repeat_bound + S ff_i_right_repeat = e) -> (((exists ff_h_right_repeat_decoded. ff_h_right_repeat_decoded + S (b) = S ((S (ff_i_right_repeat)) * ff_c_right)) /\ exists ff_q_right_repeat_decoded. ff_b_right = ff_q_right_repeat_decoded * S ((S (ff_i_right_repeat)) * ff_c_right) + (b)))) /\ (exists ff_u_right_product ff_v_right_product. ((((exists ff_h_right_product_start. ff_h_right_product_start + S (1) = S ((S (0)) * ff_v_right_product)) /\ exists ff_q_right_product_start. ff_u_right_product = ff_q_right_product_start * S ((S (0)) * ff_v_right_product) + (1))) /\ ((((exists ff_h_right_product_terminal. ff_h_right_product_terminal + S (y) = S ((S (e)) * ff_v_right_product)) /\ exists ff_q_right_product_terminal. ff_u_right_product = ff_q_right_product_terminal * S ((S (e)) * ff_v_right_product) + (y))) /\ forall ff_i_right_product. (exists ff_lt_right_product_bound. ff_lt_right_product_bound + S ff_i_right_product = e) -> exists ff_p_right_product ff_r_right_product ff_s_right_product. ((((exists ff_h_right_product_factor. ff_h_right_product_factor + S (ff_p_right_product) = S ((S (ff_i_right_product)) * ff_c_right)) /\ exists ff_q_right_product_factor. ff_b_right = ff_q_right_product_factor * S ((S (ff_i_right_product)) * ff_c_right) + (ff_p_right_product))) /\ ((((exists ff_h_right_product_partial. ff_h_right_product_partial + S (ff_r_right_product) = S ((S (ff_i_right_product)) * ff_v_right_product)) /\ exists ff_q_right_product_partial. ff_u_right_product = ff_q_right_product_partial * S ((S (ff_i_right_product)) * ff_v_right_product) + (ff_r_right_product))) /\ ((((exists ff_h_right_product_successor. ff_h_right_product_successor + S (ff_s_right_product) = S ((S (S ff_i_right_product)) * ff_v_right_product)) /\ exists ff_q_right_product_successor. ff_u_right_product = ff_q_right_product_successor * S ((S (S ff_i_right_product)) * ff_v_right_product) + (ff_s_right_product))) /\ ff_s_right_product = ff_r_right_product * ff_p_right_product)))))))) -> (exists qr_u_result qr_v_result. x + m * qr_u_result = y + m * qr_v_result)
use pow_zero
use pow_successor_decompose
use pow_successor_pair_mul
use mod_eq_refl
use mod_eq_mul
intro m
intro a
intro b
induction e
intro x
intro y
intro hab
intro hx
intro hy
have hx1 : x = 1
specialize pow_zero a
specialize pow_zero 0
specialize pow_zero x
apply pow_zero
refl
exact hx
have hy1 : y = 1
specialize pow_zero b
specialize pow_zero 0
specialize pow_zero y
apply pow_zero
refl
exact hy
rewrite hx1
rewrite hy1
specialize mod_eq_refl m
specialize mod_eq_refl 1
exact mod_eq_refl
intro x
intro y
intro hab
intro hx
intro hy
have hleft : exists r. (exists ff_b_left_step ff_c_left_step. ((forall ff_i_left_step_repeat. (exists ff_lt_left_step_repeat_bound. ff_lt_left_step_repeat_bound + S ff_i_left_step_repeat = e) -> (((exists ff_h_left_step_repeat_decoded. ff_h_left_step_repeat_decoded + S (a) = S ((S (ff_i_left_step_repeat)) * ff_c_left_step)) /\ exists ff_q_left_step_repeat_decoded. ff_b_left_step = ff_q_left_step_repeat_decoded * S ((S (ff_i_left_step_repeat)) * ff_c_left_step) + (a)))) /\ (exists ff_u_left_step_product ff_v_left_step_product. ((((exists ff_h_left_step_product_start. ff_h_left_step_product_start + S (1) = S ((S (0)) * ff_v_left_step_product)) /\ exists ff_q_left_step_product_start. ff_u_left_step_product = ff_q_left_step_product_start * S ((S (0)) * ff_v_left_step_product) + (1))) /\ ((((exists ff_h_left_step_product_terminal. ff_h_left_step_product_terminal + S (r) = S ((S (e)) * ff_v_left_step_product)) /\ exists ff_q_left_step_product_terminal. ff_u_left_step_product = ff_q_left_step_product_terminal * S ((S (e)) * ff_v_left_step_product) + (r))) /\ forall ff_i_left_step_product. (exists ff_lt_left_step_product_bound. ff_lt_left_step_product_bound + S ff_i_left_step_product = e) -> exists ff_p_left_step_product ff_r_left_step_product ff_s_left_step_product. ((((exists ff_h_left_step_product_factor. ff_h_left_step_product_factor + S (ff_p_left_step_product) = S ((S (ff_i_left_step_product)) * ff_c_left_step)) /\ exists ff_q_left_step_product_factor. ff_b_left_step = ff_q_left_step_product_factor * S ((S (ff_i_left_step_product)) * ff_c_left_step) + (ff_p_left_step_product))) /\ ((((exists ff_h_left_step_product_partial. ff_h_left_step_product_partial + S (ff_r_left_step_product) = S ((S (ff_i_left_step_product)) * ff_v_left_step_product)) /\ exists ff_q_left_step_product_partial. ff_u_left_step_product = ff_q_left_step_product_partial * S ((S (ff_i_left_step_product)) * ff_v_left_step_product) + (ff_r_left_step_product))) /\ ((((exists ff_h_left_step_product_successor. ff_h_left_step_product_successor + S (ff_s_left_step_product) = S ((S (S ff_i_left_step_product)) * ff_v_left_step_product)) /\ exists ff_q_left_step_product_successor. ff_u_left_step_product = ff_q_left_step_product_successor * S ((S (S ff_i_left_step_product)) * ff_v_left_step_product) + (ff_s_left_step_product))) /\ ff_s_left_step_product = ff_r_left_step_product * ff_p_left_step_product)))))))) /\ x = r * a
specialize pow_successor_decompose a
specialize pow_successor_decompose e
specialize pow_successor_decompose (S e)
specialize pow_successor_decompose x
apply pow_successor_decompose
refl
exact hx
cases hleft
cases hleft_witness
have hright : exists r. (exists ff_b_right_step ff_c_right_step. ((forall ff_i_right_step_repeat. (exists ff_lt_right_step_repeat_bound. ff_lt_right_step_repeat_bound + S ff_i_right_step_repeat = e) -> (((exists ff_h_right_step_repeat_decoded. ff_h_right_step_repeat_decoded + S (b) = S ((S (ff_i_right_step_repeat)) * ff_c_right_step)) /\ exists ff_q_right_step_repeat_decoded. ff_b_right_step = ff_q_right_step_repeat_decoded * S ((S (ff_i_right_step_repeat)) * ff_c_right_step) + (b)))) /\ (exists ff_u_right_step_product ff_v_right_step_product. ((((exists ff_h_right_step_product_start. ff_h_right_step_product_start + S (1) = S ((S (0)) * ff_v_right_step_product)) /\ exists ff_q_right_step_product_start. ff_u_right_step_product = ff_q_right_step_product_start * S ((S (0)) * ff_v_right_step_product) + (1))) /\ ((((exists ff_h_right_step_product_terminal. ff_h_right_step_product_terminal + S (r) = S ((S (e)) * ff_v_right_step_product)) /\ exists ff_q_right_step_product_terminal. ff_u_right_step_product = ff_q_right_step_product_terminal * S ((S (e)) * ff_v_right_step_product) + (r))) /\ forall ff_i_right_step_product. (exists ff_lt_right_step_product_bound. ff_lt_right_step_product_bound + S ff_i_right_step_product = e) -> exists ff_p_right_step_product ff_r_right_step_product ff_s_right_step_product. ((((exists ff_h_right_step_product_factor. ff_h_right_step_product_factor + S (ff_p_right_step_product) = S ((S (ff_i_right_step_product)) * ff_c_right_step)) /\ exists ff_q_right_step_product_factor. ff_b_right_step = ff_q_right_step_product_factor * S ((S (ff_i_right_step_product)) * ff_c_right_step) + (ff_p_right_step_product))) /\ ((((exists ff_h_right_step_product_partial. ff_h_right_step_product_partial + S (ff_r_right_step_product) = S ((S (ff_i_right_step_product)) * ff_v_right_step_product)) /\ exists ff_q_right_step_product_partial. ff_u_right_step_product = ff_q_right_step_product_partial * S ((S (ff_i_right_step_product)) * ff_v_right_step_product) + (ff_r_right_step_product))) /\ ((((exists ff_h_right_step_product_successor. ff_h_right_step_product_successor + S (ff_s_right_step_product) = S ((S (S ff_i_right_step_product)) * ff_v_right_step_product)) /\ exists ff_q_right_step_product_successor. ff_u_right_step_product = ff_q_right_step_product_successor * S ((S (S ff_i_right_step_product)) * ff_v_right_step_product) + (ff_s_right_step_product))) /\ ff_s_right_step_product = ff_r_right_step_product * ff_p_right_step_product)))))))) /\ y = r * b
specialize pow_successor_decompose b
specialize pow_successor_decompose e
specialize pow_successor_decompose (S e)
specialize pow_successor_decompose y
apply pow_successor_decompose
refl
exact hy
cases hright
cases hright_witness
have hxmul : x = x1 * a
specialize pow_successor_pair_mul a
specialize pow_successor_pair_mul e
specialize pow_successor_pair_mul (S e)
specialize pow_successor_pair_mul x1
specialize pow_successor_pair_mul x
apply pow_successor_pair_mul
refl
exact hleft_witness_left
exact hx
have hymul : y = x2 * b
specialize pow_successor_pair_mul b
specialize pow_successor_pair_mul e
specialize pow_successor_pair_mul (S e)
specialize pow_successor_pair_mul x2
specialize pow_successor_pair_mul y
apply pow_successor_pair_mul
refl
exact hright_witness_left
exact hy
have hpre : exists qr_u_predecessors qr_v_predecessors. x1 + m * qr_u_predecessors = x2 + m * qr_v_predecessors
specialize IH x1
specialize IH x2
apply IH
exact hab
exact hleft_witness_left
exact hright_witness_left
have hmul : exists pc_u_products pc_v_products. (x1 * a) + m * pc_u_products = (x2 * b) + m * pc_v_products
specialize mod_eq_mul m
specialize mod_eq_mul x1
specialize mod_eq_mul x2
specialize mod_eq_mul a
specialize mod_eq_mul b
apply mod_eq_mul
exact hpre
exact hab
rewrite hxmul
rewrite hymul
exact hmul
qed
- Occurrences
- 10,671
- Distinct objects
- 1,748
- Reused references
- 63
- Depth
- 68
- Cuts
- 297
- Certificate SHA-256
5009e017166c…
lt_three_casesLt three cases
Quadratic reciprocity campaign
checked
Every natural strictly below three is zero, one, or two.
Exact expanded PA statement
forall x. (exists h. h + S x = 3) -> x = 0 \/ x = 1 \/ x = 2
Complete replay recipe: dependency imports + authored proof
pa prove forall x. (exists h. h + S x = 3) -> x = 0 \/ x = 1 \/ x = 2
use le_of_succ_le_succ
use le_eq_or_lt
use le_zero
intro x
intro hb
have hle2 : exists h. h + x = 2
specialize le_of_succ_le_succ x
specialize le_of_succ_le_succ 2
apply le_of_succ_le_succ
exact hb
have hc2 : x = 2 \/ exists h. h + S x = 2
specialize le_eq_or_lt x
specialize le_eq_or_lt 2
apply le_eq_or_lt
exact hle2
cases hc2
right
exact hc2_left
left
have hle1 : exists h. h + x = 1
specialize le_of_succ_le_succ x
specialize le_of_succ_le_succ 1
apply le_of_succ_le_succ
exact hc2_right
have hc1 : x = 1 \/ exists h. h + S x = 1
specialize le_eq_or_lt x
specialize le_eq_or_lt 1
apply le_eq_or_lt
exact hle1
cases hc1
right
exact hc1_left
left
have hle0 : exists h. h + x = 0
specialize le_of_succ_le_succ x
specialize le_of_succ_le_succ 0
apply le_of_succ_le_succ
exact hc1_right
specialize le_zero x
apply le_zero
exact hle0
qed
- Occurrences
- 182
- Distinct objects
- 178
- Reused references
- 4
- Depth
- 21
- Cuts
- 7
- Certificate SHA-256
f61975330ce8…
lt_five_casesLt five cases
Quadratic reciprocity campaign
checked
Every natural strictly below five is one of its canonical values.
Exact expanded PA statement
forall x. (exists h. h + S x = 5) -> x = 0 \/ x = 1 \/ x = 2 \/ x = 3 \/ x = 4
Complete replay recipe: dependency imports + authored proof
pa prove forall x. (exists h. h + S x = 5) -> x = 0 \/ x = 1 \/ x = 2 \/ x = 3 \/ x = 4
use le_of_succ_le_succ
use le_eq_or_lt
use lt_three_cases
intro x
intro hb
have hle4 : exists h. h + x = 4
specialize le_of_succ_le_succ x
specialize le_of_succ_le_succ 4
apply le_of_succ_le_succ
exact hb
have hc4 : x = 4 \/ exists h. h + S x = 4
specialize le_eq_or_lt x
specialize le_eq_or_lt 4
apply le_eq_or_lt
exact hle4
cases hc4
right
exact hc4_left
left
have hle3 : exists h. h + x = 3
specialize le_of_succ_le_succ x
specialize le_of_succ_le_succ 3
apply le_of_succ_le_succ
exact hc4_right
have hc3 : x = 3 \/ exists h. h + S x = 3
specialize le_eq_or_lt x
specialize le_eq_or_lt 3
apply le_eq_or_lt
exact hle3
cases hc3
right
exact hc3_left
left
specialize lt_three_cases x
apply lt_three_cases
exact hc3_right
qed
- Occurrences
- 331
- Distinct objects
- 213
- Reused references
- 6
- Depth
- 24
- Cuts
- 13
- Certificate SHA-256
f70f1a4e36bb…
lt_seven_casesLt seven cases
Quadratic reciprocity campaign
checked
Every natural strictly below seven is one of its canonical values.
Exact expanded PA statement
forall x. (exists h. h + S x = 7) -> x = 0 \/ x = 1 \/ x = 2 \/ x = 3 \/ x = 4 \/ x = 5 \/ x = 6
Complete replay recipe: dependency imports + authored proof
pa prove forall x. (exists h. h + S x = 7) -> x = 0 \/ x = 1 \/ x = 2 \/ x = 3 \/ x = 4 \/ x = 5 \/ x = 6
use le_of_succ_le_succ
use le_eq_or_lt
use lt_five_cases
intro x
intro hb
have hle6 : exists h. h + x = 6
specialize le_of_succ_le_succ x
specialize le_of_succ_le_succ 6
apply le_of_succ_le_succ
exact hb
have hc6 : x = 6 \/ exists h. h + S x = 6
specialize le_eq_or_lt x
specialize le_eq_or_lt 6
apply le_eq_or_lt
exact hle6
cases hc6
right
exact hc6_left
left
have hle5 : exists h. h + x = 5
specialize le_of_succ_le_succ x
specialize le_of_succ_le_succ 5
apply le_of_succ_le_succ
exact hc6_right
have hc5 : x = 5 \/ exists h. h + S x = 5
specialize le_eq_or_lt x
specialize le_eq_or_lt 5
apply le_eq_or_lt
exact hle5
cases hc5
right
exact hc5_left
left
specialize lt_five_cases x
apply lt_five_cases
exact hc5_right
qed
- Occurrences
- 480
- Distinct objects
- 248
- Reused references
- 8
- Depth
- 27
- Cuts
- 19
- Certificate SHA-256
60a0e0ace6b6…
bounded_square_mod3_classifyBounded square mod3 classify
Quadratic reciprocity campaign
checked
A bounded square modulo 3 has exactly a canonical square residue.
Exact expanded PA statement
forall a. (exists h. h + S a = 3) -> (exists sm_x_bc3. (exists sm_h_bc3. sm_h_bc3 + S sm_x_bc3 = 3) /\ exists sm_u_bc3 sm_v_bc3. sm_x_bc3 * sm_x_bc3 + 3 * sm_u_bc3 = a + 3 * sm_v_bc3) -> (a = 0 \/ a = 1)
Complete replay recipe: dependency imports + authored proof
pa prove forall a. (exists h. h + S a = 3) -> (exists sm_x_bc3. (exists sm_h_bc3. sm_h_bc3 + S sm_x_bc3 = 3) /\ exists sm_u_bc3 sm_v_bc3. sm_x_bc3 * sm_x_bc3 + 3 * sm_u_bc3 = a + 3 * sm_v_bc3) -> (a = 0 \/ a = 1)
use lt_three_cases
use mod_eq_trans
use mod_eq_bounded_unique
intro a
intro ha
intro hb
cases hb
cases hb_witness
have hroots : x = 0 \/ x = 1 \/ x = 2
specialize lt_three_cases x
apply lt_three_cases
exact hb_witness_left
cases hroots
cases hroots_left
have hsq : exists u v. 0 * 0 + 3 * u = a + 3 * v
rewrite hroots_left_left at hb_witness_right
rewrite hroots_left_left at hb_witness_right
exact hb_witness_right
have hc : exists u v. 0 + 3 * u = (0 * 0) + 3 * v
exists 0
exists 0
norm_num
have hra : exists u v. 0 + 3 * u = a + 3 * v
specialize mod_eq_trans 3
specialize mod_eq_trans 0
specialize mod_eq_trans (0 * 0)
specialize mod_eq_trans a
apply mod_eq_trans
exact hc
exact hsq
have hrb : exists h. h + S 0 = 3
exists 2
norm_num
have heq : 0 = a
specialize mod_eq_bounded_unique 3
specialize mod_eq_bounded_unique 0
specialize mod_eq_bounded_unique a
apply mod_eq_bounded_unique
exact hrb
exact ha
exact hra
left
symm
exact heq
have hsq : exists u v. 1 * 1 + 3 * u = a + 3 * v
rewrite hroots_left_right at hb_witness_right
rewrite hroots_left_right at hb_witness_right
exact hb_witness_right
have hc : exists u v. 1 + 3 * u = (1 * 1) + 3 * v
exists 0
exists 0
norm_num
have hra : exists u v. 1 + 3 * u = a + 3 * v
specialize mod_eq_trans 3
specialize mod_eq_trans 1
specialize mod_eq_trans (1 * 1)
specialize mod_eq_trans a
apply mod_eq_trans
exact hc
exact hsq
have hrb : exists h. h + S 1 = 3
exists 1
norm_num
have heq : 1 = a
specialize mod_eq_bounded_unique 3
specialize mod_eq_bounded_unique 1
specialize mod_eq_bounded_unique a
apply mod_eq_bounded_unique
exact hrb
exact ha
exact hra
right
symm
exact heq
have hsq : exists u v. 2 * 2 + 3 * u = a + 3 * v
rewrite hroots_right at hb_witness_right
rewrite hroots_right at hb_witness_right
exact hb_witness_right
have hc : exists u v. 1 + 3 * u = (2 * 2) + 3 * v
exists 1
exists 0
norm_num
have hra : exists u v. 1 + 3 * u = a + 3 * v
specialize mod_eq_trans 3
specialize mod_eq_trans 1
specialize mod_eq_trans (2 * 2)
specialize mod_eq_trans a
apply mod_eq_trans
exact hc
exact hsq
have hrb : exists h. h + S 1 = 3
exists 1
norm_num
have heq : 1 = a
specialize mod_eq_bounded_unique 3
specialize mod_eq_bounded_unique 1
specialize mod_eq_bounded_unique a
apply mod_eq_bounded_unique
exact hrb
exact ha
exact hra
right
symm
exact heq
qed
- Occurrences
- 1,767
- Distinct objects
- 1,149
- Reused references
- 29
- Depth
- 62
- Cuts
- 42
- Certificate SHA-256
2a8ba2241f72…
bounded_square_mod5_classifyBounded square mod5 classify
Quadratic reciprocity campaign
checked
A bounded square modulo 5 has exactly a canonical square residue.
Exact expanded PA statement
forall a. (exists h. h + S a = 5) -> (exists sm_x_bc5. (exists sm_h_bc5. sm_h_bc5 + S sm_x_bc5 = 5) /\ exists sm_u_bc5 sm_v_bc5. sm_x_bc5 * sm_x_bc5 + 5 * sm_u_bc5 = a + 5 * sm_v_bc5) -> (a = 0 \/ a = 1 \/ a = 4)
Complete replay recipe: dependency imports + authored proof
pa prove forall a. (exists h. h + S a = 5) -> (exists sm_x_bc5. (exists sm_h_bc5. sm_h_bc5 + S sm_x_bc5 = 5) /\ exists sm_u_bc5 sm_v_bc5. sm_x_bc5 * sm_x_bc5 + 5 * sm_u_bc5 = a + 5 * sm_v_bc5) -> (a = 0 \/ a = 1 \/ a = 4)
use lt_five_cases
use mod_eq_trans
use mod_eq_bounded_unique
intro a
intro ha
intro hb
cases hb
cases hb_witness
have hroots : x = 0 \/ x = 1 \/ x = 2 \/ x = 3 \/ x = 4
specialize lt_five_cases x
apply lt_five_cases
exact hb_witness_left
cases hroots
cases hroots_left
cases hroots_left_left
cases hroots_left_left_left
have hsq : exists u v. 0 * 0 + 5 * u = a + 5 * v
rewrite hroots_left_left_left_left at hb_witness_right
rewrite hroots_left_left_left_left at hb_witness_right
exact hb_witness_right
have hc : exists u v. 0 + 5 * u = (0 * 0) + 5 * v
exists 0
exists 0
norm_num
have hra : exists u v. 0 + 5 * u = a + 5 * v
specialize mod_eq_trans 5
specialize mod_eq_trans 0
specialize mod_eq_trans (0 * 0)
specialize mod_eq_trans a
apply mod_eq_trans
exact hc
exact hsq
have hrb : exists h. h + S 0 = 5
exists 4
norm_num
have heq : 0 = a
specialize mod_eq_bounded_unique 5
specialize mod_eq_bounded_unique 0
specialize mod_eq_bounded_unique a
apply mod_eq_bounded_unique
exact hrb
exact ha
exact hra
left
left
symm
exact heq
have hsq : exists u v. 1 * 1 + 5 * u = a + 5 * v
rewrite hroots_left_left_left_right at hb_witness_right
rewrite hroots_left_left_left_right at hb_witness_right
exact hb_witness_right
have hc : exists u v. 1 + 5 * u = (1 * 1) + 5 * v
exists 0
exists 0
norm_num
have hra : exists u v. 1 + 5 * u = a + 5 * v
specialize mod_eq_trans 5
specialize mod_eq_trans 1
specialize mod_eq_trans (1 * 1)
specialize mod_eq_trans a
apply mod_eq_trans
exact hc
exact hsq
have hrb : exists h. h + S 1 = 5
exists 3
norm_num
have heq : 1 = a
specialize mod_eq_bounded_unique 5
specialize mod_eq_bounded_unique 1
specialize mod_eq_bounded_unique a
apply mod_eq_bounded_unique
exact hrb
exact ha
exact hra
left
right
symm
exact heq
have hsq : exists u v. 2 * 2 + 5 * u = a + 5 * v
rewrite hroots_left_left_right at hb_witness_right
rewrite hroots_left_left_right at hb_witness_right
exact hb_witness_right
have hc : exists u v. 4 + 5 * u = (2 * 2) + 5 * v
exists 0
exists 0
norm_num
have hra : exists u v. 4 + 5 * u = a + 5 * v
specialize mod_eq_trans 5
specialize mod_eq_trans 4
specialize mod_eq_trans (2 * 2)
specialize mod_eq_trans a
apply mod_eq_trans
exact hc
exact hsq
have hrb : exists h. h + S 4 = 5
exists 0
norm_num
have heq : 4 = a
specialize mod_eq_bounded_unique 5
specialize mod_eq_bounded_unique 4
specialize mod_eq_bounded_unique a
apply mod_eq_bounded_unique
exact hrb
exact ha
exact hra
right
symm
exact heq
have hsq : exists u v. 3 * 3 + 5 * u = a + 5 * v
rewrite hroots_left_right at hb_witness_right
rewrite hroots_left_right at hb_witness_right
exact hb_witness_right
have hc : exists u v. 4 + 5 * u = (3 * 3) + 5 * v
exists 1
exists 0
norm_num
have hra : exists u v. 4 + 5 * u = a + 5 * v
specialize mod_eq_trans 5
specialize mod_eq_trans 4
specialize mod_eq_trans (3 * 3)
specialize mod_eq_trans a
apply mod_eq_trans
exact hc
exact hsq
have hrb : exists h. h + S 4 = 5
exists 0
norm_num
have heq : 4 = a
specialize mod_eq_bounded_unique 5
specialize mod_eq_bounded_unique 4
specialize mod_eq_bounded_unique a
apply mod_eq_bounded_unique
exact hrb
exact ha
exact hra
right
symm
exact heq
have hsq : exists u v. 4 * 4 + 5 * u = a + 5 * v
rewrite hroots_right at hb_witness_right
rewrite hroots_right at hb_witness_right
exact hb_witness_right
have hc : exists u v. 1 + 5 * u = (4 * 4) + 5 * v
exists 3
exists 0
norm_num
have hra : exists u v. 1 + 5 * u = a + 5 * v
specialize mod_eq_trans 5
specialize mod_eq_trans 1
specialize mod_eq_trans (4 * 4)
specialize mod_eq_trans a
apply mod_eq_trans
exact hc
exact hsq
have hrb : exists h. h + S 1 = 5
exists 3
norm_num
have heq : 1 = a
specialize mod_eq_bounded_unique 5
specialize mod_eq_bounded_unique 1
specialize mod_eq_bounded_unique a
apply mod_eq_bounded_unique
exact hrb
exact ha
exact hra
left
right
symm
exact heq
qed
- Occurrences
- 2,567
- Distinct objects
- 1,835
- Reused references
- 31
- Depth
- 62
- Cuts
- 48
- Certificate SHA-256
ae64803ac8fb…
bounded_square_mod7_classifyBounded square mod7 classify
Quadratic reciprocity campaign
checked
A bounded square modulo 7 has exactly a canonical square residue.
Exact expanded PA statement
forall a. (exists h. h + S a = 7) -> (exists sm_x_bc7. (exists sm_h_bc7. sm_h_bc7 + S sm_x_bc7 = 7) /\ exists sm_u_bc7 sm_v_bc7. sm_x_bc7 * sm_x_bc7 + 7 * sm_u_bc7 = a + 7 * sm_v_bc7) -> (a = 0 \/ a = 1 \/ a = 2 \/ a = 4)
Complete replay recipe: dependency imports + authored proof
pa prove forall a. (exists h. h + S a = 7) -> (exists sm_x_bc7. (exists sm_h_bc7. sm_h_bc7 + S sm_x_bc7 = 7) /\ exists sm_u_bc7 sm_v_bc7. sm_x_bc7 * sm_x_bc7 + 7 * sm_u_bc7 = a + 7 * sm_v_bc7) -> (a = 0 \/ a = 1 \/ a = 2 \/ a = 4)
use lt_seven_cases
use mod_eq_trans
use mod_eq_bounded_unique
intro a
intro ha
intro hb
cases hb
cases hb_witness
have hroots : x = 0 \/ x = 1 \/ x = 2 \/ x = 3 \/ x = 4 \/ x = 5 \/ x = 6
specialize lt_seven_cases x
apply lt_seven_cases
exact hb_witness_left
cases hroots
cases hroots_left
cases hroots_left_left
cases hroots_left_left_left
cases hroots_left_left_left_left
cases hroots_left_left_left_left_left
have hsq : exists u v. 0 * 0 + 7 * u = a + 7 * v
rewrite hroots_left_left_left_left_left_left at hb_witness_right
rewrite hroots_left_left_left_left_left_left at hb_witness_right
exact hb_witness_right
have hc : exists u v. 0 + 7 * u = (0 * 0) + 7 * v
exists 0
exists 0
norm_num
have hra : exists u v. 0 + 7 * u = a + 7 * v
specialize mod_eq_trans 7
specialize mod_eq_trans 0
specialize mod_eq_trans (0 * 0)
specialize mod_eq_trans a
apply mod_eq_trans
exact hc
exact hsq
have hrb : exists h. h + S 0 = 7
exists 6
norm_num
have heq : 0 = a
specialize mod_eq_bounded_unique 7
specialize mod_eq_bounded_unique 0
specialize mod_eq_bounded_unique a
apply mod_eq_bounded_unique
exact hrb
exact ha
exact hra
left
left
left
symm
exact heq
have hsq : exists u v. 1 * 1 + 7 * u = a + 7 * v
rewrite hroots_left_left_left_left_left_right at hb_witness_right
rewrite hroots_left_left_left_left_left_right at hb_witness_right
exact hb_witness_right
have hc : exists u v. 1 + 7 * u = (1 * 1) + 7 * v
exists 0
exists 0
norm_num
have hra : exists u v. 1 + 7 * u = a + 7 * v
specialize mod_eq_trans 7
specialize mod_eq_trans 1
specialize mod_eq_trans (1 * 1)
specialize mod_eq_trans a
apply mod_eq_trans
exact hc
exact hsq
have hrb : exists h. h + S 1 = 7
exists 5
norm_num
have heq : 1 = a
specialize mod_eq_bounded_unique 7
specialize mod_eq_bounded_unique 1
specialize mod_eq_bounded_unique a
apply mod_eq_bounded_unique
exact hrb
exact ha
exact hra
left
left
right
symm
exact heq
have hsq : exists u v. 2 * 2 + 7 * u = a + 7 * v
rewrite hroots_left_left_left_left_right at hb_witness_right
rewrite hroots_left_left_left_left_right at hb_witness_right
exact hb_witness_right
have hc : exists u v. 4 + 7 * u = (2 * 2) + 7 * v
exists 0
exists 0
norm_num
have hra : exists u v. 4 + 7 * u = a + 7 * v
specialize mod_eq_trans 7
specialize mod_eq_trans 4
specialize mod_eq_trans (2 * 2)
specialize mod_eq_trans a
apply mod_eq_trans
exact hc
exact hsq
have hrb : exists h. h + S 4 = 7
exists 2
norm_num
have heq : 4 = a
specialize mod_eq_bounded_unique 7
specialize mod_eq_bounded_unique 4
specialize mod_eq_bounded_unique a
apply mod_eq_bounded_unique
exact hrb
exact ha
exact hra
right
symm
exact heq
have hsq : exists u v. 3 * 3 + 7 * u = a + 7 * v
rewrite hroots_left_left_left_right at hb_witness_right
rewrite hroots_left_left_left_right at hb_witness_right
exact hb_witness_right
have hc : exists u v. 2 + 7 * u = (3 * 3) + 7 * v
exists 1
exists 0
norm_num
have hra : exists u v. 2 + 7 * u = a + 7 * v
specialize mod_eq_trans 7
specialize mod_eq_trans 2
specialize mod_eq_trans (3 * 3)
specialize mod_eq_trans a
apply mod_eq_trans
exact hc
exact hsq
have hrb : exists h. h + S 2 = 7
exists 4
norm_num
have heq : 2 = a
specialize mod_eq_bounded_unique 7
specialize mod_eq_bounded_unique 2
specialize mod_eq_bounded_unique a
apply mod_eq_bounded_unique
exact hrb
exact ha
exact hra
left
right
symm
exact heq
have hsq : exists u v. 4 * 4 + 7 * u = a + 7 * v
rewrite hroots_left_left_right at hb_witness_right
rewrite hroots_left_left_right at hb_witness_right
exact hb_witness_right
have hc : exists u v. 2 + 7 * u = (4 * 4) + 7 * v
exists 2
exists 0
norm_num
have hra : exists u v. 2 + 7 * u = a + 7 * v
specialize mod_eq_trans 7
specialize mod_eq_trans 2
specialize mod_eq_trans (4 * 4)
specialize mod_eq_trans a
apply mod_eq_trans
exact hc
exact hsq
have hrb : exists h. h + S 2 = 7
exists 4
norm_num
have heq : 2 = a
specialize mod_eq_bounded_unique 7
specialize mod_eq_bounded_unique 2
specialize mod_eq_bounded_unique a
apply mod_eq_bounded_unique
exact hrb
exact ha
exact hra
left
right
symm
exact heq
have hsq : exists u v. 5 * 5 + 7 * u = a + 7 * v
rewrite hroots_left_right at hb_witness_right
rewrite hroots_left_right at hb_witness_right
exact hb_witness_right
have hc : exists u v. 4 + 7 * u = (5 * 5) + 7 * v
exists 3
exists 0
norm_num
have hra : exists u v. 4 + 7 * u = a + 7 * v
specialize mod_eq_trans 7
specialize mod_eq_trans 4
specialize mod_eq_trans (5 * 5)
specialize mod_eq_trans a
apply mod_eq_trans
exact hc
exact hsq
have hrb : exists h. h + S 4 = 7
exists 2
norm_num
have heq : 4 = a
specialize mod_eq_bounded_unique 7
specialize mod_eq_bounded_unique 4
specialize mod_eq_bounded_unique a
apply mod_eq_bounded_unique
exact hrb
exact ha
exact hra
right
symm
exact heq
have hsq : exists u v. 6 * 6 + 7 * u = a + 7 * v
rewrite hroots_right at hb_witness_right
rewrite hroots_right at hb_witness_right
exact hb_witness_right
have hc : exists u v. 1 + 7 * u = (6 * 6) + 7 * v
exists 5
exists 0
norm_num
have hra : exists u v. 1 + 7 * u = a + 7 * v
specialize mod_eq_trans 7
specialize mod_eq_trans 1
specialize mod_eq_trans (6 * 6)
specialize mod_eq_trans a
apply mod_eq_trans
exact hc
exact hsq
have hrb : exists h. h + S 1 = 7
exists 5
norm_num
have heq : 1 = a
specialize mod_eq_bounded_unique 7
specialize mod_eq_bounded_unique 1
specialize mod_eq_bounded_unique a
apply mod_eq_bounded_unique
exact hrb
exact ha
exact hra
left
left
right
symm
exact heq
qed
- Occurrences
- 4,033
- Distinct objects
- 3,187
- Reused references
- 33
- Depth
- 91
- Cuts
- 54
- Certificate SHA-256
474234f13310…
qres_mod3_zeroQres mod3 zero
Quadratic reciprocity campaign
checked
The canonical value 0 is a quadratic residue modulo 3.
Exact expanded PA statement
exists sm_x_p3_0. exists sm_u_p3_0 sm_v_p3_0. sm_x_p3_0 * sm_x_p3_0 + 3 * sm_u_p3_0 = 0 + 3 * sm_v_p3_0
Complete replay recipe: dependency imports + authored proof
pa prove exists sm_x_p3_0. exists sm_u_p3_0 sm_v_p3_0. sm_x_p3_0 * sm_x_p3_0 + 3 * sm_u_p3_0 = 0 + 3 * sm_v_p3_0
exists 0
exists 0
exists 0
norm_num
qed
- Occurrences
- 40
- Distinct objects
- 40
- Reused references
- 0
- Depth
- 14
- Cuts
- 0
- Certificate SHA-256
28a067d3acd7…
qres_mod3_oneQres mod3 one
Quadratic reciprocity campaign
checked
The canonical value 1 is a quadratic residue modulo 3.
Exact expanded PA statement
exists sm_x_p3_1. exists sm_u_p3_1 sm_v_p3_1. sm_x_p3_1 * sm_x_p3_1 + 3 * sm_u_p3_1 = 1 + 3 * sm_v_p3_1
Complete replay recipe: dependency imports + authored proof
pa prove exists sm_x_p3_1. exists sm_u_p3_1 sm_v_p3_1. sm_x_p3_1 * sm_x_p3_1 + 3 * sm_u_p3_1 = 1 + 3 * sm_v_p3_1
exists 1
exists 0
exists 0
norm_num
qed
- Occurrences
- 57
- Distinct objects
- 57
- Reused references
- 0
- Depth
- 14
- Cuts
- 0
- Certificate SHA-256
01a0e94a6526…
qres_mod5_zeroQres mod5 zero
Quadratic reciprocity campaign
checked
The canonical value 0 is a quadratic residue modulo 5.
Exact expanded PA statement
exists sm_x_p5_0. exists sm_u_p5_0 sm_v_p5_0. sm_x_p5_0 * sm_x_p5_0 + 5 * sm_u_p5_0 = 0 + 5 * sm_v_p5_0
Complete replay recipe: dependency imports + authored proof
pa prove exists sm_x_p5_0. exists sm_u_p5_0 sm_v_p5_0. sm_x_p5_0 * sm_x_p5_0 + 5 * sm_u_p5_0 = 0 + 5 * sm_v_p5_0
exists 0
exists 0
exists 0
norm_num
qed
- Occurrences
- 44
- Distinct objects
- 44
- Reused references
- 0
- Depth
- 16
- Cuts
- 0
- Certificate SHA-256
c81ed7cded0d…
qres_mod5_oneQres mod5 one
Quadratic reciprocity campaign
checked
The canonical value 1 is a quadratic residue modulo 5.
Exact expanded PA statement
exists sm_x_p5_1. exists sm_u_p5_1 sm_v_p5_1. sm_x_p5_1 * sm_x_p5_1 + 5 * sm_u_p5_1 = 1 + 5 * sm_v_p5_1
Complete replay recipe: dependency imports + authored proof
pa prove exists sm_x_p5_1. exists sm_u_p5_1 sm_v_p5_1. sm_x_p5_1 * sm_x_p5_1 + 5 * sm_u_p5_1 = 1 + 5 * sm_v_p5_1
exists 1
exists 0
exists 0
norm_num
qed
- Occurrences
- 61
- Distinct objects
- 61
- Reused references
- 0
- Depth
- 16
- Cuts
- 0
- Certificate SHA-256
53992204c10b…
qres_mod5_fourQres mod5 four
Quadratic reciprocity campaign
checked
The canonical value 4 is a quadratic residue modulo 5.
Exact expanded PA statement
exists sm_x_p5_4. exists sm_u_p5_4 sm_v_p5_4. sm_x_p5_4 * sm_x_p5_4 + 5 * sm_u_p5_4 = 4 + 5 * sm_v_p5_4
Complete replay recipe: dependency imports + authored proof
pa prove exists sm_x_p5_4. exists sm_u_p5_4 sm_v_p5_4. sm_x_p5_4 * sm_x_p5_4 + 5 * sm_u_p5_4 = 4 + 5 * sm_v_p5_4
exists 2
exists 0
exists 0
norm_num
qed
- Occurrences
- 90
- Distinct objects
- 90
- Reused references
- 0
- Depth
- 18
- Cuts
- 0
- Certificate SHA-256
108c167d7c36…
qres_mod7_zeroQres mod7 zero
Quadratic reciprocity campaign
checked
The canonical value 0 is a quadratic residue modulo 7.
Exact expanded PA statement
exists sm_x_p7_0. exists sm_u_p7_0 sm_v_p7_0. sm_x_p7_0 * sm_x_p7_0 + 7 * sm_u_p7_0 = 0 + 7 * sm_v_p7_0
Complete replay recipe: dependency imports + authored proof
pa prove exists sm_x_p7_0. exists sm_u_p7_0 sm_v_p7_0. sm_x_p7_0 * sm_x_p7_0 + 7 * sm_u_p7_0 = 0 + 7 * sm_v_p7_0
exists 0
exists 0
exists 0
norm_num
qed
- Occurrences
- 48
- Distinct objects
- 48
- Reused references
- 0
- Depth
- 18
- Cuts
- 0
- Certificate SHA-256
9c4e083aa20a…
qres_mod7_oneQres mod7 one
Quadratic reciprocity campaign
checked
The canonical value 1 is a quadratic residue modulo 7.
Exact expanded PA statement
exists sm_x_p7_1. exists sm_u_p7_1 sm_v_p7_1. sm_x_p7_1 * sm_x_p7_1 + 7 * sm_u_p7_1 = 1 + 7 * sm_v_p7_1
Complete replay recipe: dependency imports + authored proof
pa prove exists sm_x_p7_1. exists sm_u_p7_1 sm_v_p7_1. sm_x_p7_1 * sm_x_p7_1 + 7 * sm_u_p7_1 = 1 + 7 * sm_v_p7_1
exists 1
exists 0
exists 0
norm_num
qed
- Occurrences
- 65
- Distinct objects
- 65
- Reused references
- 0
- Depth
- 18
- Cuts
- 0
- Certificate SHA-256
dd095ced1763…
qres_mod7_twoQres mod7 two
Quadratic reciprocity campaign
checked
The canonical value 2 is a quadratic residue modulo 7.
Exact expanded PA statement
exists sm_x_p7_2. exists sm_u_p7_2 sm_v_p7_2. sm_x_p7_2 * sm_x_p7_2 + 7 * sm_u_p7_2 = 2 + 7 * sm_v_p7_2
Complete replay recipe: dependency imports + authored proof
pa prove exists sm_x_p7_2. exists sm_u_p7_2 sm_v_p7_2. sm_x_p7_2 * sm_x_p7_2 + 7 * sm_u_p7_2 = 2 + 7 * sm_v_p7_2
exists 3
exists 0
exists 1
norm_num
qed
- Occurrences
- 208
- Distinct objects
- 208
- Reused references
- 0
- Depth
- 27
- Cuts
- 0
- Certificate SHA-256
09fb90ef9c88…
qres_mod7_fourQres mod7 four
Quadratic reciprocity campaign
checked
The canonical value 4 is a quadratic residue modulo 7.
Exact expanded PA statement
exists sm_x_p7_4. exists sm_u_p7_4 sm_v_p7_4. sm_x_p7_4 * sm_x_p7_4 + 7 * sm_u_p7_4 = 4 + 7 * sm_v_p7_4
Complete replay recipe: dependency imports + authored proof
pa prove exists sm_x_p7_4. exists sm_u_p7_4 sm_v_p7_4. sm_x_p7_4 * sm_x_p7_4 + 7 * sm_u_p7_4 = 4 + 7 * sm_v_p7_4
exists 2
exists 0
exists 0
norm_num
qed
- Occurrences
- 94
- Distinct objects
- 94
- Reused references
- 0
- Depth
- 18
- Cuts
- 0
- Certificate SHA-256
799fce5f8cc7…
qres_mod3_canonical_iffQres mod3 canonical iff
Quadratic reciprocity campaign
checked
For canonical values, the displayed list is exactly QRes modulo 3.
Exact expanded PA statement
forall a. (exists h. h + S a = 3) -> (((exists sm_x_iffq3. exists sm_u_iffq3 sm_v_iffq3. sm_x_iffq3 * sm_x_iffq3 + 3 * sm_u_iffq3 = a + 3 * sm_v_iffq3) -> (a = 0 \/ a = 1)) /\ ((a = 0 \/ a = 1) -> (exists sm_x_iffq3. exists sm_u_iffq3 sm_v_iffq3. sm_x_iffq3 * sm_x_iffq3 + 3 * sm_u_iffq3 = a + 3 * sm_v_iffq3)))
Complete replay recipe: dependency imports + authored proof
pa prove forall a. (exists h. h + S a = 3) -> (((exists sm_x_iffq3. exists sm_u_iffq3 sm_v_iffq3. sm_x_iffq3 * sm_x_iffq3 + 3 * sm_u_iffq3 = a + 3 * sm_v_iffq3) -> (a = 0 \/ a = 1)) /\ ((a = 0 \/ a = 1) -> (exists sm_x_iffq3. exists sm_u_iffq3 sm_v_iffq3. sm_x_iffq3 * sm_x_iffq3 + 3 * sm_u_iffq3 = a + 3 * sm_v_iffq3)))
use quadratic_residue_bounded_equiv
use succ_ne_zero
use bounded_square_mod3_classify
use qres_mod3_zero
use qres_mod3_one
intro a
intro ha
split
intro hq
have hequiv : ((exists sm_x_iffq3. exists sm_u_iffq3 sm_v_iffq3. sm_x_iffq3 * sm_x_iffq3 + 3 * sm_u_iffq3 = a + 3 * sm_v_iffq3) -> (exists sm_x_iffb3. (exists sm_h_iffb3. sm_h_iffb3 + S sm_x_iffb3 = 3) /\ exists sm_u_iffb3 sm_v_iffb3. sm_x_iffb3 * sm_x_iffb3 + 3 * sm_u_iffb3 = a + 3 * sm_v_iffb3)) /\ ((exists sm_x_iffb3. (exists sm_h_iffb3. sm_h_iffb3 + S sm_x_iffb3 = 3) /\ exists sm_u_iffb3 sm_v_iffb3. sm_x_iffb3 * sm_x_iffb3 + 3 * sm_u_iffb3 = a + 3 * sm_v_iffb3) -> (exists sm_x_iffq3. exists sm_u_iffq3 sm_v_iffq3. sm_x_iffq3 * sm_x_iffq3 + 3 * sm_u_iffq3 = a + 3 * sm_v_iffq3))
specialize quadratic_residue_bounded_equiv 3
specialize quadratic_residue_bounded_equiv a
apply quadratic_residue_bounded_equiv
specialize succ_ne_zero 2
exact succ_ne_zero
cases hequiv
have hb : exists sm_x_iffb3. (exists sm_h_iffb3. sm_h_iffb3 + S sm_x_iffb3 = 3) /\ exists sm_u_iffb3 sm_v_iffb3. sm_x_iffb3 * sm_x_iffb3 + 3 * sm_u_iffb3 = a + 3 * sm_v_iffb3
apply hequiv_left
exact hq
specialize bounded_square_mod3_classify a
apply bounded_square_mod3_classify
exact ha
exact hb
intro hcases
cases hcases
rewrite hcases_left
exact qres_mod3_zero
rewrite hcases_right
exact qres_mod3_one
qed
- Occurrences
- 4,050
- Distinct objects
- 1,850
- Reused references
- 81
- Depth
- 65
- Cuts
- 110
- Certificate SHA-256
9149885aeda4…
qres_mod5_canonical_iffQres mod5 canonical iff
Quadratic reciprocity campaign
checked
For canonical values, the displayed list is exactly QRes modulo 5.
Exact expanded PA statement
forall a. (exists h. h + S a = 5) -> (((exists sm_x_iffq5. exists sm_u_iffq5 sm_v_iffq5. sm_x_iffq5 * sm_x_iffq5 + 5 * sm_u_iffq5 = a + 5 * sm_v_iffq5) -> (a = 0 \/ a = 1 \/ a = 4)) /\ ((a = 0 \/ a = 1 \/ a = 4) -> (exists sm_x_iffq5. exists sm_u_iffq5 sm_v_iffq5. sm_x_iffq5 * sm_x_iffq5 + 5 * sm_u_iffq5 = a + 5 * sm_v_iffq5)))
Complete replay recipe: dependency imports + authored proof
pa prove forall a. (exists h. h + S a = 5) -> (((exists sm_x_iffq5. exists sm_u_iffq5 sm_v_iffq5. sm_x_iffq5 * sm_x_iffq5 + 5 * sm_u_iffq5 = a + 5 * sm_v_iffq5) -> (a = 0 \/ a = 1 \/ a = 4)) /\ ((a = 0 \/ a = 1 \/ a = 4) -> (exists sm_x_iffq5. exists sm_u_iffq5 sm_v_iffq5. sm_x_iffq5 * sm_x_iffq5 + 5 * sm_u_iffq5 = a + 5 * sm_v_iffq5)))
use quadratic_residue_bounded_equiv
use succ_ne_zero
use bounded_square_mod5_classify
use qres_mod5_zero
use qres_mod5_one
use qres_mod5_four
intro a
intro ha
split
intro hq
have hequiv : ((exists sm_x_iffq5. exists sm_u_iffq5 sm_v_iffq5. sm_x_iffq5 * sm_x_iffq5 + 5 * sm_u_iffq5 = a + 5 * sm_v_iffq5) -> (exists sm_x_iffb5. (exists sm_h_iffb5. sm_h_iffb5 + S sm_x_iffb5 = 5) /\ exists sm_u_iffb5 sm_v_iffb5. sm_x_iffb5 * sm_x_iffb5 + 5 * sm_u_iffb5 = a + 5 * sm_v_iffb5)) /\ ((exists sm_x_iffb5. (exists sm_h_iffb5. sm_h_iffb5 + S sm_x_iffb5 = 5) /\ exists sm_u_iffb5 sm_v_iffb5. sm_x_iffb5 * sm_x_iffb5 + 5 * sm_u_iffb5 = a + 5 * sm_v_iffb5) -> (exists sm_x_iffq5. exists sm_u_iffq5 sm_v_iffq5. sm_x_iffq5 * sm_x_iffq5 + 5 * sm_u_iffq5 = a + 5 * sm_v_iffq5))
specialize quadratic_residue_bounded_equiv 5
specialize quadratic_residue_bounded_equiv a
apply quadratic_residue_bounded_equiv
specialize succ_ne_zero 4
exact succ_ne_zero
cases hequiv
have hb : exists sm_x_iffb5. (exists sm_h_iffb5. sm_h_iffb5 + S sm_x_iffb5 = 5) /\ exists sm_u_iffb5 sm_v_iffb5. sm_x_iffb5 * sm_x_iffb5 + 5 * sm_u_iffb5 = a + 5 * sm_v_iffb5
apply hequiv_left
exact hq
specialize bounded_square_mod5_classify a
apply bounded_square_mod5_classify
exact ha
exact hb
intro hcases
cases hcases
cases hcases_left
rewrite hcases_left_left
exact qres_mod5_zero
rewrite hcases_left_right
exact qres_mod5_one
rewrite hcases_right
exact qres_mod5_four
qed
- Occurrences
- 4,955
- Distinct objects
- 2,641
- Reused references
- 83
- Depth
- 65
- Cuts
- 117
- Certificate SHA-256
d169f89bd8a7…
qres_mod7_canonical_iffQres mod7 canonical iff
Quadratic reciprocity campaign
checked
For canonical values, the displayed list is exactly QRes modulo 7.
Exact expanded PA statement
forall a. (exists h. h + S a = 7) -> (((exists sm_x_iffq7. exists sm_u_iffq7 sm_v_iffq7. sm_x_iffq7 * sm_x_iffq7 + 7 * sm_u_iffq7 = a + 7 * sm_v_iffq7) -> (a = 0 \/ a = 1 \/ a = 2 \/ a = 4)) /\ ((a = 0 \/ a = 1 \/ a = 2 \/ a = 4) -> (exists sm_x_iffq7. exists sm_u_iffq7 sm_v_iffq7. sm_x_iffq7 * sm_x_iffq7 + 7 * sm_u_iffq7 = a + 7 * sm_v_iffq7)))
Complete replay recipe: dependency imports + authored proof
pa prove forall a. (exists h. h + S a = 7) -> (((exists sm_x_iffq7. exists sm_u_iffq7 sm_v_iffq7. sm_x_iffq7 * sm_x_iffq7 + 7 * sm_u_iffq7 = a + 7 * sm_v_iffq7) -> (a = 0 \/ a = 1 \/ a = 2 \/ a = 4)) /\ ((a = 0 \/ a = 1 \/ a = 2 \/ a = 4) -> (exists sm_x_iffq7. exists sm_u_iffq7 sm_v_iffq7. sm_x_iffq7 * sm_x_iffq7 + 7 * sm_u_iffq7 = a + 7 * sm_v_iffq7)))
use quadratic_residue_bounded_equiv
use succ_ne_zero
use bounded_square_mod7_classify
use qres_mod7_zero
use qres_mod7_one
use qres_mod7_two
use qres_mod7_four
intro a
intro ha
split
intro hq
have hequiv : ((exists sm_x_iffq7. exists sm_u_iffq7 sm_v_iffq7. sm_x_iffq7 * sm_x_iffq7 + 7 * sm_u_iffq7 = a + 7 * sm_v_iffq7) -> (exists sm_x_iffb7. (exists sm_h_iffb7. sm_h_iffb7 + S sm_x_iffb7 = 7) /\ exists sm_u_iffb7 sm_v_iffb7. sm_x_iffb7 * sm_x_iffb7 + 7 * sm_u_iffb7 = a + 7 * sm_v_iffb7)) /\ ((exists sm_x_iffb7. (exists sm_h_iffb7. sm_h_iffb7 + S sm_x_iffb7 = 7) /\ exists sm_u_iffb7 sm_v_iffb7. sm_x_iffb7 * sm_x_iffb7 + 7 * sm_u_iffb7 = a + 7 * sm_v_iffb7) -> (exists sm_x_iffq7. exists sm_u_iffq7 sm_v_iffq7. sm_x_iffq7 * sm_x_iffq7 + 7 * sm_u_iffq7 = a + 7 * sm_v_iffq7))
specialize quadratic_residue_bounded_equiv 7
specialize quadratic_residue_bounded_equiv a
apply quadratic_residue_bounded_equiv
specialize succ_ne_zero 6
exact succ_ne_zero
cases hequiv
have hb : exists sm_x_iffb7. (exists sm_h_iffb7. sm_h_iffb7 + S sm_x_iffb7 = 7) /\ exists sm_u_iffb7 sm_v_iffb7. sm_x_iffb7 * sm_x_iffb7 + 7 * sm_u_iffb7 = a + 7 * sm_v_iffb7
apply hequiv_left
exact hq
specialize bounded_square_mod7_classify a
apply bounded_square_mod7_classify
exact ha
exact hb
intro hcases
cases hcases
cases hcases_left
cases hcases_left_left
rewrite hcases_left_left_left
exact qres_mod7_zero
rewrite hcases_left_left_right
exact qres_mod7_one
rewrite hcases_left_right
exact qres_mod7_two
rewrite hcases_right
exact qres_mod7_four
qed
- Occurrences
- 6,648
- Distinct objects
- 4,220
- Reused references
- 85
- Depth
- 94
- Cuts
- 124
- Certificate SHA-256
dfcdeffddc5d…
not_qres_mod3_twoNot qres mod3 two
Quadratic reciprocity campaign
checked
The canonical value 2 is not a quadratic residue modulo 3.
Exact expanded PA statement
~(exists sm_x_n3_2. exists sm_u_n3_2 sm_v_n3_2. sm_x_n3_2 * sm_x_n3_2 + 3 * sm_u_n3_2 = 2 + 3 * sm_v_n3_2)
Complete replay recipe: dependency imports + authored proof
pa prove ~(exists sm_x_n3_2. exists sm_u_n3_2 sm_v_n3_2. sm_x_n3_2 * sm_x_n3_2 + 3 * sm_u_n3_2 = 2 + 3 * sm_v_n3_2)
use qres_mod3_canonical_iff
use succ_injective
intro hq
have ha : exists h. h + S 2 = 3
exists 0
norm_num
have hiff : (((exists sm_x_ni3_2. exists sm_u_ni3_2 sm_v_ni3_2. sm_x_ni3_2 * sm_x_ni3_2 + 3 * sm_u_ni3_2 = 2 + 3 * sm_v_ni3_2) -> (2 = 0 \/ 2 = 1)) /\ ((2 = 0 \/ 2 = 1) -> (exists sm_x_ni3_2. exists sm_u_ni3_2 sm_v_ni3_2. sm_x_ni3_2 * sm_x_ni3_2 + 3 * sm_u_ni3_2 = 2 + 3 * sm_v_ni3_2)))
specialize qres_mod3_canonical_iff 2
apply qres_mod3_canonical_iff
exact ha
cases hiff
have hcases : 2 = 0 \/ 2 = 1
apply hiff_left
exact hq
cases hcases
apply PA1
exact hcases_left
have hne_3_2_1_0 : 1 = 0
specialize succ_injective 1
specialize succ_injective 0
apply succ_injective
exact hcases_right
apply PA1
exact hne_3_2_1_0
qed
- Occurrences
- 4,103
- Distinct objects
- 1,903
- Reused references
- 81
- Depth
- 66
- Cuts
- 112
- Certificate SHA-256
ca0da90b4e2e…
not_qres_mod5_twoNot qres mod5 two
Quadratic reciprocity campaign
checked
The canonical value 2 is not a quadratic residue modulo 5.
Exact expanded PA statement
~(exists sm_x_n5_2. exists sm_u_n5_2 sm_v_n5_2. sm_x_n5_2 * sm_x_n5_2 + 5 * sm_u_n5_2 = 2 + 5 * sm_v_n5_2)
Complete replay recipe: dependency imports + authored proof
pa prove ~(exists sm_x_n5_2. exists sm_u_n5_2 sm_v_n5_2. sm_x_n5_2 * sm_x_n5_2 + 5 * sm_u_n5_2 = 2 + 5 * sm_v_n5_2)
use qres_mod5_canonical_iff
use succ_injective
intro hq
have ha : exists h. h + S 2 = 5
exists 2
norm_num
have hiff : (((exists sm_x_ni5_2. exists sm_u_ni5_2 sm_v_ni5_2. sm_x_ni5_2 * sm_x_ni5_2 + 5 * sm_u_ni5_2 = 2 + 5 * sm_v_ni5_2) -> (2 = 0 \/ 2 = 1 \/ 2 = 4)) /\ ((2 = 0 \/ 2 = 1 \/ 2 = 4) -> (exists sm_x_ni5_2. exists sm_u_ni5_2 sm_v_ni5_2. sm_x_ni5_2 * sm_x_ni5_2 + 5 * sm_u_ni5_2 = 2 + 5 * sm_v_ni5_2)))
specialize qres_mod5_canonical_iff 2
apply qres_mod5_canonical_iff
exact ha
cases hiff
have hcases : 2 = 0 \/ 2 = 1 \/ 2 = 4
apply hiff_left
exact hq
cases hcases
cases hcases_left
apply PA1
exact hcases_left_left
have hne_5_2_1_0 : 1 = 0
specialize succ_injective 1
specialize succ_injective 0
apply succ_injective
exact hcases_left_right
apply PA1
exact hne_5_2_1_0
have hne_5_2_4_0 : 1 = 3
specialize succ_injective 1
specialize succ_injective 3
apply succ_injective
exact hcases_right
have hne_5_2_4_1 : 0 = 2
specialize succ_injective 0
specialize succ_injective 2
apply succ_injective
exact hne_5_2_4_0
apply PA1
symm
exact hne_5_2_4_1
qed
- Occurrences
- 5,025
- Distinct objects
- 2,711
- Reused references
- 83
- Depth
- 66
- Cuts
- 119
- Certificate SHA-256
68ff6335aa92…
not_qres_mod5_threeNot qres mod5 three
Quadratic reciprocity campaign
checked
The canonical value 3 is not a quadratic residue modulo 5.
Exact expanded PA statement
~(exists sm_x_n5_3. exists sm_u_n5_3 sm_v_n5_3. sm_x_n5_3 * sm_x_n5_3 + 5 * sm_u_n5_3 = 3 + 5 * sm_v_n5_3)
Complete replay recipe: dependency imports + authored proof
pa prove ~(exists sm_x_n5_3. exists sm_u_n5_3 sm_v_n5_3. sm_x_n5_3 * sm_x_n5_3 + 5 * sm_u_n5_3 = 3 + 5 * sm_v_n5_3)
use qres_mod5_canonical_iff
use succ_injective
intro hq
have ha : exists h. h + S 3 = 5
exists 1
norm_num
have hiff : (((exists sm_x_ni5_3. exists sm_u_ni5_3 sm_v_ni5_3. sm_x_ni5_3 * sm_x_ni5_3 + 5 * sm_u_ni5_3 = 3 + 5 * sm_v_ni5_3) -> (3 = 0 \/ 3 = 1 \/ 3 = 4)) /\ ((3 = 0 \/ 3 = 1 \/ 3 = 4) -> (exists sm_x_ni5_3. exists sm_u_ni5_3 sm_v_ni5_3. sm_x_ni5_3 * sm_x_ni5_3 + 5 * sm_u_ni5_3 = 3 + 5 * sm_v_ni5_3)))
specialize qres_mod5_canonical_iff 3
apply qres_mod5_canonical_iff
exact ha
cases hiff
have hcases : 3 = 0 \/ 3 = 1 \/ 3 = 4
apply hiff_left
exact hq
cases hcases
cases hcases_left
apply PA1
exact hcases_left_left
have hne_5_3_1_0 : 2 = 0
specialize succ_injective 2
specialize succ_injective 0
apply succ_injective
exact hcases_left_right
apply PA1
exact hne_5_3_1_0
have hne_5_3_4_0 : 2 = 3
specialize succ_injective 2
specialize succ_injective 3
apply succ_injective
exact hcases_right
have hne_5_3_4_1 : 1 = 2
specialize succ_injective 1
specialize succ_injective 2
apply succ_injective
exact hne_5_3_4_0
have hne_5_3_4_2 : 0 = 1
specialize succ_injective 0
specialize succ_injective 1
apply succ_injective
exact hne_5_3_4_1
apply PA1
symm
exact hne_5_3_4_2
qed
- Occurrences
- 5,034
- Distinct objects
- 2,720
- Reused references
- 83
- Depth
- 66
- Cuts
- 119
- Certificate SHA-256
18527b818202…
not_qres_mod7_threeNot qres mod7 three
Quadratic reciprocity campaign
checked
The canonical value 3 is not a quadratic residue modulo 7.
Exact expanded PA statement
~(exists sm_x_n7_3. exists sm_u_n7_3 sm_v_n7_3. sm_x_n7_3 * sm_x_n7_3 + 7 * sm_u_n7_3 = 3 + 7 * sm_v_n7_3)
Complete replay recipe: dependency imports + authored proof
pa prove ~(exists sm_x_n7_3. exists sm_u_n7_3 sm_v_n7_3. sm_x_n7_3 * sm_x_n7_3 + 7 * sm_u_n7_3 = 3 + 7 * sm_v_n7_3)
use qres_mod7_canonical_iff
use succ_injective
intro hq
have ha : exists h. h + S 3 = 7
exists 3
norm_num
have hiff : (((exists sm_x_ni7_3. exists sm_u_ni7_3 sm_v_ni7_3. sm_x_ni7_3 * sm_x_ni7_3 + 7 * sm_u_ni7_3 = 3 + 7 * sm_v_ni7_3) -> (3 = 0 \/ 3 = 1 \/ 3 = 2 \/ 3 = 4)) /\ ((3 = 0 \/ 3 = 1 \/ 3 = 2 \/ 3 = 4) -> (exists sm_x_ni7_3. exists sm_u_ni7_3 sm_v_ni7_3. sm_x_ni7_3 * sm_x_ni7_3 + 7 * sm_u_ni7_3 = 3 + 7 * sm_v_ni7_3)))
specialize qres_mod7_canonical_iff 3
apply qres_mod7_canonical_iff
exact ha
cases hiff
have hcases : 3 = 0 \/ 3 = 1 \/ 3 = 2 \/ 3 = 4
apply hiff_left
exact hq
cases hcases
cases hcases_left
cases hcases_left_left
apply PA1
exact hcases_left_left_left
have hne_7_3_1_0 : 2 = 0
specialize succ_injective 2
specialize succ_injective 0
apply succ_injective
exact hcases_left_left_right
apply PA1
exact hne_7_3_1_0
have hne_7_3_2_0 : 2 = 1
specialize succ_injective 2
specialize succ_injective 1
apply succ_injective
exact hcases_left_right
have hne_7_3_2_1 : 1 = 0
specialize succ_injective 1
specialize succ_injective 0
apply succ_injective
exact hne_7_3_2_0
apply PA1
exact hne_7_3_2_1
have hne_7_3_4_0 : 2 = 3
specialize succ_injective 2
specialize succ_injective 3
apply succ_injective
exact hcases_right
have hne_7_3_4_1 : 1 = 2
specialize succ_injective 1
specialize succ_injective 2
apply succ_injective
exact hne_7_3_4_0
have hne_7_3_4_2 : 0 = 1
specialize succ_injective 0
specialize succ_injective 1
apply succ_injective
exact hne_7_3_4_1
apply PA1
symm
exact hne_7_3_4_2
qed
- Occurrences
- 6,743
- Distinct objects
- 4,315
- Reused references
- 85
- Depth
- 95
- Cuts
- 126
- Certificate SHA-256
f745ebc50714…
not_qres_mod7_fiveNot qres mod7 five
Quadratic reciprocity campaign
checked
The canonical value 5 is not a quadratic residue modulo 7.
Exact expanded PA statement
~(exists sm_x_n7_5. exists sm_u_n7_5 sm_v_n7_5. sm_x_n7_5 * sm_x_n7_5 + 7 * sm_u_n7_5 = 5 + 7 * sm_v_n7_5)
Complete replay recipe: dependency imports + authored proof
pa prove ~(exists sm_x_n7_5. exists sm_u_n7_5 sm_v_n7_5. sm_x_n7_5 * sm_x_n7_5 + 7 * sm_u_n7_5 = 5 + 7 * sm_v_n7_5)
use qres_mod7_canonical_iff
use succ_injective
intro hq
have ha : exists h. h + S 5 = 7
exists 1
norm_num
have hiff : (((exists sm_x_ni7_5. exists sm_u_ni7_5 sm_v_ni7_5. sm_x_ni7_5 * sm_x_ni7_5 + 7 * sm_u_ni7_5 = 5 + 7 * sm_v_ni7_5) -> (5 = 0 \/ 5 = 1 \/ 5 = 2 \/ 5 = 4)) /\ ((5 = 0 \/ 5 = 1 \/ 5 = 2 \/ 5 = 4) -> (exists sm_x_ni7_5. exists sm_u_ni7_5 sm_v_ni7_5. sm_x_ni7_5 * sm_x_ni7_5 + 7 * sm_u_ni7_5 = 5 + 7 * sm_v_ni7_5)))
specialize qres_mod7_canonical_iff 5
apply qres_mod7_canonical_iff
exact ha
cases hiff
have hcases : 5 = 0 \/ 5 = 1 \/ 5 = 2 \/ 5 = 4
apply hiff_left
exact hq
cases hcases
cases hcases_left
cases hcases_left_left
apply PA1
exact hcases_left_left_left
have hne_7_5_1_0 : 4 = 0
specialize succ_injective 4
specialize succ_injective 0
apply succ_injective
exact hcases_left_left_right
apply PA1
exact hne_7_5_1_0
have hne_7_5_2_0 : 4 = 1
specialize succ_injective 4
specialize succ_injective 1
apply succ_injective
exact hcases_left_right
have hne_7_5_2_1 : 3 = 0
specialize succ_injective 3
specialize succ_injective 0
apply succ_injective
exact hne_7_5_2_0
apply PA1
exact hne_7_5_2_1
have hne_7_5_4_0 : 4 = 3
specialize succ_injective 4
specialize succ_injective 3
apply succ_injective
exact hcases_right
have hne_7_5_4_1 : 3 = 2
specialize succ_injective 3
specialize succ_injective 2
apply succ_injective
exact hne_7_5_4_0
have hne_7_5_4_2 : 2 = 1
specialize succ_injective 2
specialize succ_injective 1
apply succ_injective
exact hne_7_5_4_1
have hne_7_5_4_3 : 1 = 0
specialize succ_injective 1
specialize succ_injective 0
apply succ_injective
exact hne_7_5_4_2
apply PA1
exact hne_7_5_4_3
qed
- Occurrences
- 6,756
- Distinct objects
- 4,328
- Reused references
- 85
- Depth
- 95
- Cuts
- 126
- Certificate SHA-256
04d3f09358e5…
not_qres_mod7_sixNot qres mod7 six
Quadratic reciprocity campaign
checked
The canonical value 6 is not a quadratic residue modulo 7.
Exact expanded PA statement
~(exists sm_x_n7_6. exists sm_u_n7_6 sm_v_n7_6. sm_x_n7_6 * sm_x_n7_6 + 7 * sm_u_n7_6 = 6 + 7 * sm_v_n7_6)
Complete replay recipe: dependency imports + authored proof
pa prove ~(exists sm_x_n7_6. exists sm_u_n7_6 sm_v_n7_6. sm_x_n7_6 * sm_x_n7_6 + 7 * sm_u_n7_6 = 6 + 7 * sm_v_n7_6)
use qres_mod7_canonical_iff
use succ_injective
intro hq
have ha : exists h. h + S 6 = 7
exists 0
norm_num
have hiff : (((exists sm_x_ni7_6. exists sm_u_ni7_6 sm_v_ni7_6. sm_x_ni7_6 * sm_x_ni7_6 + 7 * sm_u_ni7_6 = 6 + 7 * sm_v_ni7_6) -> (6 = 0 \/ 6 = 1 \/ 6 = 2 \/ 6 = 4)) /\ ((6 = 0 \/ 6 = 1 \/ 6 = 2 \/ 6 = 4) -> (exists sm_x_ni7_6. exists sm_u_ni7_6 sm_v_ni7_6. sm_x_ni7_6 * sm_x_ni7_6 + 7 * sm_u_ni7_6 = 6 + 7 * sm_v_ni7_6)))
specialize qres_mod7_canonical_iff 6
apply qres_mod7_canonical_iff
exact ha
cases hiff
have hcases : 6 = 0 \/ 6 = 1 \/ 6 = 2 \/ 6 = 4
apply hiff_left
exact hq
cases hcases
cases hcases_left
cases hcases_left_left
apply PA1
exact hcases_left_left_left
have hne_7_6_1_0 : 5 = 0
specialize succ_injective 5
specialize succ_injective 0
apply succ_injective
exact hcases_left_left_right
apply PA1
exact hne_7_6_1_0
have hne_7_6_2_0 : 5 = 1
specialize succ_injective 5
specialize succ_injective 1
apply succ_injective
exact hcases_left_right
have hne_7_6_2_1 : 4 = 0
specialize succ_injective 4
specialize succ_injective 0
apply succ_injective
exact hne_7_6_2_0
apply PA1
exact hne_7_6_2_1
have hne_7_6_4_0 : 5 = 3
specialize succ_injective 5
specialize succ_injective 3
apply succ_injective
exact hcases_right
have hne_7_6_4_1 : 4 = 2
specialize succ_injective 4
specialize succ_injective 2
apply succ_injective
exact hne_7_6_4_0
have hne_7_6_4_2 : 3 = 1
specialize succ_injective 3
specialize succ_injective 1
apply succ_injective
exact hne_7_6_4_1
have hne_7_6_4_3 : 2 = 0
specialize succ_injective 2
specialize succ_injective 0
apply succ_injective
exact hne_7_6_4_2
apply PA1
exact hne_7_6_4_3
qed
- Occurrences
- 6,761
- Distinct objects
- 4,333
- Reused references
- 85
- Depth
- 95
- Cuts
- 126
- Certificate SHA-256
2792d0f8a79a…
pow_two_from_one_successorPow two from one successor
Quadratic reciprocity campaign
checked
A successor of exponent one gives the relational square.
Exact expanded PA statement
forall a o e n. o = 1 -> e = S o -> (exists ff_b_two_carrier ff_c_two_carrier. ((forall ff_i_two_carrier_repeat. (exists ff_lt_two_carrier_repeat_bound. ff_lt_two_carrier_repeat_bound + S ff_i_two_carrier_repeat = e) -> (((exists ff_h_two_carrier_repeat_decoded. ff_h_two_carrier_repeat_decoded + S (a) = S ((S (ff_i_two_carrier_repeat)) * ff_c_two_carrier)) /\ exists ff_q_two_carrier_repeat_decoded. ff_b_two_carrier = ff_q_two_carrier_repeat_decoded * S ((S (ff_i_two_carrier_repeat)) * ff_c_two_carrier) + (a)))) /\ (exists ff_u_two_carrier_product ff_v_two_carrier_product. ((((exists ff_h_two_carrier_product_start. ff_h_two_carrier_product_start + S (1) = S ((S (0)) * ff_v_two_carrier_product)) /\ exists ff_q_two_carrier_product_start. ff_u_two_carrier_product = ff_q_two_carrier_product_start * S ((S (0)) * ff_v_two_carrier_product) + (1))) /\ ((((exists ff_h_two_carrier_product_terminal. ff_h_two_carrier_product_terminal + S (n) = S ((S (e)) * ff_v_two_carrier_product)) /\ exists ff_q_two_carrier_product_terminal. ff_u_two_carrier_product = ff_q_two_carrier_product_terminal * S ((S (e)) * ff_v_two_carrier_product) + (n))) /\ forall ff_i_two_carrier_product. (exists ff_lt_two_carrier_product_bound. ff_lt_two_carrier_product_bound + S ff_i_two_carrier_product = e) -> exists ff_p_two_carrier_product ff_r_two_carrier_product ff_s_two_carrier_product. ((((exists ff_h_two_carrier_product_factor. ff_h_two_carrier_product_factor + S (ff_p_two_carrier_product) = S ((S (ff_i_two_carrier_product)) * ff_c_two_carrier)) /\ exists ff_q_two_carrier_product_factor. ff_b_two_carrier = ff_q_two_carrier_product_factor * S ((S (ff_i_two_carrier_product)) * ff_c_two_carrier) + (ff_p_two_carrier_product))) /\ ((((exists ff_h_two_carrier_product_partial. ff_h_two_carrier_product_partial + S (ff_r_two_carrier_product) = S ((S (ff_i_two_carrier_product)) * ff_v_two_carrier_product)) /\ exists ff_q_two_carrier_product_partial. ff_u_two_carrier_product = ff_q_two_carrier_product_partial * S ((S (ff_i_two_carrier_product)) * ff_v_two_carrier_product) + (ff_r_two_carrier_product))) /\ ((((exists ff_h_two_carrier_product_successor. ff_h_two_carrier_product_successor + S (ff_s_two_carrier_product) = S ((S (S ff_i_two_carrier_product)) * ff_v_two_carrier_product)) /\ exists ff_q_two_carrier_product_successor. ff_u_two_carrier_product = ff_q_two_carrier_product_successor * S ((S (S ff_i_two_carrier_product)) * ff_v_two_carrier_product) + (ff_s_two_carrier_product))) /\ ff_s_two_carrier_product = ff_r_two_carrier_product * ff_p_two_carrier_product)))))))) -> n = a * a
Complete replay recipe: dependency imports + authored proof
pa prove forall a o e n. o = 1 -> e = S o -> (exists ff_b_two_carrier ff_c_two_carrier. ((forall ff_i_two_carrier_repeat. (exists ff_lt_two_carrier_repeat_bound. ff_lt_two_carrier_repeat_bound + S ff_i_two_carrier_repeat = e) -> (((exists ff_h_two_carrier_repeat_decoded. ff_h_two_carrier_repeat_decoded + S (a) = S ((S (ff_i_two_carrier_repeat)) * ff_c_two_carrier)) /\ exists ff_q_two_carrier_repeat_decoded. ff_b_two_carrier = ff_q_two_carrier_repeat_decoded * S ((S (ff_i_two_carrier_repeat)) * ff_c_two_carrier) + (a)))) /\ (exists ff_u_two_carrier_product ff_v_two_carrier_product. ((((exists ff_h_two_carrier_product_start. ff_h_two_carrier_product_start + S (1) = S ((S (0)) * ff_v_two_carrier_product)) /\ exists ff_q_two_carrier_product_start. ff_u_two_carrier_product = ff_q_two_carrier_product_start * S ((S (0)) * ff_v_two_carrier_product) + (1))) /\ ((((exists ff_h_two_carrier_product_terminal. ff_h_two_carrier_product_terminal + S (n) = S ((S (e)) * ff_v_two_carrier_product)) /\ exists ff_q_two_carrier_product_terminal. ff_u_two_carrier_product = ff_q_two_carrier_product_terminal * S ((S (e)) * ff_v_two_carrier_product) + (n))) /\ forall ff_i_two_carrier_product. (exists ff_lt_two_carrier_product_bound. ff_lt_two_carrier_product_bound + S ff_i_two_carrier_product = e) -> exists ff_p_two_carrier_product ff_r_two_carrier_product ff_s_two_carrier_product. ((((exists ff_h_two_carrier_product_factor. ff_h_two_carrier_product_factor + S (ff_p_two_carrier_product) = S ((S (ff_i_two_carrier_product)) * ff_c_two_carrier)) /\ exists ff_q_two_carrier_product_factor. ff_b_two_carrier = ff_q_two_carrier_product_factor * S ((S (ff_i_two_carrier_product)) * ff_c_two_carrier) + (ff_p_two_carrier_product))) /\ ((((exists ff_h_two_carrier_product_partial. ff_h_two_carrier_product_partial + S (ff_r_two_carrier_product) = S ((S (ff_i_two_carrier_product)) * ff_v_two_carrier_product)) /\ exists ff_q_two_carrier_product_partial. ff_u_two_carrier_product = ff_q_two_carrier_product_partial * S ((S (ff_i_two_carrier_product)) * ff_v_two_carrier_product) + (ff_r_two_carrier_product))) /\ ((((exists ff_h_two_carrier_product_successor. ff_h_two_carrier_product_successor + S (ff_s_two_carrier_product) = S ((S (S ff_i_two_carrier_product)) * ff_v_two_carrier_product)) /\ exists ff_q_two_carrier_product_successor. ff_u_two_carrier_product = ff_q_two_carrier_product_successor * S ((S (S ff_i_two_carrier_product)) * ff_v_two_carrier_product) + (ff_s_two_carrier_product))) /\ ff_s_two_carrier_product = ff_r_two_carrier_product * ff_p_two_carrier_product)))))))) -> n = a * a
use pow_successor_decompose
use pow_one
intro a
intro o
intro e
intro n
intro ho
intro he
intro hpow
have hstep : exists r. (exists ff_b_two_predecessor ff_c_two_predecessor. ((forall ff_i_two_predecessor_repeat. (exists ff_lt_two_predecessor_repeat_bound. ff_lt_two_predecessor_repeat_bound + S ff_i_two_predecessor_repeat = o) -> (((exists ff_h_two_predecessor_repeat_decoded. ff_h_two_predecessor_repeat_decoded + S (a) = S ((S (ff_i_two_predecessor_repeat)) * ff_c_two_predecessor)) /\ exists ff_q_two_predecessor_repeat_decoded. ff_b_two_predecessor = ff_q_two_predecessor_repeat_decoded * S ((S (ff_i_two_predecessor_repeat)) * ff_c_two_predecessor) + (a)))) /\ (exists ff_u_two_predecessor_product ff_v_two_predecessor_product. ((((exists ff_h_two_predecessor_product_start. ff_h_two_predecessor_product_start + S (1) = S ((S (0)) * ff_v_two_predecessor_product)) /\ exists ff_q_two_predecessor_product_start. ff_u_two_predecessor_product = ff_q_two_predecessor_product_start * S ((S (0)) * ff_v_two_predecessor_product) + (1))) /\ ((((exists ff_h_two_predecessor_product_terminal. ff_h_two_predecessor_product_terminal + S (r) = S ((S (o)) * ff_v_two_predecessor_product)) /\ exists ff_q_two_predecessor_product_terminal. ff_u_two_predecessor_product = ff_q_two_predecessor_product_terminal * S ((S (o)) * ff_v_two_predecessor_product) + (r))) /\ forall ff_i_two_predecessor_product. (exists ff_lt_two_predecessor_product_bound. ff_lt_two_predecessor_product_bound + S ff_i_two_predecessor_product = o) -> exists ff_p_two_predecessor_product ff_r_two_predecessor_product ff_s_two_predecessor_product. ((((exists ff_h_two_predecessor_product_factor. ff_h_two_predecessor_product_factor + S (ff_p_two_predecessor_product) = S ((S (ff_i_two_predecessor_product)) * ff_c_two_predecessor)) /\ exists ff_q_two_predecessor_product_factor. ff_b_two_predecessor = ff_q_two_predecessor_product_factor * S ((S (ff_i_two_predecessor_product)) * ff_c_two_predecessor) + (ff_p_two_predecessor_product))) /\ ((((exists ff_h_two_predecessor_product_partial. ff_h_two_predecessor_product_partial + S (ff_r_two_predecessor_product) = S ((S (ff_i_two_predecessor_product)) * ff_v_two_predecessor_product)) /\ exists ff_q_two_predecessor_product_partial. ff_u_two_predecessor_product = ff_q_two_predecessor_product_partial * S ((S (ff_i_two_predecessor_product)) * ff_v_two_predecessor_product) + (ff_r_two_predecessor_product))) /\ ((((exists ff_h_two_predecessor_product_successor. ff_h_two_predecessor_product_successor + S (ff_s_two_predecessor_product) = S ((S (S ff_i_two_predecessor_product)) * ff_v_two_predecessor_product)) /\ exists ff_q_two_predecessor_product_successor. ff_u_two_predecessor_product = ff_q_two_predecessor_product_successor * S ((S (S ff_i_two_predecessor_product)) * ff_v_two_predecessor_product) + (ff_s_two_predecessor_product))) /\ ff_s_two_predecessor_product = ff_r_two_predecessor_product * ff_p_two_predecessor_product)))))))) /\ n = r * a
specialize pow_successor_decompose a
specialize pow_successor_decompose o
specialize pow_successor_decompose e
specialize pow_successor_decompose n
apply pow_successor_decompose
exact he
exact hpow
cases hstep
cases hstep_witness
have hr : x = a
specialize pow_one a
specialize pow_one o
specialize pow_one x
apply pow_one
exact ho
exact hstep_witness_left
trans x * a
exact hstep_witness_right
rewrite hr
refl
qed
- Occurrences
- 6,431
- Distinct objects
- 1,106
- Reused references
- 48
- Depth
- 67
- Cuts
- 182
- Certificate SHA-256
ebb79888472a…
pow_twoPow two
Quadratic reciprocity campaign
checked
The relational second power is exactly the square.
Exact expanded PA statement
forall a e n. e = 2 -> (exists ff_b_two ff_c_two. ((forall ff_i_two_repeat. (exists ff_lt_two_repeat_bound. ff_lt_two_repeat_bound + S ff_i_two_repeat = e) -> (((exists ff_h_two_repeat_decoded. ff_h_two_repeat_decoded + S (a) = S ((S (ff_i_two_repeat)) * ff_c_two)) /\ exists ff_q_two_repeat_decoded. ff_b_two = ff_q_two_repeat_decoded * S ((S (ff_i_two_repeat)) * ff_c_two) + (a)))) /\ (exists ff_u_two_product ff_v_two_product. ((((exists ff_h_two_product_start. ff_h_two_product_start + S (1) = S ((S (0)) * ff_v_two_product)) /\ exists ff_q_two_product_start. ff_u_two_product = ff_q_two_product_start * S ((S (0)) * ff_v_two_product) + (1))) /\ ((((exists ff_h_two_product_terminal. ff_h_two_product_terminal + S (n) = S ((S (e)) * ff_v_two_product)) /\ exists ff_q_two_product_terminal. ff_u_two_product = ff_q_two_product_terminal * S ((S (e)) * ff_v_two_product) + (n))) /\ forall ff_i_two_product. (exists ff_lt_two_product_bound. ff_lt_two_product_bound + S ff_i_two_product = e) -> exists ff_p_two_product ff_r_two_product ff_s_two_product. ((((exists ff_h_two_product_factor. ff_h_two_product_factor + S (ff_p_two_product) = S ((S (ff_i_two_product)) * ff_c_two)) /\ exists ff_q_two_product_factor. ff_b_two = ff_q_two_product_factor * S ((S (ff_i_two_product)) * ff_c_two) + (ff_p_two_product))) /\ ((((exists ff_h_two_product_partial. ff_h_two_product_partial + S (ff_r_two_product) = S ((S (ff_i_two_product)) * ff_v_two_product)) /\ exists ff_q_two_product_partial. ff_u_two_product = ff_q_two_product_partial * S ((S (ff_i_two_product)) * ff_v_two_product) + (ff_r_two_product))) /\ ((((exists ff_h_two_product_successor. ff_h_two_product_successor + S (ff_s_two_product) = S ((S (S ff_i_two_product)) * ff_v_two_product)) /\ exists ff_q_two_product_successor. ff_u_two_product = ff_q_two_product_successor * S ((S (S ff_i_two_product)) * ff_v_two_product) + (ff_s_two_product))) /\ ff_s_two_product = ff_r_two_product * ff_p_two_product)))))))) -> n = a * a
Complete replay recipe: dependency imports + authored proof
pa prove forall a e n. e = 2 -> (exists ff_b_two ff_c_two. ((forall ff_i_two_repeat. (exists ff_lt_two_repeat_bound. ff_lt_two_repeat_bound + S ff_i_two_repeat = e) -> (((exists ff_h_two_repeat_decoded. ff_h_two_repeat_decoded + S (a) = S ((S (ff_i_two_repeat)) * ff_c_two)) /\ exists ff_q_two_repeat_decoded. ff_b_two = ff_q_two_repeat_decoded * S ((S (ff_i_two_repeat)) * ff_c_two) + (a)))) /\ (exists ff_u_two_product ff_v_two_product. ((((exists ff_h_two_product_start. ff_h_two_product_start + S (1) = S ((S (0)) * ff_v_two_product)) /\ exists ff_q_two_product_start. ff_u_two_product = ff_q_two_product_start * S ((S (0)) * ff_v_two_product) + (1))) /\ ((((exists ff_h_two_product_terminal. ff_h_two_product_terminal + S (n) = S ((S (e)) * ff_v_two_product)) /\ exists ff_q_two_product_terminal. ff_u_two_product = ff_q_two_product_terminal * S ((S (e)) * ff_v_two_product) + (n))) /\ forall ff_i_two_product. (exists ff_lt_two_product_bound. ff_lt_two_product_bound + S ff_i_two_product = e) -> exists ff_p_two_product ff_r_two_product ff_s_two_product. ((((exists ff_h_two_product_factor. ff_h_two_product_factor + S (ff_p_two_product) = S ((S (ff_i_two_product)) * ff_c_two)) /\ exists ff_q_two_product_factor. ff_b_two = ff_q_two_product_factor * S ((S (ff_i_two_product)) * ff_c_two) + (ff_p_two_product))) /\ ((((exists ff_h_two_product_partial. ff_h_two_product_partial + S (ff_r_two_product) = S ((S (ff_i_two_product)) * ff_v_two_product)) /\ exists ff_q_two_product_partial. ff_u_two_product = ff_q_two_product_partial * S ((S (ff_i_two_product)) * ff_v_two_product) + (ff_r_two_product))) /\ ((((exists ff_h_two_product_successor. ff_h_two_product_successor + S (ff_s_two_product) = S ((S (S ff_i_two_product)) * ff_v_two_product)) /\ exists ff_q_two_product_successor. ff_u_two_product = ff_q_two_product_successor * S ((S (S ff_i_two_product)) * ff_v_two_product) + (ff_s_two_product))) /\ ff_s_two_product = ff_r_two_product * ff_p_two_product)))))))) -> n = a * a
use pow_two_from_one_successor
intro a
intro e
intro n
intro he
intro hpow
specialize pow_two_from_one_successor a
specialize pow_two_from_one_successor 1
specialize pow_two_from_one_successor e
specialize pow_two_from_one_successor n
apply pow_two_from_one_successor
refl
exact he
exact hpow
qed
- Occurrences
- 6,460
- Distinct objects
- 1,135
- Reused references
- 48
- Depth
- 68
- Cuts
- 183
- Certificate SHA-256
87df55f94fa5…
pow_addPow add
Quadratic reciprocity campaign
checked
Relational powers turn addition of exponents into multiplication.
Exact expanded PA statement
forall a e f s x y z. s = e + f -> (exists ff_b_add_left ff_c_add_left. ((forall ff_i_add_left_repeat. (exists ff_lt_add_left_repeat_bound. ff_lt_add_left_repeat_bound + S ff_i_add_left_repeat = e) -> (((exists ff_h_add_left_repeat_decoded. ff_h_add_left_repeat_decoded + S (a) = S ((S (ff_i_add_left_repeat)) * ff_c_add_left)) /\ exists ff_q_add_left_repeat_decoded. ff_b_add_left = ff_q_add_left_repeat_decoded * S ((S (ff_i_add_left_repeat)) * ff_c_add_left) + (a)))) /\ (exists ff_u_add_left_product ff_v_add_left_product. ((((exists ff_h_add_left_product_start. ff_h_add_left_product_start + S (1) = S ((S (0)) * ff_v_add_left_product)) /\ exists ff_q_add_left_product_start. ff_u_add_left_product = ff_q_add_left_product_start * S ((S (0)) * ff_v_add_left_product) + (1))) /\ ((((exists ff_h_add_left_product_terminal. ff_h_add_left_product_terminal + S (x) = S ((S (e)) * ff_v_add_left_product)) /\ exists ff_q_add_left_product_terminal. ff_u_add_left_product = ff_q_add_left_product_terminal * S ((S (e)) * ff_v_add_left_product) + (x))) /\ forall ff_i_add_left_product. (exists ff_lt_add_left_product_bound. ff_lt_add_left_product_bound + S ff_i_add_left_product = e) -> exists ff_p_add_left_product ff_r_add_left_product ff_s_add_left_product. ((((exists ff_h_add_left_product_factor. ff_h_add_left_product_factor + S (ff_p_add_left_product) = S ((S (ff_i_add_left_product)) * ff_c_add_left)) /\ exists ff_q_add_left_product_factor. ff_b_add_left = ff_q_add_left_product_factor * S ((S (ff_i_add_left_product)) * ff_c_add_left) + (ff_p_add_left_product))) /\ ((((exists ff_h_add_left_product_partial. ff_h_add_left_product_partial + S (ff_r_add_left_product) = S ((S (ff_i_add_left_product)) * ff_v_add_left_product)) /\ exists ff_q_add_left_product_partial. ff_u_add_left_product = ff_q_add_left_product_partial * S ((S (ff_i_add_left_product)) * ff_v_add_left_product) + (ff_r_add_left_product))) /\ ((((exists ff_h_add_left_product_successor. ff_h_add_left_product_successor + S (ff_s_add_left_product) = S ((S (S ff_i_add_left_product)) * ff_v_add_left_product)) /\ exists ff_q_add_left_product_successor. ff_u_add_left_product = ff_q_add_left_product_successor * S ((S (S ff_i_add_left_product)) * ff_v_add_left_product) + (ff_s_add_left_product))) /\ ff_s_add_left_product = ff_r_add_left_product * ff_p_add_left_product)))))))) -> (exists ff_b_add_right ff_c_add_right. ((forall ff_i_add_right_repeat. (exists ff_lt_add_right_repeat_bound. ff_lt_add_right_repeat_bound + S ff_i_add_right_repeat = f) -> (((exists ff_h_add_right_repeat_decoded. ff_h_add_right_repeat_decoded + S (a) = S ((S (ff_i_add_right_repeat)) * ff_c_add_right)) /\ exists ff_q_add_right_repeat_decoded. ff_b_add_right = ff_q_add_right_repeat_decoded * S ((S (ff_i_add_right_repeat)) * ff_c_add_right) + (a)))) /\ (exists ff_u_add_right_product ff_v_add_right_product. ((((exists ff_h_add_right_product_start. ff_h_add_right_product_start + S (1) = S ((S (0)) * ff_v_add_right_product)) /\ exists ff_q_add_right_product_start. ff_u_add_right_product = ff_q_add_right_product_start * S ((S (0)) * ff_v_add_right_product) + (1))) /\ ((((exists ff_h_add_right_product_terminal. ff_h_add_right_product_terminal + S (y) = S ((S (f)) * ff_v_add_right_product)) /\ exists ff_q_add_right_product_terminal. ff_u_add_right_product = ff_q_add_right_product_terminal * S ((S (f)) * ff_v_add_right_product) + (y))) /\ forall ff_i_add_right_product. (exists ff_lt_add_right_product_bound. ff_lt_add_right_product_bound + S ff_i_add_right_product = f) -> exists ff_p_add_right_product ff_r_add_right_product ff_s_add_right_product. ((((exists ff_h_add_right_product_factor. ff_h_add_right_product_factor + S (ff_p_add_right_product) = S ((S (ff_i_add_right_product)) * ff_c_add_right)) /\ exists ff_q_add_right_product_factor. ff_b_add_right = ff_q_add_right_product_factor * S ((S (ff_i_add_right_product)) * ff_c_add_right) + (ff_p_add_right_product))) /\ ((((exists ff_h_add_right_product_partial. ff_h_add_right_product_partial + S (ff_r_add_right_product) = S ((S (ff_i_add_right_product)) * ff_v_add_right_product)) /\ exists ff_q_add_right_product_partial. ff_u_add_right_product = ff_q_add_right_product_partial * S ((S (ff_i_add_right_product)) * ff_v_add_right_product) + (ff_r_add_right_product))) /\ ((((exists ff_h_add_right_product_successor. ff_h_add_right_product_successor + S (ff_s_add_right_product) = S ((S (S ff_i_add_right_product)) * ff_v_add_right_product)) /\ exists ff_q_add_right_product_successor. ff_u_add_right_product = ff_q_add_right_product_successor * S ((S (S ff_i_add_right_product)) * ff_v_add_right_product) + (ff_s_add_right_product))) /\ ff_s_add_right_product = ff_r_add_right_product * ff_p_add_right_product)))))))) -> (exists ff_b_add_total ff_c_add_total. ((forall ff_i_add_total_repeat. (exists ff_lt_add_total_repeat_bound. ff_lt_add_total_repeat_bound + S ff_i_add_total_repeat = s) -> (((exists ff_h_add_total_repeat_decoded. ff_h_add_total_repeat_decoded + S (a) = S ((S (ff_i_add_total_repeat)) * ff_c_add_total)) /\ exists ff_q_add_total_repeat_decoded. ff_b_add_total = ff_q_add_total_repeat_decoded * S ((S (ff_i_add_total_repeat)) * ff_c_add_total) + (a)))) /\ (exists ff_u_add_total_product ff_v_add_total_product. ((((exists ff_h_add_total_product_start. ff_h_add_total_product_start + S (1) = S ((S (0)) * ff_v_add_total_product)) /\ exists ff_q_add_total_product_start. ff_u_add_total_product = ff_q_add_total_product_start * S ((S (0)) * ff_v_add_total_product) + (1))) /\ ((((exists ff_h_add_total_product_terminal. ff_h_add_total_product_terminal + S (z) = S ((S (s)) * ff_v_add_total_product)) /\ exists ff_q_add_total_product_terminal. ff_u_add_total_product = ff_q_add_total_product_terminal * S ((S (s)) * ff_v_add_total_product) + (z))) /\ forall ff_i_add_total_product. (exists ff_lt_add_total_product_bound. ff_lt_add_total_product_bound + S ff_i_add_total_product = s) -> exists ff_p_add_total_product ff_r_add_total_product ff_s_add_total_product. ((((exists ff_h_add_total_product_factor. ff_h_add_total_product_factor + S (ff_p_add_total_product) = S ((S (ff_i_add_total_product)) * ff_c_add_total)) /\ exists ff_q_add_total_product_factor. ff_b_add_total = ff_q_add_total_product_factor * S ((S (ff_i_add_total_product)) * ff_c_add_total) + (ff_p_add_total_product))) /\ ((((exists ff_h_add_total_product_partial. ff_h_add_total_product_partial + S (ff_r_add_total_product) = S ((S (ff_i_add_total_product)) * ff_v_add_total_product)) /\ exists ff_q_add_total_product_partial. ff_u_add_total_product = ff_q_add_total_product_partial * S ((S (ff_i_add_total_product)) * ff_v_add_total_product) + (ff_r_add_total_product))) /\ ((((exists ff_h_add_total_product_successor. ff_h_add_total_product_successor + S (ff_s_add_total_product) = S ((S (S ff_i_add_total_product)) * ff_v_add_total_product)) /\ exists ff_q_add_total_product_successor. ff_u_add_total_product = ff_q_add_total_product_successor * S ((S (S ff_i_add_total_product)) * ff_v_add_total_product) + (ff_s_add_total_product))) /\ ff_s_add_total_product = ff_r_add_total_product * ff_p_add_total_product)))))))) -> z = x * y
Complete replay recipe: dependency imports + authored proof
pa prove forall a e f s x y z. s = e + f -> (exists ff_b_add_left ff_c_add_left. ((forall ff_i_add_left_repeat. (exists ff_lt_add_left_repeat_bound. ff_lt_add_left_repeat_bound + S ff_i_add_left_repeat = e) -> (((exists ff_h_add_left_repeat_decoded. ff_h_add_left_repeat_decoded + S (a) = S ((S (ff_i_add_left_repeat)) * ff_c_add_left)) /\ exists ff_q_add_left_repeat_decoded. ff_b_add_left = ff_q_add_left_repeat_decoded * S ((S (ff_i_add_left_repeat)) * ff_c_add_left) + (a)))) /\ (exists ff_u_add_left_product ff_v_add_left_product. ((((exists ff_h_add_left_product_start. ff_h_add_left_product_start + S (1) = S ((S (0)) * ff_v_add_left_product)) /\ exists ff_q_add_left_product_start. ff_u_add_left_product = ff_q_add_left_product_start * S ((S (0)) * ff_v_add_left_product) + (1))) /\ ((((exists ff_h_add_left_product_terminal. ff_h_add_left_product_terminal + S (x) = S ((S (e)) * ff_v_add_left_product)) /\ exists ff_q_add_left_product_terminal. ff_u_add_left_product = ff_q_add_left_product_terminal * S ((S (e)) * ff_v_add_left_product) + (x))) /\ forall ff_i_add_left_product. (exists ff_lt_add_left_product_bound. ff_lt_add_left_product_bound + S ff_i_add_left_product = e) -> exists ff_p_add_left_product ff_r_add_left_product ff_s_add_left_product. ((((exists ff_h_add_left_product_factor. ff_h_add_left_product_factor + S (ff_p_add_left_product) = S ((S (ff_i_add_left_product)) * ff_c_add_left)) /\ exists ff_q_add_left_product_factor. ff_b_add_left = ff_q_add_left_product_factor * S ((S (ff_i_add_left_product)) * ff_c_add_left) + (ff_p_add_left_product))) /\ ((((exists ff_h_add_left_product_partial. ff_h_add_left_product_partial + S (ff_r_add_left_product) = S ((S (ff_i_add_left_product)) * ff_v_add_left_product)) /\ exists ff_q_add_left_product_partial. ff_u_add_left_product = ff_q_add_left_product_partial * S ((S (ff_i_add_left_product)) * ff_v_add_left_product) + (ff_r_add_left_product))) /\ ((((exists ff_h_add_left_product_successor. ff_h_add_left_product_successor + S (ff_s_add_left_product) = S ((S (S ff_i_add_left_product)) * ff_v_add_left_product)) /\ exists ff_q_add_left_product_successor. ff_u_add_left_product = ff_q_add_left_product_successor * S ((S (S ff_i_add_left_product)) * ff_v_add_left_product) + (ff_s_add_left_product))) /\ ff_s_add_left_product = ff_r_add_left_product * ff_p_add_left_product)))))))) -> (exists ff_b_add_right ff_c_add_right. ((forall ff_i_add_right_repeat. (exists ff_lt_add_right_repeat_bound. ff_lt_add_right_repeat_bound + S ff_i_add_right_repeat = f) -> (((exists ff_h_add_right_repeat_decoded. ff_h_add_right_repeat_decoded + S (a) = S ((S (ff_i_add_right_repeat)) * ff_c_add_right)) /\ exists ff_q_add_right_repeat_decoded. ff_b_add_right = ff_q_add_right_repeat_decoded * S ((S (ff_i_add_right_repeat)) * ff_c_add_right) + (a)))) /\ (exists ff_u_add_right_product ff_v_add_right_product. ((((exists ff_h_add_right_product_start. ff_h_add_right_product_start + S (1) = S ((S (0)) * ff_v_add_right_product)) /\ exists ff_q_add_right_product_start. ff_u_add_right_product = ff_q_add_right_product_start * S ((S (0)) * ff_v_add_right_product) + (1))) /\ ((((exists ff_h_add_right_product_terminal. ff_h_add_right_product_terminal + S (y) = S ((S (f)) * ff_v_add_right_product)) /\ exists ff_q_add_right_product_terminal. ff_u_add_right_product = ff_q_add_right_product_terminal * S ((S (f)) * ff_v_add_right_product) + (y))) /\ forall ff_i_add_right_product. (exists ff_lt_add_right_product_bound. ff_lt_add_right_product_bound + S ff_i_add_right_product = f) -> exists ff_p_add_right_product ff_r_add_right_product ff_s_add_right_product. ((((exists ff_h_add_right_product_factor. ff_h_add_right_product_factor + S (ff_p_add_right_product) = S ((S (ff_i_add_right_product)) * ff_c_add_right)) /\ exists ff_q_add_right_product_factor. ff_b_add_right = ff_q_add_right_product_factor * S ((S (ff_i_add_right_product)) * ff_c_add_right) + (ff_p_add_right_product))) /\ ((((exists ff_h_add_right_product_partial. ff_h_add_right_product_partial + S (ff_r_add_right_product) = S ((S (ff_i_add_right_product)) * ff_v_add_right_product)) /\ exists ff_q_add_right_product_partial. ff_u_add_right_product = ff_q_add_right_product_partial * S ((S (ff_i_add_right_product)) * ff_v_add_right_product) + (ff_r_add_right_product))) /\ ((((exists ff_h_add_right_product_successor. ff_h_add_right_product_successor + S (ff_s_add_right_product) = S ((S (S ff_i_add_right_product)) * ff_v_add_right_product)) /\ exists ff_q_add_right_product_successor. ff_u_add_right_product = ff_q_add_right_product_successor * S ((S (S ff_i_add_right_product)) * ff_v_add_right_product) + (ff_s_add_right_product))) /\ ff_s_add_right_product = ff_r_add_right_product * ff_p_add_right_product)))))))) -> (exists ff_b_add_total ff_c_add_total. ((forall ff_i_add_total_repeat. (exists ff_lt_add_total_repeat_bound. ff_lt_add_total_repeat_bound + S ff_i_add_total_repeat = s) -> (((exists ff_h_add_total_repeat_decoded. ff_h_add_total_repeat_decoded + S (a) = S ((S (ff_i_add_total_repeat)) * ff_c_add_total)) /\ exists ff_q_add_total_repeat_decoded. ff_b_add_total = ff_q_add_total_repeat_decoded * S ((S (ff_i_add_total_repeat)) * ff_c_add_total) + (a)))) /\ (exists ff_u_add_total_product ff_v_add_total_product. ((((exists ff_h_add_total_product_start. ff_h_add_total_product_start + S (1) = S ((S (0)) * ff_v_add_total_product)) /\ exists ff_q_add_total_product_start. ff_u_add_total_product = ff_q_add_total_product_start * S ((S (0)) * ff_v_add_total_product) + (1))) /\ ((((exists ff_h_add_total_product_terminal. ff_h_add_total_product_terminal + S (z) = S ((S (s)) * ff_v_add_total_product)) /\ exists ff_q_add_total_product_terminal. ff_u_add_total_product = ff_q_add_total_product_terminal * S ((S (s)) * ff_v_add_total_product) + (z))) /\ forall ff_i_add_total_product. (exists ff_lt_add_total_product_bound. ff_lt_add_total_product_bound + S ff_i_add_total_product = s) -> exists ff_p_add_total_product ff_r_add_total_product ff_s_add_total_product. ((((exists ff_h_add_total_product_factor. ff_h_add_total_product_factor + S (ff_p_add_total_product) = S ((S (ff_i_add_total_product)) * ff_c_add_total)) /\ exists ff_q_add_total_product_factor. ff_b_add_total = ff_q_add_total_product_factor * S ((S (ff_i_add_total_product)) * ff_c_add_total) + (ff_p_add_total_product))) /\ ((((exists ff_h_add_total_product_partial. ff_h_add_total_product_partial + S (ff_r_add_total_product) = S ((S (ff_i_add_total_product)) * ff_v_add_total_product)) /\ exists ff_q_add_total_product_partial. ff_u_add_total_product = ff_q_add_total_product_partial * S ((S (ff_i_add_total_product)) * ff_v_add_total_product) + (ff_r_add_total_product))) /\ ((((exists ff_h_add_total_product_successor. ff_h_add_total_product_successor + S (ff_s_add_total_product) = S ((S (S ff_i_add_total_product)) * ff_v_add_total_product)) /\ exists ff_q_add_total_product_successor. ff_u_add_total_product = ff_q_add_total_product_successor * S ((S (S ff_i_add_total_product)) * ff_v_add_total_product) + (ff_s_add_total_product))) /\ ff_s_add_total_product = ff_r_add_total_product * ff_p_add_total_product)))))))) -> z = x * y
use pow_zero
use pow_functional
use pow_successor_decompose
use mul_one
use mul_assoc
intro a
intro e
induction f
intro s
intro x
intro y
intro z
intro hs
intro hx
intro hy
intro hz
rewrite PA3 at hs
rewrite hs at hz
rewrite hs at hz
rewrite hs at hz
rewrite hs at hz
have hzx : z = x
specialize pow_functional a
specialize pow_functional e
specialize pow_functional z
specialize pow_functional x
apply pow_functional
exact hz
exact hx
have hy1 : y = 1
specialize pow_zero a
specialize pow_zero 0
specialize pow_zero y
apply pow_zero
refl
exact hy
rewrite hzx
rewrite hy1
specialize mul_one x
symm
exact mul_one
intro s
intro x
intro y
intro z
intro hs
intro hx
intro hy
intro hz
have hy_step : exists r. (exists ff_b_add_y_prefix ff_c_add_y_prefix. ((forall ff_i_add_y_prefix_repeat. (exists ff_lt_add_y_prefix_repeat_bound. ff_lt_add_y_prefix_repeat_bound + S ff_i_add_y_prefix_repeat = f) -> (((exists ff_h_add_y_prefix_repeat_decoded. ff_h_add_y_prefix_repeat_decoded + S (a) = S ((S (ff_i_add_y_prefix_repeat)) * ff_c_add_y_prefix)) /\ exists ff_q_add_y_prefix_repeat_decoded. ff_b_add_y_prefix = ff_q_add_y_prefix_repeat_decoded * S ((S (ff_i_add_y_prefix_repeat)) * ff_c_add_y_prefix) + (a)))) /\ (exists ff_u_add_y_prefix_product ff_v_add_y_prefix_product. ((((exists ff_h_add_y_prefix_product_start. ff_h_add_y_prefix_product_start + S (1) = S ((S (0)) * ff_v_add_y_prefix_product)) /\ exists ff_q_add_y_prefix_product_start. ff_u_add_y_prefix_product = ff_q_add_y_prefix_product_start * S ((S (0)) * ff_v_add_y_prefix_product) + (1))) /\ ((((exists ff_h_add_y_prefix_product_terminal. ff_h_add_y_prefix_product_terminal + S (r) = S ((S (f)) * ff_v_add_y_prefix_product)) /\ exists ff_q_add_y_prefix_product_terminal. ff_u_add_y_prefix_product = ff_q_add_y_prefix_product_terminal * S ((S (f)) * ff_v_add_y_prefix_product) + (r))) /\ forall ff_i_add_y_prefix_product. (exists ff_lt_add_y_prefix_product_bound. ff_lt_add_y_prefix_product_bound + S ff_i_add_y_prefix_product = f) -> exists ff_p_add_y_prefix_product ff_r_add_y_prefix_product ff_s_add_y_prefix_product. ((((exists ff_h_add_y_prefix_product_factor. ff_h_add_y_prefix_product_factor + S (ff_p_add_y_prefix_product) = S ((S (ff_i_add_y_prefix_product)) * ff_c_add_y_prefix)) /\ exists ff_q_add_y_prefix_product_factor. ff_b_add_y_prefix = ff_q_add_y_prefix_product_factor * S ((S (ff_i_add_y_prefix_product)) * ff_c_add_y_prefix) + (ff_p_add_y_prefix_product))) /\ ((((exists ff_h_add_y_prefix_product_partial. ff_h_add_y_prefix_product_partial + S (ff_r_add_y_prefix_product) = S ((S (ff_i_add_y_prefix_product)) * ff_v_add_y_prefix_product)) /\ exists ff_q_add_y_prefix_product_partial. ff_u_add_y_prefix_product = ff_q_add_y_prefix_product_partial * S ((S (ff_i_add_y_prefix_product)) * ff_v_add_y_prefix_product) + (ff_r_add_y_prefix_product))) /\ ((((exists ff_h_add_y_prefix_product_successor. ff_h_add_y_prefix_product_successor + S (ff_s_add_y_prefix_product) = S ((S (S ff_i_add_y_prefix_product)) * ff_v_add_y_prefix_product)) /\ exists ff_q_add_y_prefix_product_successor. ff_u_add_y_prefix_product = ff_q_add_y_prefix_product_successor * S ((S (S ff_i_add_y_prefix_product)) * ff_v_add_y_prefix_product) + (ff_s_add_y_prefix_product))) /\ ff_s_add_y_prefix_product = ff_r_add_y_prefix_product * ff_p_add_y_prefix_product)))))))) /\ y = r * a
specialize pow_successor_decompose a
specialize pow_successor_decompose f
specialize pow_successor_decompose (S f)
specialize pow_successor_decompose y
apply pow_successor_decompose
refl
exact hy
cases hy_step
cases hy_step_witness
have hst : s = S (e + f)
trans e + S f
exact hs
apply PA4
have hz_step : exists r. (exists pa_b_add_z_prefix pa_c_add_z_prefix. ((forall pa_i_add_z_prefix_repeat. (exists pa_lt_add_z_prefix_repeat_bound. pa_lt_add_z_prefix_repeat_bound + S pa_i_add_z_prefix_repeat = e + f) -> (((exists pa_h_add_z_prefix_repeat_decoded. pa_h_add_z_prefix_repeat_decoded + S (a) = S ((S (pa_i_add_z_prefix_repeat)) * pa_c_add_z_prefix)) /\ exists pa_q_add_z_prefix_repeat_decoded. pa_b_add_z_prefix = pa_q_add_z_prefix_repeat_decoded * S ((S (pa_i_add_z_prefix_repeat)) * pa_c_add_z_prefix) + (a)))) /\ (exists pa_u_add_z_prefix_product pa_v_add_z_prefix_product. ((((exists pa_h_add_z_prefix_product_start. pa_h_add_z_prefix_product_start + S (1) = S ((S (0)) * pa_v_add_z_prefix_product)) /\ exists pa_q_add_z_prefix_product_start. pa_u_add_z_prefix_product = pa_q_add_z_prefix_product_start * S ((S (0)) * pa_v_add_z_prefix_product) + (1))) /\ ((((exists pa_h_add_z_prefix_product_terminal. pa_h_add_z_prefix_product_terminal + S (r) = S ((S (e + f)) * pa_v_add_z_prefix_product)) /\ exists pa_q_add_z_prefix_product_terminal. pa_u_add_z_prefix_product = pa_q_add_z_prefix_product_terminal * S ((S (e + f)) * pa_v_add_z_prefix_product) + (r))) /\ forall pa_i_add_z_prefix_product. (exists pa_lt_add_z_prefix_product_bound. pa_lt_add_z_prefix_product_bound + S pa_i_add_z_prefix_product = e + f) -> exists pa_p_add_z_prefix_product pa_r_add_z_prefix_product pa_s_add_z_prefix_product. ((((exists pa_h_add_z_prefix_product_factor. pa_h_add_z_prefix_product_factor + S (pa_p_add_z_prefix_product) = S ((S (pa_i_add_z_prefix_product)) * pa_c_add_z_prefix)) /\ exists pa_q_add_z_prefix_product_factor. pa_b_add_z_prefix = pa_q_add_z_prefix_product_factor * S ((S (pa_i_add_z_prefix_product)) * pa_c_add_z_prefix) + (pa_p_add_z_prefix_product))) /\ ((((exists pa_h_add_z_prefix_product_partial. pa_h_add_z_prefix_product_partial + S (pa_r_add_z_prefix_product) = S ((S (pa_i_add_z_prefix_product)) * pa_v_add_z_prefix_product)) /\ exists pa_q_add_z_prefix_product_partial. pa_u_add_z_prefix_product = pa_q_add_z_prefix_product_partial * S ((S (pa_i_add_z_prefix_product)) * pa_v_add_z_prefix_product) + (pa_r_add_z_prefix_product))) /\ ((((exists pa_h_add_z_prefix_product_successor. pa_h_add_z_prefix_product_successor + S (pa_s_add_z_prefix_product) = S ((S (S pa_i_add_z_prefix_product)) * pa_v_add_z_prefix_product)) /\ exists pa_q_add_z_prefix_product_successor. pa_u_add_z_prefix_product = pa_q_add_z_prefix_product_successor * S ((S (S pa_i_add_z_prefix_product)) * pa_v_add_z_prefix_product) + (pa_s_add_z_prefix_product))) /\ pa_s_add_z_prefix_product = pa_r_add_z_prefix_product * pa_p_add_z_prefix_product)))))))) /\ z = r * a
specialize pow_successor_decompose a
specialize pow_successor_decompose (e + f)
specialize pow_successor_decompose s
specialize pow_successor_decompose z
apply pow_successor_decompose
exact hst
exact hz
cases hz_step
cases hz_step_witness
have hprefix : x2 = x * x1
specialize IH (e + f)
specialize IH x
specialize IH x1
specialize IH x2
apply IH
refl
exact hx
exact hy_step_witness_left
exact hz_step_witness_left
trans x2 * a
exact hz_step_witness_right
trans (x * x1) * a
congr
exact hprefix
refl
trans x * (x1 * a)
apply mul_assoc
congr
refl
symm
exact hy_step_witness_right
qed
- Occurrences
- 6,744
- Distinct objects
- 1,530
- Reused references
- 59
- Depth
- 66
- Cuts
- 183
- Certificate SHA-256
e7260f892c41…
pow_mul_expPow mul exp
Quadratic reciprocity campaign
checked
Iterated relational powers multiply their exponents.
Exact expanded PA statement
forall a e f p x y z. p = e * f -> (exists ff_b_mul_base ff_c_mul_base. ((forall ff_i_mul_base_repeat. (exists ff_lt_mul_base_repeat_bound. ff_lt_mul_base_repeat_bound + S ff_i_mul_base_repeat = e) -> (((exists ff_h_mul_base_repeat_decoded. ff_h_mul_base_repeat_decoded + S (a) = S ((S (ff_i_mul_base_repeat)) * ff_c_mul_base)) /\ exists ff_q_mul_base_repeat_decoded. ff_b_mul_base = ff_q_mul_base_repeat_decoded * S ((S (ff_i_mul_base_repeat)) * ff_c_mul_base) + (a)))) /\ (exists ff_u_mul_base_product ff_v_mul_base_product. ((((exists ff_h_mul_base_product_start. ff_h_mul_base_product_start + S (1) = S ((S (0)) * ff_v_mul_base_product)) /\ exists ff_q_mul_base_product_start. ff_u_mul_base_product = ff_q_mul_base_product_start * S ((S (0)) * ff_v_mul_base_product) + (1))) /\ ((((exists ff_h_mul_base_product_terminal. ff_h_mul_base_product_terminal + S (x) = S ((S (e)) * ff_v_mul_base_product)) /\ exists ff_q_mul_base_product_terminal. ff_u_mul_base_product = ff_q_mul_base_product_terminal * S ((S (e)) * ff_v_mul_base_product) + (x))) /\ forall ff_i_mul_base_product. (exists ff_lt_mul_base_product_bound. ff_lt_mul_base_product_bound + S ff_i_mul_base_product = e) -> exists ff_p_mul_base_product ff_r_mul_base_product ff_s_mul_base_product. ((((exists ff_h_mul_base_product_factor. ff_h_mul_base_product_factor + S (ff_p_mul_base_product) = S ((S (ff_i_mul_base_product)) * ff_c_mul_base)) /\ exists ff_q_mul_base_product_factor. ff_b_mul_base = ff_q_mul_base_product_factor * S ((S (ff_i_mul_base_product)) * ff_c_mul_base) + (ff_p_mul_base_product))) /\ ((((exists ff_h_mul_base_product_partial. ff_h_mul_base_product_partial + S (ff_r_mul_base_product) = S ((S (ff_i_mul_base_product)) * ff_v_mul_base_product)) /\ exists ff_q_mul_base_product_partial. ff_u_mul_base_product = ff_q_mul_base_product_partial * S ((S (ff_i_mul_base_product)) * ff_v_mul_base_product) + (ff_r_mul_base_product))) /\ ((((exists ff_h_mul_base_product_successor. ff_h_mul_base_product_successor + S (ff_s_mul_base_product) = S ((S (S ff_i_mul_base_product)) * ff_v_mul_base_product)) /\ exists ff_q_mul_base_product_successor. ff_u_mul_base_product = ff_q_mul_base_product_successor * S ((S (S ff_i_mul_base_product)) * ff_v_mul_base_product) + (ff_s_mul_base_product))) /\ ff_s_mul_base_product = ff_r_mul_base_product * ff_p_mul_base_product)))))))) -> (exists ff_b_mul_outer ff_c_mul_outer. ((forall ff_i_mul_outer_repeat. (exists ff_lt_mul_outer_repeat_bound. ff_lt_mul_outer_repeat_bound + S ff_i_mul_outer_repeat = f) -> (((exists ff_h_mul_outer_repeat_decoded. ff_h_mul_outer_repeat_decoded + S (x) = S ((S (ff_i_mul_outer_repeat)) * ff_c_mul_outer)) /\ exists ff_q_mul_outer_repeat_decoded. ff_b_mul_outer = ff_q_mul_outer_repeat_decoded * S ((S (ff_i_mul_outer_repeat)) * ff_c_mul_outer) + (x)))) /\ (exists ff_u_mul_outer_product ff_v_mul_outer_product. ((((exists ff_h_mul_outer_product_start. ff_h_mul_outer_product_start + S (1) = S ((S (0)) * ff_v_mul_outer_product)) /\ exists ff_q_mul_outer_product_start. ff_u_mul_outer_product = ff_q_mul_outer_product_start * S ((S (0)) * ff_v_mul_outer_product) + (1))) /\ ((((exists ff_h_mul_outer_product_terminal. ff_h_mul_outer_product_terminal + S (y) = S ((S (f)) * ff_v_mul_outer_product)) /\ exists ff_q_mul_outer_product_terminal. ff_u_mul_outer_product = ff_q_mul_outer_product_terminal * S ((S (f)) * ff_v_mul_outer_product) + (y))) /\ forall ff_i_mul_outer_product. (exists ff_lt_mul_outer_product_bound. ff_lt_mul_outer_product_bound + S ff_i_mul_outer_product = f) -> exists ff_p_mul_outer_product ff_r_mul_outer_product ff_s_mul_outer_product. ((((exists ff_h_mul_outer_product_factor. ff_h_mul_outer_product_factor + S (ff_p_mul_outer_product) = S ((S (ff_i_mul_outer_product)) * ff_c_mul_outer)) /\ exists ff_q_mul_outer_product_factor. ff_b_mul_outer = ff_q_mul_outer_product_factor * S ((S (ff_i_mul_outer_product)) * ff_c_mul_outer) + (ff_p_mul_outer_product))) /\ ((((exists ff_h_mul_outer_product_partial. ff_h_mul_outer_product_partial + S (ff_r_mul_outer_product) = S ((S (ff_i_mul_outer_product)) * ff_v_mul_outer_product)) /\ exists ff_q_mul_outer_product_partial. ff_u_mul_outer_product = ff_q_mul_outer_product_partial * S ((S (ff_i_mul_outer_product)) * ff_v_mul_outer_product) + (ff_r_mul_outer_product))) /\ ((((exists ff_h_mul_outer_product_successor. ff_h_mul_outer_product_successor + S (ff_s_mul_outer_product) = S ((S (S ff_i_mul_outer_product)) * ff_v_mul_outer_product)) /\ exists ff_q_mul_outer_product_successor. ff_u_mul_outer_product = ff_q_mul_outer_product_successor * S ((S (S ff_i_mul_outer_product)) * ff_v_mul_outer_product) + (ff_s_mul_outer_product))) /\ ff_s_mul_outer_product = ff_r_mul_outer_product * ff_p_mul_outer_product)))))))) -> (exists ff_b_mul_total ff_c_mul_total. ((forall ff_i_mul_total_repeat. (exists ff_lt_mul_total_repeat_bound. ff_lt_mul_total_repeat_bound + S ff_i_mul_total_repeat = p) -> (((exists ff_h_mul_total_repeat_decoded. ff_h_mul_total_repeat_decoded + S (a) = S ((S (ff_i_mul_total_repeat)) * ff_c_mul_total)) /\ exists ff_q_mul_total_repeat_decoded. ff_b_mul_total = ff_q_mul_total_repeat_decoded * S ((S (ff_i_mul_total_repeat)) * ff_c_mul_total) + (a)))) /\ (exists ff_u_mul_total_product ff_v_mul_total_product. ((((exists ff_h_mul_total_product_start. ff_h_mul_total_product_start + S (1) = S ((S (0)) * ff_v_mul_total_product)) /\ exists ff_q_mul_total_product_start. ff_u_mul_total_product = ff_q_mul_total_product_start * S ((S (0)) * ff_v_mul_total_product) + (1))) /\ ((((exists ff_h_mul_total_product_terminal. ff_h_mul_total_product_terminal + S (z) = S ((S (p)) * ff_v_mul_total_product)) /\ exists ff_q_mul_total_product_terminal. ff_u_mul_total_product = ff_q_mul_total_product_terminal * S ((S (p)) * ff_v_mul_total_product) + (z))) /\ forall ff_i_mul_total_product. (exists ff_lt_mul_total_product_bound. ff_lt_mul_total_product_bound + S ff_i_mul_total_product = p) -> exists ff_p_mul_total_product ff_r_mul_total_product ff_s_mul_total_product. ((((exists ff_h_mul_total_product_factor. ff_h_mul_total_product_factor + S (ff_p_mul_total_product) = S ((S (ff_i_mul_total_product)) * ff_c_mul_total)) /\ exists ff_q_mul_total_product_factor. ff_b_mul_total = ff_q_mul_total_product_factor * S ((S (ff_i_mul_total_product)) * ff_c_mul_total) + (ff_p_mul_total_product))) /\ ((((exists ff_h_mul_total_product_partial. ff_h_mul_total_product_partial + S (ff_r_mul_total_product) = S ((S (ff_i_mul_total_product)) * ff_v_mul_total_product)) /\ exists ff_q_mul_total_product_partial. ff_u_mul_total_product = ff_q_mul_total_product_partial * S ((S (ff_i_mul_total_product)) * ff_v_mul_total_product) + (ff_r_mul_total_product))) /\ ((((exists ff_h_mul_total_product_successor. ff_h_mul_total_product_successor + S (ff_s_mul_total_product) = S ((S (S ff_i_mul_total_product)) * ff_v_mul_total_product)) /\ exists ff_q_mul_total_product_successor. ff_u_mul_total_product = ff_q_mul_total_product_successor * S ((S (S ff_i_mul_total_product)) * ff_v_mul_total_product) + (ff_s_mul_total_product))) /\ ff_s_mul_total_product = ff_r_mul_total_product * ff_p_mul_total_product)))))))) -> y = z
Complete replay recipe: dependency imports + authored proof
pa prove forall a e f p x y z. p = e * f -> (exists ff_b_mul_base ff_c_mul_base. ((forall ff_i_mul_base_repeat. (exists ff_lt_mul_base_repeat_bound. ff_lt_mul_base_repeat_bound + S ff_i_mul_base_repeat = e) -> (((exists ff_h_mul_base_repeat_decoded. ff_h_mul_base_repeat_decoded + S (a) = S ((S (ff_i_mul_base_repeat)) * ff_c_mul_base)) /\ exists ff_q_mul_base_repeat_decoded. ff_b_mul_base = ff_q_mul_base_repeat_decoded * S ((S (ff_i_mul_base_repeat)) * ff_c_mul_base) + (a)))) /\ (exists ff_u_mul_base_product ff_v_mul_base_product. ((((exists ff_h_mul_base_product_start. ff_h_mul_base_product_start + S (1) = S ((S (0)) * ff_v_mul_base_product)) /\ exists ff_q_mul_base_product_start. ff_u_mul_base_product = ff_q_mul_base_product_start * S ((S (0)) * ff_v_mul_base_product) + (1))) /\ ((((exists ff_h_mul_base_product_terminal. ff_h_mul_base_product_terminal + S (x) = S ((S (e)) * ff_v_mul_base_product)) /\ exists ff_q_mul_base_product_terminal. ff_u_mul_base_product = ff_q_mul_base_product_terminal * S ((S (e)) * ff_v_mul_base_product) + (x))) /\ forall ff_i_mul_base_product. (exists ff_lt_mul_base_product_bound. ff_lt_mul_base_product_bound + S ff_i_mul_base_product = e) -> exists ff_p_mul_base_product ff_r_mul_base_product ff_s_mul_base_product. ((((exists ff_h_mul_base_product_factor. ff_h_mul_base_product_factor + S (ff_p_mul_base_product) = S ((S (ff_i_mul_base_product)) * ff_c_mul_base)) /\ exists ff_q_mul_base_product_factor. ff_b_mul_base = ff_q_mul_base_product_factor * S ((S (ff_i_mul_base_product)) * ff_c_mul_base) + (ff_p_mul_base_product))) /\ ((((exists ff_h_mul_base_product_partial. ff_h_mul_base_product_partial + S (ff_r_mul_base_product) = S ((S (ff_i_mul_base_product)) * ff_v_mul_base_product)) /\ exists ff_q_mul_base_product_partial. ff_u_mul_base_product = ff_q_mul_base_product_partial * S ((S (ff_i_mul_base_product)) * ff_v_mul_base_product) + (ff_r_mul_base_product))) /\ ((((exists ff_h_mul_base_product_successor. ff_h_mul_base_product_successor + S (ff_s_mul_base_product) = S ((S (S ff_i_mul_base_product)) * ff_v_mul_base_product)) /\ exists ff_q_mul_base_product_successor. ff_u_mul_base_product = ff_q_mul_base_product_successor * S ((S (S ff_i_mul_base_product)) * ff_v_mul_base_product) + (ff_s_mul_base_product))) /\ ff_s_mul_base_product = ff_r_mul_base_product * ff_p_mul_base_product)))))))) -> (exists ff_b_mul_outer ff_c_mul_outer. ((forall ff_i_mul_outer_repeat. (exists ff_lt_mul_outer_repeat_bound. ff_lt_mul_outer_repeat_bound + S ff_i_mul_outer_repeat = f) -> (((exists ff_h_mul_outer_repeat_decoded. ff_h_mul_outer_repeat_decoded + S (x) = S ((S (ff_i_mul_outer_repeat)) * ff_c_mul_outer)) /\ exists ff_q_mul_outer_repeat_decoded. ff_b_mul_outer = ff_q_mul_outer_repeat_decoded * S ((S (ff_i_mul_outer_repeat)) * ff_c_mul_outer) + (x)))) /\ (exists ff_u_mul_outer_product ff_v_mul_outer_product. ((((exists ff_h_mul_outer_product_start. ff_h_mul_outer_product_start + S (1) = S ((S (0)) * ff_v_mul_outer_product)) /\ exists ff_q_mul_outer_product_start. ff_u_mul_outer_product = ff_q_mul_outer_product_start * S ((S (0)) * ff_v_mul_outer_product) + (1))) /\ ((((exists ff_h_mul_outer_product_terminal. ff_h_mul_outer_product_terminal + S (y) = S ((S (f)) * ff_v_mul_outer_product)) /\ exists ff_q_mul_outer_product_terminal. ff_u_mul_outer_product = ff_q_mul_outer_product_terminal * S ((S (f)) * ff_v_mul_outer_product) + (y))) /\ forall ff_i_mul_outer_product. (exists ff_lt_mul_outer_product_bound. ff_lt_mul_outer_product_bound + S ff_i_mul_outer_product = f) -> exists ff_p_mul_outer_product ff_r_mul_outer_product ff_s_mul_outer_product. ((((exists ff_h_mul_outer_product_factor. ff_h_mul_outer_product_factor + S (ff_p_mul_outer_product) = S ((S (ff_i_mul_outer_product)) * ff_c_mul_outer)) /\ exists ff_q_mul_outer_product_factor. ff_b_mul_outer = ff_q_mul_outer_product_factor * S ((S (ff_i_mul_outer_product)) * ff_c_mul_outer) + (ff_p_mul_outer_product))) /\ ((((exists ff_h_mul_outer_product_partial. ff_h_mul_outer_product_partial + S (ff_r_mul_outer_product) = S ((S (ff_i_mul_outer_product)) * ff_v_mul_outer_product)) /\ exists ff_q_mul_outer_product_partial. ff_u_mul_outer_product = ff_q_mul_outer_product_partial * S ((S (ff_i_mul_outer_product)) * ff_v_mul_outer_product) + (ff_r_mul_outer_product))) /\ ((((exists ff_h_mul_outer_product_successor. ff_h_mul_outer_product_successor + S (ff_s_mul_outer_product) = S ((S (S ff_i_mul_outer_product)) * ff_v_mul_outer_product)) /\ exists ff_q_mul_outer_product_successor. ff_u_mul_outer_product = ff_q_mul_outer_product_successor * S ((S (S ff_i_mul_outer_product)) * ff_v_mul_outer_product) + (ff_s_mul_outer_product))) /\ ff_s_mul_outer_product = ff_r_mul_outer_product * ff_p_mul_outer_product)))))))) -> (exists ff_b_mul_total ff_c_mul_total. ((forall ff_i_mul_total_repeat. (exists ff_lt_mul_total_repeat_bound. ff_lt_mul_total_repeat_bound + S ff_i_mul_total_repeat = p) -> (((exists ff_h_mul_total_repeat_decoded. ff_h_mul_total_repeat_decoded + S (a) = S ((S (ff_i_mul_total_repeat)) * ff_c_mul_total)) /\ exists ff_q_mul_total_repeat_decoded. ff_b_mul_total = ff_q_mul_total_repeat_decoded * S ((S (ff_i_mul_total_repeat)) * ff_c_mul_total) + (a)))) /\ (exists ff_u_mul_total_product ff_v_mul_total_product. ((((exists ff_h_mul_total_product_start. ff_h_mul_total_product_start + S (1) = S ((S (0)) * ff_v_mul_total_product)) /\ exists ff_q_mul_total_product_start. ff_u_mul_total_product = ff_q_mul_total_product_start * S ((S (0)) * ff_v_mul_total_product) + (1))) /\ ((((exists ff_h_mul_total_product_terminal. ff_h_mul_total_product_terminal + S (z) = S ((S (p)) * ff_v_mul_total_product)) /\ exists ff_q_mul_total_product_terminal. ff_u_mul_total_product = ff_q_mul_total_product_terminal * S ((S (p)) * ff_v_mul_total_product) + (z))) /\ forall ff_i_mul_total_product. (exists ff_lt_mul_total_product_bound. ff_lt_mul_total_product_bound + S ff_i_mul_total_product = p) -> exists ff_p_mul_total_product ff_r_mul_total_product ff_s_mul_total_product. ((((exists ff_h_mul_total_product_factor. ff_h_mul_total_product_factor + S (ff_p_mul_total_product) = S ((S (ff_i_mul_total_product)) * ff_c_mul_total)) /\ exists ff_q_mul_total_product_factor. ff_b_mul_total = ff_q_mul_total_product_factor * S ((S (ff_i_mul_total_product)) * ff_c_mul_total) + (ff_p_mul_total_product))) /\ ((((exists ff_h_mul_total_product_partial. ff_h_mul_total_product_partial + S (ff_r_mul_total_product) = S ((S (ff_i_mul_total_product)) * ff_v_mul_total_product)) /\ exists ff_q_mul_total_product_partial. ff_u_mul_total_product = ff_q_mul_total_product_partial * S ((S (ff_i_mul_total_product)) * ff_v_mul_total_product) + (ff_r_mul_total_product))) /\ ((((exists ff_h_mul_total_product_successor. ff_h_mul_total_product_successor + S (ff_s_mul_total_product) = S ((S (S ff_i_mul_total_product)) * ff_v_mul_total_product)) /\ exists ff_q_mul_total_product_successor. ff_u_mul_total_product = ff_q_mul_total_product_successor * S ((S (S ff_i_mul_total_product)) * ff_v_mul_total_product) + (ff_s_mul_total_product))) /\ ff_s_mul_total_product = ff_r_mul_total_product * ff_p_mul_total_product)))))))) -> y = z
use pow_zero
use pow_successor_decompose
use pow_exists
use pow_add
intro a
intro e
induction f
intro p
intro x
intro y
intro z
intro hp
intro hx
intro hy
intro hz
rewrite PA5 at hp
rewrite hp at hz
rewrite hp at hz
rewrite hp at hz
rewrite hp at hz
have hy1 : y = 1
specialize pow_zero x
specialize pow_zero 0
specialize pow_zero y
apply pow_zero
refl
exact hy
have hz1 : z = 1
specialize pow_zero a
specialize pow_zero 0
specialize pow_zero z
apply pow_zero
refl
exact hz
trans 1
exact hy1
symm
exact hz1
intro p
intro x
intro y
intro z
intro hp
intro hx
intro hy
intro hz
have hy_step : exists r. (exists ff_b_mul_y_prefix ff_c_mul_y_prefix. ((forall ff_i_mul_y_prefix_repeat. (exists ff_lt_mul_y_prefix_repeat_bound. ff_lt_mul_y_prefix_repeat_bound + S ff_i_mul_y_prefix_repeat = f) -> (((exists ff_h_mul_y_prefix_repeat_decoded. ff_h_mul_y_prefix_repeat_decoded + S (x) = S ((S (ff_i_mul_y_prefix_repeat)) * ff_c_mul_y_prefix)) /\ exists ff_q_mul_y_prefix_repeat_decoded. ff_b_mul_y_prefix = ff_q_mul_y_prefix_repeat_decoded * S ((S (ff_i_mul_y_prefix_repeat)) * ff_c_mul_y_prefix) + (x)))) /\ (exists ff_u_mul_y_prefix_product ff_v_mul_y_prefix_product. ((((exists ff_h_mul_y_prefix_product_start. ff_h_mul_y_prefix_product_start + S (1) = S ((S (0)) * ff_v_mul_y_prefix_product)) /\ exists ff_q_mul_y_prefix_product_start. ff_u_mul_y_prefix_product = ff_q_mul_y_prefix_product_start * S ((S (0)) * ff_v_mul_y_prefix_product) + (1))) /\ ((((exists ff_h_mul_y_prefix_product_terminal. ff_h_mul_y_prefix_product_terminal + S (r) = S ((S (f)) * ff_v_mul_y_prefix_product)) /\ exists ff_q_mul_y_prefix_product_terminal. ff_u_mul_y_prefix_product = ff_q_mul_y_prefix_product_terminal * S ((S (f)) * ff_v_mul_y_prefix_product) + (r))) /\ forall ff_i_mul_y_prefix_product. (exists ff_lt_mul_y_prefix_product_bound. ff_lt_mul_y_prefix_product_bound + S ff_i_mul_y_prefix_product = f) -> exists ff_p_mul_y_prefix_product ff_r_mul_y_prefix_product ff_s_mul_y_prefix_product. ((((exists ff_h_mul_y_prefix_product_factor. ff_h_mul_y_prefix_product_factor + S (ff_p_mul_y_prefix_product) = S ((S (ff_i_mul_y_prefix_product)) * ff_c_mul_y_prefix)) /\ exists ff_q_mul_y_prefix_product_factor. ff_b_mul_y_prefix = ff_q_mul_y_prefix_product_factor * S ((S (ff_i_mul_y_prefix_product)) * ff_c_mul_y_prefix) + (ff_p_mul_y_prefix_product))) /\ ((((exists ff_h_mul_y_prefix_product_partial. ff_h_mul_y_prefix_product_partial + S (ff_r_mul_y_prefix_product) = S ((S (ff_i_mul_y_prefix_product)) * ff_v_mul_y_prefix_product)) /\ exists ff_q_mul_y_prefix_product_partial. ff_u_mul_y_prefix_product = ff_q_mul_y_prefix_product_partial * S ((S (ff_i_mul_y_prefix_product)) * ff_v_mul_y_prefix_product) + (ff_r_mul_y_prefix_product))) /\ ((((exists ff_h_mul_y_prefix_product_successor. ff_h_mul_y_prefix_product_successor + S (ff_s_mul_y_prefix_product) = S ((S (S ff_i_mul_y_prefix_product)) * ff_v_mul_y_prefix_product)) /\ exists ff_q_mul_y_prefix_product_successor. ff_u_mul_y_prefix_product = ff_q_mul_y_prefix_product_successor * S ((S (S ff_i_mul_y_prefix_product)) * ff_v_mul_y_prefix_product) + (ff_s_mul_y_prefix_product))) /\ ff_s_mul_y_prefix_product = ff_r_mul_y_prefix_product * ff_p_mul_y_prefix_product)))))))) /\ y = r * x
specialize pow_successor_decompose x
specialize pow_successor_decompose f
specialize pow_successor_decompose (S f)
specialize pow_successor_decompose y
apply pow_successor_decompose
refl
exact hy
cases hy_step
cases hy_step_witness
have hqpow : exists r. (exists pa_b_mul_total_prefix pa_c_mul_total_prefix. ((forall pa_i_mul_total_prefix_repeat. (exists pa_lt_mul_total_prefix_repeat_bound. pa_lt_mul_total_prefix_repeat_bound + S pa_i_mul_total_prefix_repeat = e * f) -> (((exists pa_h_mul_total_prefix_repeat_decoded. pa_h_mul_total_prefix_repeat_decoded + S (a) = S ((S (pa_i_mul_total_prefix_repeat)) * pa_c_mul_total_prefix)) /\ exists pa_q_mul_total_prefix_repeat_decoded. pa_b_mul_total_prefix = pa_q_mul_total_prefix_repeat_decoded * S ((S (pa_i_mul_total_prefix_repeat)) * pa_c_mul_total_prefix) + (a)))) /\ (exists pa_u_mul_total_prefix_product pa_v_mul_total_prefix_product. ((((exists pa_h_mul_total_prefix_product_start. pa_h_mul_total_prefix_product_start + S (1) = S ((S (0)) * pa_v_mul_total_prefix_product)) /\ exists pa_q_mul_total_prefix_product_start. pa_u_mul_total_prefix_product = pa_q_mul_total_prefix_product_start * S ((S (0)) * pa_v_mul_total_prefix_product) + (1))) /\ ((((exists pa_h_mul_total_prefix_product_terminal. pa_h_mul_total_prefix_product_terminal + S (r) = S ((S (e * f)) * pa_v_mul_total_prefix_product)) /\ exists pa_q_mul_total_prefix_product_terminal. pa_u_mul_total_prefix_product = pa_q_mul_total_prefix_product_terminal * S ((S (e * f)) * pa_v_mul_total_prefix_product) + (r))) /\ forall pa_i_mul_total_prefix_product. (exists pa_lt_mul_total_prefix_product_bound. pa_lt_mul_total_prefix_product_bound + S pa_i_mul_total_prefix_product = e * f) -> exists pa_p_mul_total_prefix_product pa_r_mul_total_prefix_product pa_s_mul_total_prefix_product. ((((exists pa_h_mul_total_prefix_product_factor. pa_h_mul_total_prefix_product_factor + S (pa_p_mul_total_prefix_product) = S ((S (pa_i_mul_total_prefix_product)) * pa_c_mul_total_prefix)) /\ exists pa_q_mul_total_prefix_product_factor. pa_b_mul_total_prefix = pa_q_mul_total_prefix_product_factor * S ((S (pa_i_mul_total_prefix_product)) * pa_c_mul_total_prefix) + (pa_p_mul_total_prefix_product))) /\ ((((exists pa_h_mul_total_prefix_product_partial. pa_h_mul_total_prefix_product_partial + S (pa_r_mul_total_prefix_product) = S ((S (pa_i_mul_total_prefix_product)) * pa_v_mul_total_prefix_product)) /\ exists pa_q_mul_total_prefix_product_partial. pa_u_mul_total_prefix_product = pa_q_mul_total_prefix_product_partial * S ((S (pa_i_mul_total_prefix_product)) * pa_v_mul_total_prefix_product) + (pa_r_mul_total_prefix_product))) /\ ((((exists pa_h_mul_total_prefix_product_successor. pa_h_mul_total_prefix_product_successor + S (pa_s_mul_total_prefix_product) = S ((S (S pa_i_mul_total_prefix_product)) * pa_v_mul_total_prefix_product)) /\ exists pa_q_mul_total_prefix_product_successor. pa_u_mul_total_prefix_product = pa_q_mul_total_prefix_product_successor * S ((S (S pa_i_mul_total_prefix_product)) * pa_v_mul_total_prefix_product) + (pa_s_mul_total_prefix_product))) /\ pa_s_mul_total_prefix_product = pa_r_mul_total_prefix_product * pa_p_mul_total_prefix_product))))))))
specialize pow_exists a
specialize pow_exists (e * f)
exact pow_exists
cases hqpow
have hprefix : x1 = x2
specialize IH (e * f)
specialize IH x
specialize IH x1
specialize IH x2
apply IH
refl
exact hx
exact hy_step_witness_left
exact hqpow_witness
have hpsum : p = (e * f) + e
trans e * S f
exact hp
apply PA6
have htotal : z = x2 * x
specialize pow_add a
specialize pow_add (e * f)
specialize pow_add e
specialize pow_add p
specialize pow_add x2
specialize pow_add x
specialize pow_add z
apply pow_add
exact hpsum
exact hqpow_witness
exact hx
exact hz
trans x1 * x
exact hy_step_witness_right
trans x2 * x
congr
exact hprefix
refl
symm
exact htotal
qed
- Occurrences
- 70,463
- Distinct objects
- 5,786
- Reused references
- 262
- Depth
- 91
- Cuts
- 2,086
- Certificate SHA-256
95115103d3c2…
predecessor_square_mod_onePredecessor square mod one
Quadratic reciprocity campaign
checked
The predecessor of a successor squares to one modulo that successor.
Exact expanded PA statement
forall p r. p = S r -> exists gs_u_square gs_v_square. (r * r) + p * gs_u_square = (1) + p * gs_v_square
Complete replay recipe: dependency imports + authored proof
pa prove forall p r. p = S r -> exists gs_u_square gs_v_square. (r * r) + p * gs_u_square = (1) + p * gs_v_square
use mul_one
use mul_succ_left
use add_assoc
use add_comm
use zero_add
use add_succ_left
intro p
intro r
intro hp
exists 1
exists r
rewrite hp
rewrite hp
simp [mul_one, mul_succ_left, add_assoc, add_comm, zero_add, add_succ_left]
qed
- Occurrences
- 426
- Distinct objects
- 234
- Reused references
- 30
- Depth
- 27
- Cuts
- 13
- Certificate SHA-256
47f8ce741b54…
even_successor_to_oddEven successor to odd
Quadratic reciprocity campaign
checked
If a successor is even, its predecessor is odd.
Exact expanded PA statement
forall n. (exists a. S n = 2 * a) -> exists b. n = 2 * b + 1
Complete replay recipe: dependency imports + authored proof
pa prove forall n. (exists a. S n = 2 * a) -> exists b. n = 2 * b + 1
use parity_cases
use successor_odd_of_even
use even_not_odd
intro n
intro hse
specialize parity_cases n
cases parity_cases
cases parity_cases_witness
exfalso
have hso : exists b. S n = 2 * b + 1
specialize successor_odd_of_even n
apply successor_odd_of_even
exists x
exact parity_cases_witness_left
specialize even_not_odd (S n)
apply even_not_odd
exact hse
exact hso
exists x
exact parity_cases_witness_right
qed
- Occurrences
- 1,074
- Distinct objects
- 751
- Reused references
- 35
- Depth
- 62
- Cuts
- 27
- Certificate SHA-256
6d559c9eca8b…
odd_successor_to_evenOdd successor to even
Quadratic reciprocity campaign
checked
If a successor is odd, its predecessor is even.
Exact expanded PA statement
forall n. (exists a. S n = 2 * a + 1) -> exists b. n = 2 * b
Complete replay recipe: dependency imports + authored proof
pa prove forall n. (exists a. S n = 2 * a + 1) -> exists b. n = 2 * b
use parity_cases
use successor_even_of_odd
use odd_not_even
intro n
intro hso
specialize parity_cases n
cases parity_cases
cases parity_cases_witness
exists x
exact parity_cases_witness_left
exfalso
have hse : exists b. S n = 2 * b
specialize successor_even_of_odd n
apply successor_even_of_odd
exists x
exact parity_cases_witness_right
specialize odd_not_even (S n)
apply odd_not_even
exact hso
exact hse
qed
- Occurrences
- 1,102
- Distinct objects
- 773
- Reused references
- 41
- Depth
- 62
- Cuts
- 27
- Certificate SHA-256
fe3e17a0fce8…
pow_predecessor_parity_modPow predecessor parity mod
Quadratic reciprocity campaign
checked
Powers of the predecessor of p alternate between one and the predecessor modulo p.
Exact expanded PA statement
forall p r e z. p = S r -> (exists ff_b_main ff_c_main. ((forall ff_i_main_repeat. (exists ff_lt_main_repeat_bound. ff_lt_main_repeat_bound + S ff_i_main_repeat = e) -> (((exists ff_h_main_repeat_decoded. ff_h_main_repeat_decoded + S (r) = S ((S (ff_i_main_repeat)) * ff_c_main)) /\ exists ff_q_main_repeat_decoded. ff_b_main = ff_q_main_repeat_decoded * S ((S (ff_i_main_repeat)) * ff_c_main) + (r)))) /\ (exists ff_u_main_product ff_v_main_product. ((((exists ff_h_main_product_start. ff_h_main_product_start + S (1) = S ((S (0)) * ff_v_main_product)) /\ exists ff_q_main_product_start. ff_u_main_product = ff_q_main_product_start * S ((S (0)) * ff_v_main_product) + (1))) /\ ((((exists ff_h_main_product_terminal. ff_h_main_product_terminal + S (z) = S ((S (e)) * ff_v_main_product)) /\ exists ff_q_main_product_terminal. ff_u_main_product = ff_q_main_product_terminal * S ((S (e)) * ff_v_main_product) + (z))) /\ forall ff_i_main_product. (exists ff_lt_main_product_bound. ff_lt_main_product_bound + S ff_i_main_product = e) -> exists ff_p_main_product ff_r_main_product ff_s_main_product. ((((exists ff_h_main_product_factor. ff_h_main_product_factor + S (ff_p_main_product) = S ((S (ff_i_main_product)) * ff_c_main)) /\ exists ff_q_main_product_factor. ff_b_main = ff_q_main_product_factor * S ((S (ff_i_main_product)) * ff_c_main) + (ff_p_main_product))) /\ ((((exists ff_h_main_product_partial. ff_h_main_product_partial + S (ff_r_main_product) = S ((S (ff_i_main_product)) * ff_v_main_product)) /\ exists ff_q_main_product_partial. ff_u_main_product = ff_q_main_product_partial * S ((S (ff_i_main_product)) * ff_v_main_product) + (ff_r_main_product))) /\ ((((exists ff_h_main_product_successor. ff_h_main_product_successor + S (ff_s_main_product) = S ((S (S ff_i_main_product)) * ff_v_main_product)) /\ exists ff_q_main_product_successor. ff_u_main_product = ff_q_main_product_successor * S ((S (S ff_i_main_product)) * ff_v_main_product) + (ff_s_main_product))) /\ ff_s_main_product = ff_r_main_product * ff_p_main_product)))))))) -> (((exists gs_even_main. e = 2 * gs_even_main) -> (exists gs_u_result_even gs_v_result_even. (z) + p * gs_u_result_even = (1) + p * gs_v_result_even)) /\ ((exists gs_odd_main. e = 2 * gs_odd_main + 1) -> (exists gs_u_result_odd gs_v_result_odd. (z) + p * gs_u_result_odd = (r) + p * gs_v_result_odd)))
Complete replay recipe: dependency imports + authored proof
pa prove forall p r e z. p = S r -> (exists ff_b_main ff_c_main. ((forall ff_i_main_repeat. (exists ff_lt_main_repeat_bound. ff_lt_main_repeat_bound + S ff_i_main_repeat = e) -> (((exists ff_h_main_repeat_decoded. ff_h_main_repeat_decoded + S (r) = S ((S (ff_i_main_repeat)) * ff_c_main)) /\ exists ff_q_main_repeat_decoded. ff_b_main = ff_q_main_repeat_decoded * S ((S (ff_i_main_repeat)) * ff_c_main) + (r)))) /\ (exists ff_u_main_product ff_v_main_product. ((((exists ff_h_main_product_start. ff_h_main_product_start + S (1) = S ((S (0)) * ff_v_main_product)) /\ exists ff_q_main_product_start. ff_u_main_product = ff_q_main_product_start * S ((S (0)) * ff_v_main_product) + (1))) /\ ((((exists ff_h_main_product_terminal. ff_h_main_product_terminal + S (z) = S ((S (e)) * ff_v_main_product)) /\ exists ff_q_main_product_terminal. ff_u_main_product = ff_q_main_product_terminal * S ((S (e)) * ff_v_main_product) + (z))) /\ forall ff_i_main_product. (exists ff_lt_main_product_bound. ff_lt_main_product_bound + S ff_i_main_product = e) -> exists ff_p_main_product ff_r_main_product ff_s_main_product. ((((exists ff_h_main_product_factor. ff_h_main_product_factor + S (ff_p_main_product) = S ((S (ff_i_main_product)) * ff_c_main)) /\ exists ff_q_main_product_factor. ff_b_main = ff_q_main_product_factor * S ((S (ff_i_main_product)) * ff_c_main) + (ff_p_main_product))) /\ ((((exists ff_h_main_product_partial. ff_h_main_product_partial + S (ff_r_main_product) = S ((S (ff_i_main_product)) * ff_v_main_product)) /\ exists ff_q_main_product_partial. ff_u_main_product = ff_q_main_product_partial * S ((S (ff_i_main_product)) * ff_v_main_product) + (ff_r_main_product))) /\ ((((exists ff_h_main_product_successor. ff_h_main_product_successor + S (ff_s_main_product) = S ((S (S ff_i_main_product)) * ff_v_main_product)) /\ exists ff_q_main_product_successor. ff_u_main_product = ff_q_main_product_successor * S ((S (S ff_i_main_product)) * ff_v_main_product) + (ff_s_main_product))) /\ ff_s_main_product = ff_r_main_product * ff_p_main_product)))))))) -> (((exists gs_even_main. e = 2 * gs_even_main) -> (exists gs_u_result_even gs_v_result_even. (z) + p * gs_u_result_even = (1) + p * gs_v_result_even)) /\ ((exists gs_odd_main. e = 2 * gs_odd_main + 1) -> (exists gs_u_result_odd gs_v_result_odd. (z) + p * gs_u_result_odd = (r) + p * gs_v_result_odd)))
use pow_zero
use pow_successor_decompose
use odd_not_even
use even_successor_to_odd
use odd_successor_to_even
use predecessor_square_mod_one
use mod_eq_refl
use mod_eq_mul
use mod_eq_trans
use one_mul
intro p
intro r
induction e
intro z
intro hp
intro hpow
split
intro he
have hz : z = 1
specialize pow_zero r
specialize pow_zero 0
specialize pow_zero z
apply pow_zero
refl
exact hpow
rewrite hz
specialize mod_eq_refl p
specialize mod_eq_refl 1
exact mod_eq_refl
intro ho
exfalso
specialize odd_not_even 0
apply odd_not_even
exact ho
exists 0
norm_num
intro z
intro hp
intro hpow
have hstep : exists w. (exists ff_b_predecessor ff_c_predecessor. ((forall ff_i_predecessor_repeat. (exists ff_lt_predecessor_repeat_bound. ff_lt_predecessor_repeat_bound + S ff_i_predecessor_repeat = e) -> (((exists ff_h_predecessor_repeat_decoded. ff_h_predecessor_repeat_decoded + S (r) = S ((S (ff_i_predecessor_repeat)) * ff_c_predecessor)) /\ exists ff_q_predecessor_repeat_decoded. ff_b_predecessor = ff_q_predecessor_repeat_decoded * S ((S (ff_i_predecessor_repeat)) * ff_c_predecessor) + (r)))) /\ (exists ff_u_predecessor_product ff_v_predecessor_product. ((((exists ff_h_predecessor_product_start. ff_h_predecessor_product_start + S (1) = S ((S (0)) * ff_v_predecessor_product)) /\ exists ff_q_predecessor_product_start. ff_u_predecessor_product = ff_q_predecessor_product_start * S ((S (0)) * ff_v_predecessor_product) + (1))) /\ ((((exists ff_h_predecessor_product_terminal. ff_h_predecessor_product_terminal + S (w) = S ((S (e)) * ff_v_predecessor_product)) /\ exists ff_q_predecessor_product_terminal. ff_u_predecessor_product = ff_q_predecessor_product_terminal * S ((S (e)) * ff_v_predecessor_product) + (w))) /\ forall ff_i_predecessor_product. (exists ff_lt_predecessor_product_bound. ff_lt_predecessor_product_bound + S ff_i_predecessor_product = e) -> exists ff_p_predecessor_product ff_r_predecessor_product ff_s_predecessor_product. ((((exists ff_h_predecessor_product_factor. ff_h_predecessor_product_factor + S (ff_p_predecessor_product) = S ((S (ff_i_predecessor_product)) * ff_c_predecessor)) /\ exists ff_q_predecessor_product_factor. ff_b_predecessor = ff_q_predecessor_product_factor * S ((S (ff_i_predecessor_product)) * ff_c_predecessor) + (ff_p_predecessor_product))) /\ ((((exists ff_h_predecessor_product_partial. ff_h_predecessor_product_partial + S (ff_r_predecessor_product) = S ((S (ff_i_predecessor_product)) * ff_v_predecessor_product)) /\ exists ff_q_predecessor_product_partial. ff_u_predecessor_product = ff_q_predecessor_product_partial * S ((S (ff_i_predecessor_product)) * ff_v_predecessor_product) + (ff_r_predecessor_product))) /\ ((((exists ff_h_predecessor_product_successor. ff_h_predecessor_product_successor + S (ff_s_predecessor_product) = S ((S (S ff_i_predecessor_product)) * ff_v_predecessor_product)) /\ exists ff_q_predecessor_product_successor. ff_u_predecessor_product = ff_q_predecessor_product_successor * S ((S (S ff_i_predecessor_product)) * ff_v_predecessor_product) + (ff_s_predecessor_product))) /\ ff_s_predecessor_product = ff_r_predecessor_product * ff_p_predecessor_product)))))))) /\ z = w * r
specialize pow_successor_decompose r
specialize pow_successor_decompose e
specialize pow_successor_decompose (S e)
specialize pow_successor_decompose z
apply pow_successor_decompose
refl
exact hpow
cases hstep
cases hstep_witness
have hinv : (((exists gs_even_ih. e = 2 * gs_even_ih) -> (exists gs_u_ih_even gs_v_ih_even. (x) + p * gs_u_ih_even = (1) + p * gs_v_ih_even)) /\ ((exists gs_odd_ih. e = 2 * gs_odd_ih + 1) -> (exists gs_u_ih_odd gs_v_ih_odd. (x) + p * gs_u_ih_odd = (r) + p * gs_v_ih_odd)))
specialize IH x
apply IH
exact hp
exact hstep_witness_left
cases hinv
split
intro hse
have heo : exists a. e = 2 * a + 1
specialize even_successor_to_odd e
apply even_successor_to_odd
exact hse
have hwr : exists u v. x + p * u = r + p * v
apply hinv_right
exact heo
have hrr : exists u v. r + p * u = r + p * v
specialize mod_eq_refl p
specialize mod_eq_refl r
exact mod_eq_refl
have hmul : exists u v. (x * r) + p * u = (r * r) + p * v
specialize mod_eq_mul p
specialize mod_eq_mul x
specialize mod_eq_mul r
specialize mod_eq_mul r
specialize mod_eq_mul r
apply mod_eq_mul
exact hwr
exact hrr
have hsq : exists u v. (r * r) + p * u = 1 + p * v
specialize predecessor_square_mod_one p
specialize predecessor_square_mod_one r
apply predecessor_square_mod_one
exact hp
have hfinal : exists u v. (x * r) + p * u = 1 + p * v
specialize mod_eq_trans p
specialize mod_eq_trans (x * r)
specialize mod_eq_trans (r * r)
specialize mod_eq_trans 1
apply mod_eq_trans
exact hmul
exact hsq
rewrite hstep_witness_right
exact hfinal
intro hso
have hee : exists a. e = 2 * a
specialize odd_successor_to_even e
apply odd_successor_to_even
exact hso
have hw1 : exists u v. x + p * u = 1 + p * v
apply hinv_left
exact hee
have hrr : exists u v. r + p * u = r + p * v
specialize mod_eq_refl p
specialize mod_eq_refl r
exact mod_eq_refl
have hmul : exists u v. (x * r) + p * u = (1 * r) + p * v
specialize mod_eq_mul p
specialize mod_eq_mul x
specialize mod_eq_mul 1
specialize mod_eq_mul r
specialize mod_eq_mul r
apply mod_eq_mul
exact hw1
exact hrr
specialize one_mul r
rewrite one_mul at hmul
rewrite hstep_witness_right
exact hmul
qed
- Occurrences
- 9,249
- Distinct objects
- 1,758
- Reused references
- 102
- Depth
- 67
- Cuts
- 254
- Certificate SHA-256
85d62b696a87…
beta_range_injectiveBeta range injective
Quadratic reciprocity campaign
checked
Equal decoded values in one consecutive range have equal indices.
Exact expanded PA statement
forall b c a l i j x y. (forall ff_i_generic. (exists ff_lt_generic_bound. ff_lt_generic_bound + S ff_i_generic = l) -> (((exists ff_h_generic_decoded. ff_h_generic_decoded + S (a + ff_i_generic) = S ((S (ff_i_generic)) * c)) /\ exists ff_q_generic_decoded. b = ff_q_generic_decoded * S ((S (ff_i_generic)) * c) + (a + ff_i_generic)))) -> (exists gh_lt_generic_i. gh_lt_generic_i + S i = l) -> (exists gh_lt_generic_j. gh_lt_generic_j + S j = l) -> (((exists ff_h_generic_i. ff_h_generic_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_generic_i. b = ff_q_generic_i * S ((S (i)) * c) + (x))) -> (((exists ff_h_generic_j. ff_h_generic_j + S (y) = S ((S (j)) * c)) /\ exists ff_q_generic_j. b = ff_q_generic_j * S ((S (j)) * c) + (y))) -> x = y -> i = j
Complete replay recipe: dependency imports + authored proof
pa prove forall b c a l i j x y. (forall ff_i_generic. (exists ff_lt_generic_bound. ff_lt_generic_bound + S ff_i_generic = l) -> (((exists ff_h_generic_decoded. ff_h_generic_decoded + S (a + ff_i_generic) = S ((S (ff_i_generic)) * c)) /\ exists ff_q_generic_decoded. b = ff_q_generic_decoded * S ((S (ff_i_generic)) * c) + (a + ff_i_generic)))) -> (exists gh_lt_generic_i. gh_lt_generic_i + S i = l) -> (exists gh_lt_generic_j. gh_lt_generic_j + S j = l) -> (((exists ff_h_generic_i. ff_h_generic_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_generic_i. b = ff_q_generic_i * S ((S (i)) * c) + (x))) -> (((exists ff_h_generic_j. ff_h_generic_j + S (y) = S ((S (j)) * c)) /\ exists ff_q_generic_j. b = ff_q_generic_j * S ((S (j)) * c) + (y))) -> x = y -> i = j
use beta_range_entry_eq
use add_left_cancel
intro b
intro c
intro a
intro l
intro i
intro j
intro x
intro y
intro hrange
intro hi
intro hj
intro hxi
intro hyj
intro hxy
have hxia : x = a + i
specialize beta_range_entry_eq b
specialize beta_range_entry_eq c
specialize beta_range_entry_eq a
specialize beta_range_entry_eq l
specialize beta_range_entry_eq i
specialize beta_range_entry_eq x
apply beta_range_entry_eq
exact hrange
exact hi
exact hxi
have hyja : y = a + j
specialize beta_range_entry_eq b
specialize beta_range_entry_eq c
specialize beta_range_entry_eq a
specialize beta_range_entry_eq l
specialize beta_range_entry_eq j
specialize beta_range_entry_eq y
apply beta_range_entry_eq
exact hrange
exact hj
exact hyj
have haij : a + i = a + j
trans x
symm
exact hxia
trans y
exact hxy
exact hyja
specialize add_left_cancel a
specialize add_left_cancel i
specialize add_left_cancel j
apply add_left_cancel
exact haij
qed
- Occurrences
- 1,338
- Distinct objects
- 766
- Reused references
- 38
- Depth
- 61
- Cuts
- 37
- Certificate SHA-256
b2fab09a4ed7…
beta_half_range_entry_boundsBeta half range entry bounds
Quadratic reciprocity campaign
checked
Entries 1 through h in an odd half-range are nonzero and below p.
Exact expanded PA statement
forall p h b c i x. p = 2 * h + 1 -> (forall gh_i_half. (exists gh_lt_half_bound. gh_lt_half_bound + S gh_i_half = h) -> (((exists gh_h_half. gh_h_half + S (1 + gh_i_half) = S ((S gh_i_half) * c)) /\ exists gh_q_half. b = gh_q_half * S ((S gh_i_half) * c) + (1 + gh_i_half)))) -> (exists gh_lt_half_i. gh_lt_half_i + S i = h) -> (((exists ff_h_half_i. ff_h_half_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_half_i. b = ff_q_half_i * S ((S (i)) * c) + (x))) -> (~(x = 0) /\ (exists gh_lt_half_value. gh_lt_half_value + S x = p))
Complete replay recipe: dependency imports + authored proof
pa prove forall p h b c i x. p = 2 * h + 1 -> (forall gh_i_half. (exists gh_lt_half_bound. gh_lt_half_bound + S gh_i_half = h) -> (((exists gh_h_half. gh_h_half + S (1 + gh_i_half) = S ((S gh_i_half) * c)) /\ exists gh_q_half. b = gh_q_half * S ((S gh_i_half) * c) + (1 + gh_i_half)))) -> (exists gh_lt_half_i. gh_lt_half_i + S i = h) -> (((exists ff_h_half_i. ff_h_half_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_half_i. b = ff_q_half_i * S ((S (i)) * c) + (x))) -> (~(x = 0) /\ (exists gh_lt_half_value. gh_lt_half_value + S x = p))
use beta_range_entry_eq
use zero_add
use add_succ_left
use mul_succ_left
use mul_zero_left
use add_assoc
use lt_of_le_of_lt
intro p
intro h
intro b
intro c
intro i
intro x
intro hp
intro hrange
intro hi
intro hxi
have hx : x = 1 + i
specialize beta_range_entry_eq b
specialize beta_range_entry_eq c
specialize beta_range_entry_eq 1
specialize beta_range_entry_eq h
specialize beta_range_entry_eq i
specialize beta_range_entry_eq x
apply beta_range_entry_eq
exact hrange
exact hi
exact hxi
have hone : 1 + i = S i
trans S (0 + i)
specialize add_succ_left 0
specialize add_succ_left i
exact add_succ_left
congr
specialize zero_add i
exact zero_add
have hxsi : x = S i
trans 1 + i
exact hx
exact hone
split
intro hx0
apply PA1
trans x
symm
exact hxsi
exact hx0
have hxh : exists k. k + x = h
rewrite hxsi
exact hi
have hhp : exists k. k + S h = p
exists h
rewrite hp
simp [mul_succ_left, mul_zero_left, add_succ_left, zero_add, add_assoc]
specialize lt_of_le_of_lt x
specialize lt_of_le_of_lt h
specialize lt_of_le_of_lt p
apply lt_of_le_of_lt
exact hxh
exact hhp
qed
- Occurrences
- 1,585
- Distinct objects
- 850
- Reused references
- 46
- Depth
- 61
- Cuts
- 43
- Certificate SHA-256
3752530cd637…
beta_half_range_mod_eq_valueBeta half range mod eq value
Quadratic reciprocity campaign
checked
Congruent entries in the odd half-range are equal as bounded residues.
Exact expanded PA statement
forall p h b c i j x y. p = 2 * h + 1 -> (forall gh_i_pair. (exists gh_lt_pair_bound. gh_lt_pair_bound + S gh_i_pair = h) -> (((exists gh_h_pair. gh_h_pair + S (1 + gh_i_pair) = S ((S gh_i_pair) * c)) /\ exists gh_q_pair. b = gh_q_pair * S ((S gh_i_pair) * c) + (1 + gh_i_pair)))) -> (exists gh_lt_pair_i. gh_lt_pair_i + S i = h) -> (exists gh_lt_pair_j. gh_lt_pair_j + S j = h) -> (((exists ff_h_pair_i. ff_h_pair_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_pair_i. b = ff_q_pair_i * S ((S (i)) * c) + (x))) -> (((exists ff_h_pair_j. ff_h_pair_j + S (y) = S ((S (j)) * c)) /\ exists ff_q_pair_j. b = ff_q_pair_j * S ((S (j)) * c) + (y))) -> (exists gh_u_pair gh_v_pair. x + p * gh_u_pair = y + p * gh_v_pair) -> x = y
Complete replay recipe: dependency imports + authored proof
pa prove forall p h b c i j x y. p = 2 * h + 1 -> (forall gh_i_pair. (exists gh_lt_pair_bound. gh_lt_pair_bound + S gh_i_pair = h) -> (((exists gh_h_pair. gh_h_pair + S (1 + gh_i_pair) = S ((S gh_i_pair) * c)) /\ exists gh_q_pair. b = gh_q_pair * S ((S gh_i_pair) * c) + (1 + gh_i_pair)))) -> (exists gh_lt_pair_i. gh_lt_pair_i + S i = h) -> (exists gh_lt_pair_j. gh_lt_pair_j + S j = h) -> (((exists ff_h_pair_i. ff_h_pair_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_pair_i. b = ff_q_pair_i * S ((S (i)) * c) + (x))) -> (((exists ff_h_pair_j. ff_h_pair_j + S (y) = S ((S (j)) * c)) /\ exists ff_q_pair_j. b = ff_q_pair_j * S ((S (j)) * c) + (y))) -> (exists gh_u_pair gh_v_pair. x + p * gh_u_pair = y + p * gh_v_pair) -> x = y
use beta_half_range_entry_bounds
use mod_eq_bounded_unique
intro p
intro h
intro b
intro c
intro i
intro j
intro x
intro y
intro hp
intro hrange
intro hi
intro hj
intro hxi
intro hyj
intro hxy
have hxb : ~(x = 0) /\ exists k. k + S x = p
specialize beta_half_range_entry_bounds p
specialize beta_half_range_entry_bounds h
specialize beta_half_range_entry_bounds b
specialize beta_half_range_entry_bounds c
specialize beta_half_range_entry_bounds i
specialize beta_half_range_entry_bounds x
apply beta_half_range_entry_bounds
exact hp
exact hrange
exact hi
exact hxi
have hyb : ~(y = 0) /\ exists k. k + S y = p
specialize beta_half_range_entry_bounds p
specialize beta_half_range_entry_bounds h
specialize beta_half_range_entry_bounds b
specialize beta_half_range_entry_bounds c
specialize beta_half_range_entry_bounds j
specialize beta_half_range_entry_bounds y
apply beta_half_range_entry_bounds
exact hp
exact hrange
exact hj
exact hyj
cases hxb
cases hyb
specialize mod_eq_bounded_unique p
specialize mod_eq_bounded_unique x
specialize mod_eq_bounded_unique y
apply mod_eq_bounded_unique
exact hxb_right
exact hyb_right
exact hxy
qed
- Occurrences
- 2,603
- Distinct objects
- 941
- Reused references
- 48
- Depth
- 62
- Cuts
- 71
- Certificate SHA-256
a3c337b1d50f…
beta_half_range_mod_injectiveBeta half range mod injective
Quadratic reciprocity campaign
checked
The odd half-range is injective modulo p at the level of indices.
Exact expanded PA statement
forall p h b c i j x y. p = 2 * h + 1 -> (forall gh_i_pair. (exists gh_lt_pair_bound. gh_lt_pair_bound + S gh_i_pair = h) -> (((exists gh_h_pair. gh_h_pair + S (1 + gh_i_pair) = S ((S gh_i_pair) * c)) /\ exists gh_q_pair. b = gh_q_pair * S ((S gh_i_pair) * c) + (1 + gh_i_pair)))) -> (exists gh_lt_pair_i. gh_lt_pair_i + S i = h) -> (exists gh_lt_pair_j. gh_lt_pair_j + S j = h) -> (((exists ff_h_pair_i. ff_h_pair_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_pair_i. b = ff_q_pair_i * S ((S (i)) * c) + (x))) -> (((exists ff_h_pair_j. ff_h_pair_j + S (y) = S ((S (j)) * c)) /\ exists ff_q_pair_j. b = ff_q_pair_j * S ((S (j)) * c) + (y))) -> (exists gh_u_pair gh_v_pair. x + p * gh_u_pair = y + p * gh_v_pair) -> i = j
Complete replay recipe: dependency imports + authored proof
pa prove forall p h b c i j x y. p = 2 * h + 1 -> (forall gh_i_pair. (exists gh_lt_pair_bound. gh_lt_pair_bound + S gh_i_pair = h) -> (((exists gh_h_pair. gh_h_pair + S (1 + gh_i_pair) = S ((S gh_i_pair) * c)) /\ exists gh_q_pair. b = gh_q_pair * S ((S gh_i_pair) * c) + (1 + gh_i_pair)))) -> (exists gh_lt_pair_i. gh_lt_pair_i + S i = h) -> (exists gh_lt_pair_j. gh_lt_pair_j + S j = h) -> (((exists ff_h_pair_i. ff_h_pair_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_pair_i. b = ff_q_pair_i * S ((S (i)) * c) + (x))) -> (((exists ff_h_pair_j. ff_h_pair_j + S (y) = S ((S (j)) * c)) /\ exists ff_q_pair_j. b = ff_q_pair_j * S ((S (j)) * c) + (y))) -> (exists gh_u_pair gh_v_pair. x + p * gh_u_pair = y + p * gh_v_pair) -> i = j
use beta_half_range_mod_eq_value
use beta_range_injective
intro p
intro h
intro b
intro c
intro i
intro j
intro x
intro y
intro hp
intro hrange
intro hi
intro hj
intro hxi
intro hyj
intro hxy
have hvalue : x = y
specialize beta_half_range_mod_eq_value p
specialize beta_half_range_mod_eq_value h
specialize beta_half_range_mod_eq_value b
specialize beta_half_range_mod_eq_value c
specialize beta_half_range_mod_eq_value i
specialize beta_half_range_mod_eq_value j
specialize beta_half_range_mod_eq_value x
specialize beta_half_range_mod_eq_value y
apply beta_half_range_mod_eq_value
exact hp
exact hrange
exact hi
exact hj
exact hxi
exact hyj
exact hxy
specialize beta_range_injective b
specialize beta_range_injective c
specialize beta_range_injective 1
specialize beta_range_injective h
specialize beta_range_injective i
specialize beta_range_injective j
specialize beta_range_injective x
specialize beta_range_injective y
apply beta_range_injective
exact hrange
exact hi
exact hj
exact hxi
exact hyj
exact hvalue
qed
- Occurrences
- 4,001
- Distinct objects
- 1,052
- Reused references
- 50
- Depth
- 63
- Cuts
- 110
- Certificate SHA-256
9497e9ce70f5…
finite_surjective_zeroFinite surjective zero
Quadratic reciprocity campaign
checked
The empty decoded prefix is surjective onto the empty interval.
Exact expanded PA statement
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)))))
Complete replay recipe: dependency imports + authored proof
pa prove 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)))))
use add_eq_zero_right
use succ_ne_zero
intro b
intro c
intro n
intro hn
intro y
intro hy
rewrite hn at hy
exfalso
cases hy
have hsy : S y = 0
specialize add_eq_zero_right x
specialize add_eq_zero_right (S y)
apply add_eq_zero_right
exact hy_witness
specialize succ_ne_zero y
apply succ_ne_zero
exact hsy
qed
- Occurrences
- 41
- Distinct objects
- 41
- Reused references
- 0
- Depth
- 15
- Cuts
- 2
- Certificate SHA-256
5784eb55a356…
finite_injective_prefix_succFinite injective prefix succ
Quadratic reciprocity campaign
checked
Injectivity of a successor prefix restricts to its old prefix.
Exact expanded PA statement
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)
Complete replay recipe: dependency imports + authored proof
pa prove 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)
use le_succ
intro b
intro c
intro n
intro sn
intro hsn
intro hinj
rewrite hsn at hinj
rewrite hsn at hinj
intro i
intro j
intro x
intro hi
intro hj
intro hxi
intro hxj
specialize hinj i
specialize hinj j
specialize hinj x
apply hinj
specialize le_succ (S i)
specialize le_succ n
apply le_succ
exact hi
specialize le_succ (S j)
specialize le_succ n
apply le_succ
exact hj
exact hxi
exact hxj
qed
- Occurrences
- 105
- Distinct objects
- 103
- Reused references
- 2
- Depth
- 34
- Cuts
- 2
- Certificate SHA-256
6e9e1361005b…
finite_lt_succ_eq_or_ltFinite lt succ eq or lt
Quadratic reciprocity campaign
checked
A value below a successor is the predecessor or lies below it.
Exact expanded PA statement
forall n x. (exists h. h + S x = S n) -> x = n \/ exists h. h + S x = n
Complete replay recipe: dependency imports + authored proof
pa prove forall n x. (exists h. h + S x = S n) -> x = n \/ exists h. h + S x = n
use le_of_succ_le_succ
use le_eq_or_lt
intro n
intro x
intro hlt
have hle : exists h. h + x = n
specialize le_of_succ_le_succ x
specialize le_of_succ_le_succ n
apply le_of_succ_le_succ
exact hlt
specialize le_eq_or_lt x
specialize le_eq_or_lt n
apply le_eq_or_lt
exact hle
qed
- Occurrences
- 128
- Distinct objects
- 124
- Reused references
- 4
- Depth
- 21
- Cuts
- 5
- Certificate SHA-256
5d2bc17aeec8…
finite_bounded_entry_ltFinite bounded entry lt
Quadratic reciprocity campaign
checked
Every explicitly decoded entry of a bounded prefix satisfies its value bound.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use beta_at_unique
intro b
intro c
intro l
intro i
intro x
intro hbounded
intro hi
intro hentry
specialize hbounded i
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)
apply hbounded
exact hi
cases hdecoded
cases hdecoded_witness
have hxa : x = x1
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique i
specialize beta_at_unique x
specialize beta_at_unique x1
apply beta_at_unique
exact hentry
exact hdecoded_witness_left
rewrite hxa
exact hdecoded_witness_right
qed
- Occurrences
- 1,150
- Distinct objects
- 721
- Reused references
- 37
- Depth
- 60
- Cuts
- 31
- Certificate SHA-256
a17f66fcd878…
beta_prefix_replace_existsBeta prefix replace exists
Quadratic reciprocity campaign
checked
Recode a finite beta prefix while replacing one interior entry.
Exact expanded PA statement
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))))
Complete replay recipe: dependency imports + authored proof
pa prove 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))))
use add_eq_zero_right
use succ_ne_zero
use finite_lt_succ_eq_or_lt
use beta_prefix_extend
use beta_at_exists
use beta_at_unique
intro b
intro c
intro i
intro s
induction k
intro hi
exfalso
cases hi
have hsi : S i = 0
specialize add_eq_zero_right x
specialize add_eq_zero_right (S i)
apply add_eq_zero_right
exact hi_witness
specialize succ_ne_zero i
apply succ_ne_zero
exact hsi
intro hi
have hisplit : i = k \/ exists h. h + S i = k
specialize finite_lt_succ_eq_or_lt k
specialize finite_lt_succ_eq_or_lt i
apply finite_lt_succ_eq_or_lt
exact hi
cases hisplit
specialize beta_prefix_extend k
specialize beta_prefix_extend b
specialize beta_prefix_extend c
specialize beta_prefix_extend s
cases beta_prefix_extend
cases beta_prefix_extend_witness
cases beta_prefix_extend_witness_witness
exists x
exists x1
split
rewrite hisplit_left
rewrite hisplit_left
exact beta_prefix_extend_witness_witness_left
intro j
intro a
intro hj
intro hji
intro hold
have hjsplit : j = k \/ exists h. h + S j = k
specialize finite_lt_succ_eq_or_lt k
specialize finite_lt_succ_eq_or_lt j
apply finite_lt_succ_eq_or_lt
exact hj
cases hjsplit
exfalso
apply hji
trans k
exact hjsplit_left
symm
exact hisplit_left
specialize beta_prefix_extend_witness_witness_right j
specialize beta_prefix_extend_witness_witness_right a
apply beta_prefix_extend_witness_witness_right
exact hjsplit_right
exact hold
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))
apply IH
exact hisplit_right
cases hreplaced
cases hreplaced_witness
cases hreplaced_witness_witness
specialize beta_at_exists b
specialize beta_at_exists c
specialize beta_at_exists k
cases beta_at_exists
specialize beta_prefix_extend k
specialize beta_prefix_extend x
specialize beta_prefix_extend x1
specialize beta_prefix_extend x2
cases beta_prefix_extend
cases beta_prefix_extend_witness
cases beta_prefix_extend_witness_witness
exists x3
exists x4
split
specialize beta_prefix_extend_witness_witness_right i
specialize beta_prefix_extend_witness_witness_right s
apply beta_prefix_extend_witness_witness_right
exact hisplit_right
exact hreplaced_witness_witness_left
intro j
intro a
intro hj
intro hji
intro hold
have hjsplit : j = k \/ exists h. h + S j = k
specialize finite_lt_succ_eq_or_lt k
specialize finite_lt_succ_eq_or_lt j
apply finite_lt_succ_eq_or_lt
exact hj
cases hjsplit
have hax : a = x2
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique k
specialize beta_at_unique a
specialize beta_at_unique x2
apply beta_at_unique
rewrite hjsplit_left at hold
rewrite hjsplit_left at hold
exact hold
exact beta_at_exists_witness
rewrite hjsplit_left
rewrite hjsplit_left
rewrite hax
rewrite hax
exact beta_prefix_extend_witness_witness_left
have hmiddle : ((exists h. h + S a = S ((S j) * x1)) /\ exists q. x = q * S ((S j) * x1) + a)
specialize hreplaced_witness_witness_right j
specialize hreplaced_witness_witness_right a
apply hreplaced_witness_witness_right
exact hjsplit_right
exact hji
exact hold
specialize beta_prefix_extend_witness_witness_right j
specialize beta_prefix_extend_witness_witness_right a
apply beta_prefix_extend_witness_witness_right
exact hjsplit_right
exact hmiddle
qed
- Occurrences
- 30,981
- Distinct objects
- 4,698
- Reused references
- 231
- Depth
- 84
- Cuts
- 923
- Certificate SHA-256
0bce1fe4a844…
beta_prefix_swap_last_from_entriesBeta prefix swap last from entries
Quadratic reciprocity campaign
checked
Swap a chosen interior beta entry with the last entry, given both decoded values.
Exact expanded PA statement
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)))))
Complete replay recipe: dependency imports + authored proof
pa prove 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)))))
use beta_prefix_replace_exists
use le_succ
use le_refl
use lt_irrefl_expanded
intro b
intro c
intro n
intro i
intro x
intro y
intro hi
intro hxi
intro hyn
have hisn : exists h. h + S i = S n
specialize le_succ (S i)
specialize le_succ n
apply le_succ
exact hi
have hnsn : exists h. h + S n = S n
specialize le_refl (S n)
exact le_refl
have hin : ~(i = n)
intro hin_eq
specialize lt_irrefl_expanded n
apply lt_irrefl_expanded
rewrite hin_eq at hi
exact hi
have hni : ~(n = i)
intro hni_eq
apply hin
symm
exact hni_eq
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))
specialize beta_prefix_replace_exists b
specialize beta_prefix_replace_exists c
specialize beta_prefix_replace_exists i
specialize beta_prefix_replace_exists y
specialize beta_prefix_replace_exists (S n)
apply beta_prefix_replace_exists
exact hisn
cases hfirst
cases hfirst_witness
cases hfirst_witness_witness
have hfirst_n : ((exists h. h + S y = S ((S n) * x2)) /\ exists q. x1 = q * S ((S n) * x2) + y)
specialize hfirst_witness_witness_right n
specialize hfirst_witness_witness_right y
apply hfirst_witness_witness_right
exact hnsn
exact hni
exact hyn
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))
specialize beta_prefix_replace_exists x1
specialize beta_prefix_replace_exists x2
specialize beta_prefix_replace_exists n
specialize beta_prefix_replace_exists x
specialize beta_prefix_replace_exists (S n)
apply beta_prefix_replace_exists
exact hnsn
cases hsecond
cases hsecond_witness
cases hsecond_witness_witness
exists x3
exists x4
split
specialize hsecond_witness_witness_right i
specialize hsecond_witness_witness_right y
apply hsecond_witness_witness_right
exact hisn
exact hin
exact hfirst_witness_witness_left
split
exact hsecond_witness_witness_left
intro j
intro a
intro hj
intro hji
intro hjn
intro hold
have hmiddle : ((exists h. h + S a = S ((S j) * x2)) /\ exists q. x1 = q * S ((S j) * x2) + a)
specialize hfirst_witness_witness_right j
specialize hfirst_witness_witness_right a
apply hfirst_witness_witness_right
exact hj
exact hji
exact hold
specialize hsecond_witness_witness_right j
specialize hsecond_witness_witness_right a
apply hsecond_witness_witness_right
exact hj
exact hjn
exact hmiddle
qed
- Occurrences
- 31,221
- Distinct objects
- 4,790
- Reused references
- 234
- Depth
- 85
- Cuts
- 931
- Certificate SHA-256
c89cd33df597…
beta_prefix_swap_last_existsBeta prefix swap last exists
Quadratic reciprocity campaign
checked
Construct an extensional beta code with an interior entry swapped with the last.
Exact expanded PA statement
forall b c n i. (exists h. h + S i = n) -> exists z d x y. ((((exists ff_h_swap_exists_old_i. ff_h_swap_exists_old_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_swap_exists_old_i. b = ff_q_swap_exists_old_i * S ((S (i)) * c) + (x))) /\ ((((exists ff_h_swap_exists_old_n. ff_h_swap_exists_old_n + S (y) = S ((S (n)) * c)) /\ exists ff_q_swap_exists_old_n. b = ff_q_swap_exists_old_n * S ((S (n)) * c) + (y))) /\ ((((exists ff_h_swap_exists_new_i. ff_h_swap_exists_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_swap_exists_new_i. z = ff_q_swap_exists_new_i * S ((S (i)) * d) + (y))) /\ ((((exists ff_h_swap_exists_new_n. ff_h_swap_exists_new_n + S (x) = S ((S (n)) * d)) /\ exists ff_q_swap_exists_new_n. z = ff_q_swap_exists_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_exists_old_j. ff_h_swap_exists_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_swap_exists_old_j. b = ff_q_swap_exists_old_j * S ((S (j)) * c) + (a))) -> (((exists ff_h_swap_exists_new_j. ff_h_swap_exists_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_swap_exists_new_j. z = ff_q_swap_exists_new_j * S ((S (j)) * d) + (a)))))))
Complete replay recipe: dependency imports + authored proof
pa prove forall b c n i. (exists h. h + S i = n) -> exists z d x y. ((((exists ff_h_swap_exists_old_i. ff_h_swap_exists_old_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_swap_exists_old_i. b = ff_q_swap_exists_old_i * S ((S (i)) * c) + (x))) /\ ((((exists ff_h_swap_exists_old_n. ff_h_swap_exists_old_n + S (y) = S ((S (n)) * c)) /\ exists ff_q_swap_exists_old_n. b = ff_q_swap_exists_old_n * S ((S (n)) * c) + (y))) /\ ((((exists ff_h_swap_exists_new_i. ff_h_swap_exists_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_swap_exists_new_i. z = ff_q_swap_exists_new_i * S ((S (i)) * d) + (y))) /\ ((((exists ff_h_swap_exists_new_n. ff_h_swap_exists_new_n + S (x) = S ((S (n)) * d)) /\ exists ff_q_swap_exists_new_n. z = ff_q_swap_exists_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_exists_old_j. ff_h_swap_exists_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_swap_exists_old_j. b = ff_q_swap_exists_old_j * S ((S (j)) * c) + (a))) -> (((exists ff_h_swap_exists_new_j. ff_h_swap_exists_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_swap_exists_new_j. z = ff_q_swap_exists_new_j * S ((S (j)) * d) + (a)))))))
use beta_at_exists
use beta_prefix_swap_last_from_entries
intro b
intro c
intro n
intro i
intro hi
have hdecode_i : forall u v k. exists a. ((exists h. h + S a = S ((S k) * v)) /\ exists q. u = q * S ((S k) * v) + a)
exact beta_at_exists
have hdecode_n : forall u v k. exists a. ((exists h. h + S a = S ((S k) * v)) /\ exists q. u = q * S ((S k) * v) + a)
exact beta_at_exists
specialize hdecode_i b
specialize hdecode_i c
specialize hdecode_i i
cases hdecode_i
specialize hdecode_n b
specialize hdecode_n c
specialize hdecode_n n
cases hdecode_n
have hswap : exists z d. (((exists h. h + S x1 = S ((S i) * d)) /\ exists q. z = q * S ((S i) * d) + x1) /\ (((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 = i) -> ~(j = n) -> ((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)))
specialize beta_prefix_swap_last_from_entries b
specialize beta_prefix_swap_last_from_entries c
specialize beta_prefix_swap_last_from_entries n
specialize beta_prefix_swap_last_from_entries i
specialize beta_prefix_swap_last_from_entries x
specialize beta_prefix_swap_last_from_entries x1
apply beta_prefix_swap_last_from_entries
exact hi
exact hdecode_i_witness
exact hdecode_n_witness
cases hswap
cases hswap_witness
exists x2
exists x3
exists x
exists x1
split
exact hdecode_i_witness
split
exact hdecode_n_witness
exact hswap_witness_witness
qed
- Occurrences
- 31,742
- Distinct objects
- 4,832
- Reused references
- 235
- Depth
- 87
- Cuts
- 948
- Certificate SHA-256
b1e5c90f043e…
beta_prefix_swap_last_reflectBeta prefix swap last reflect
Quadratic reciprocity campaign
checked
Every decoded swapped entry reflects to one of the two moved entries or the original index.
Exact expanded PA statement
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)))))))
Complete replay recipe: dependency imports + authored proof
pa prove 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)))))))
use eq_decidable
use beta_at_exists
use beta_at_unique
intro b
intro c
intro z
intro d
intro n
intro i
intro x
intro y
intro hnew_i
intro hnew_n
intro hpreserve
intro j
intro a
intro hj
intro hnew
specialize eq_decidable j
specialize eq_decidable i
cases eq_decidable
left
split
exact eq_decidable_left
specialize beta_at_unique z
specialize beta_at_unique d
specialize beta_at_unique i
specialize beta_at_unique a
specialize beta_at_unique y
apply beta_at_unique
rewrite eq_decidable_left at hnew
rewrite eq_decidable_left at hnew
exact hnew
exact hnew_i
specialize eq_decidable_before2 n
cases eq_decidable_before2
right
left
split
exact eq_decidable_before2_left
specialize beta_at_unique z
specialize beta_at_unique d
specialize beta_at_unique n
specialize beta_at_unique a
specialize beta_at_unique x
apply beta_at_unique
rewrite eq_decidable_before2_left at hnew
rewrite eq_decidable_before2_left at hnew
exact hnew
exact hnew_n
specialize beta_at_exists b
specialize beta_at_exists c
specialize beta_at_exists j
cases beta_at_exists
have htransport : ((exists h. h + S x1 = S ((S j) * d)) /\ exists q. z = q * S ((S j) * d) + x1)
specialize hpreserve j
specialize hpreserve x1
apply hpreserve
exact hj
exact eq_decidable_right
exact eq_decidable_before2_right
exact beta_at_exists_witness
have hav : a = x1
specialize beta_at_unique z
specialize beta_at_unique d
specialize beta_at_unique j
specialize beta_at_unique a
specialize beta_at_unique x1
apply beta_at_unique
exact hnew
exact htransport
right
right
split
exact eq_decidable_right
split
exact eq_decidable_before2_right
rewrite hav
rewrite hav
exact beta_at_exists_witness
qed
- Occurrences
- 1,765
- Distinct objects
- 1,041
- Reused references
- 55
- Depth
- 62
- Cuts
- 48
- Certificate SHA-256
da963c32a931…
finite_swap_last_boundedFinite swap last bounded
Quadratic reciprocity campaign
checked
A swap-last recoding preserves boundedness of the full successor prefix.
Exact expanded PA statement
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)))
Complete replay recipe: dependency imports + authored proof
pa prove 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)))
use finite_bounded_entry_lt
use eq_decidable
use le_succ
use le_refl
intro b
intro c
intro z
intro d
intro n
intro sn
intro i
intro x
intro y
intro hsn
intro hi
intro hbounded
intro hold_i
intro hold_n
intro hnew_i
intro hnew_n
intro hpreserve
rewrite hsn at hbounded
rewrite hsn at hbounded
have hisn : exists h. h + S i = S n
specialize le_succ (S i)
specialize le_succ n
apply le_succ
exact hi
have hnsn : exists h. h + S n = S n
specialize le_refl (S n)
exact le_refl
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
exact finite_bounded_entry_lt
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
exact finite_bounded_entry_lt
have hxb : exists h. h + S x = S n
specialize hentry_bound_i b
specialize hentry_bound_i c
specialize hentry_bound_i (S n)
specialize hentry_bound_i i
specialize hentry_bound_i x
apply hentry_bound_i
exact hbounded
exact hisn
exact hold_i
have hyb : exists h. h + S y = S n
specialize hentry_bound_n b
specialize hentry_bound_n c
specialize hentry_bound_n (S n)
specialize hentry_bound_n n
specialize hentry_bound_n y
apply hentry_bound_n
exact hbounded
exact hnsn
exact hold_n
have heq_i : forall u v. u = v \/ ~(u = v)
exact eq_decidable
have heq_n : forall u v. u = v \/ ~(u = v)
exact eq_decidable
rewrite hsn
rewrite hsn
intro j
intro hj
specialize heq_i j
specialize heq_i i
cases heq_i
exists y
split
rewrite heq_i_left
rewrite heq_i_left
exact hnew_i
exact hyb
specialize heq_n j
specialize heq_n n
cases heq_n
exists x
split
rewrite heq_n_left
rewrite heq_n_left
exact hnew_n
exact hxb
specialize hbounded j
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)
apply hbounded
exact hj
cases hold
cases hold_witness
exists x1
split
specialize hpreserve j
specialize hpreserve x1
apply hpreserve
exact hj
exact heq_i_right
exact heq_n_right
exact hold_witness_left
exact hold_witness_right
qed
- Occurrences
- 1,380
- Distinct objects
- 907
- Reused references
- 39
- Depth
- 61
- Cuts
- 37
- Certificate SHA-256
d379ada457c5…
finite_swap_last_injectiveFinite swap last injective
Quadratic reciprocity campaign
checked
A swap-last recoding preserves injectivity of the full successor prefix.
Exact expanded PA statement
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)
Complete replay recipe: dependency imports + authored proof
pa prove 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)
use beta_prefix_swap_last_reflect
use le_succ
use le_refl
intro b
intro c
intro z
intro d
intro n
intro sn
intro i
intro x
intro y
intro hsn
intro hi
intro hinjective
intro hold_i
intro hold_n
intro hnew_i
intro hnew_n
intro hpreserve
rewrite hsn at hinjective
rewrite hsn at hinjective
have hisn : exists h. h + S i = S n
specialize le_succ (S i)
specialize le_succ n
apply le_succ
exact hi
have hnsn : exists h. h + S n = S n
specialize le_refl (S n)
exact le_refl
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)))))))
exact beta_prefix_swap_last_reflect
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)))))))
exact beta_prefix_swap_last_reflect
rewrite hsn
rewrite hsn
intro j
intro k
intro a
intro hj
intro hk
intro hnew_j
intro hnew_k
specialize hreflect_j b
specialize hreflect_j c
specialize hreflect_j z
specialize hreflect_j d
specialize hreflect_j n
specialize hreflect_j i
specialize hreflect_j x
specialize hreflect_j y
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)))))))
apply hreflect_j
exact hnew_i
exact hnew_n
exact hpreserve
specialize hreflect_entries_j j
specialize hreflect_entries_j a
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)))))
apply hreflect_entries_j
exact hj
exact hnew_j
specialize hreflect_k b
specialize hreflect_k c
specialize hreflect_k z
specialize hreflect_k d
specialize hreflect_k n
specialize hreflect_k i
specialize hreflect_k x
specialize hreflect_k y
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)))))))
apply hreflect_k
exact hnew_i
exact hnew_n
exact hpreserve
specialize hreflect_entries_k k
specialize hreflect_entries_k a
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)))))
apply hreflect_entries_k
exact hk
exact hnew_k
cases hclass_j
cases hclass_j_left
cases hclass_k
cases hclass_k_left
trans i
exact hclass_j_left_left
symm
exact hclass_k_left_left
cases hclass_k_right
cases hclass_k_right_left
have hxy : x = y
trans a
symm
exact hclass_k_right_left_right
exact hclass_j_left_right
have hin : i = n
specialize hinjective i
specialize hinjective n
specialize hinjective x
apply hinjective
exact hisn
exact hnsn
exact hold_i
rewrite hxy
rewrite hxy
exact hold_n
trans i
exact hclass_j_left_left
trans n
exact hin
symm
exact hclass_k_right_left_left
cases hclass_k_right_right
cases hclass_k_right_right_right
have hnk : n = k
specialize hinjective n
specialize hinjective k
specialize hinjective y
apply hinjective
exact hnsn
exact hk
exact hold_n
rewrite <- hclass_j_left_right
rewrite <- hclass_j_left_right
exact hclass_k_right_right_right_right
exfalso
apply hclass_k_right_right_right_left
symm
exact hnk
cases hclass_j_right
cases hclass_j_right_left
cases hclass_k
cases hclass_k_left
have hxy2 : x = y
trans a
symm
exact hclass_j_right_left_right
exact hclass_k_left_right
have hin2 : n = i
specialize hinjective n
specialize hinjective i
specialize hinjective y
apply hinjective
exact hnsn
exact hisn
exact hold_n
rewrite <- hxy2
rewrite <- hxy2
exact hold_i
trans n
exact hclass_j_right_left_left
trans i
exact hin2
symm
exact hclass_k_left_left
cases hclass_k_right
cases hclass_k_right_left
trans n
exact hclass_j_right_left_left
symm
exact hclass_k_right_left_left
cases hclass_k_right_right
cases hclass_k_right_right_right
have hik : i = k
specialize hinjective i
specialize hinjective k
specialize hinjective x
apply hinjective
exact hisn
exact hk
exact hold_i
rewrite <- hclass_j_right_left_right
rewrite <- hclass_j_right_left_right
exact hclass_k_right_right_right_right
exfalso
apply hclass_k_right_right_left
symm
exact hik
cases hclass_j_right_right
cases hclass_j_right_right_right
cases hclass_k
cases hclass_k_left
have hjn : j = n
specialize hinjective j
specialize hinjective n
specialize hinjective y
apply hinjective
exact hj
exact hnsn
rewrite <- hclass_k_left_right
rewrite <- hclass_k_left_right
exact hclass_j_right_right_right_right
exact hold_n
exfalso
apply hclass_j_right_right_right_left
exact hjn
cases hclass_k_right
cases hclass_k_right_left
have hji : j = i
specialize hinjective j
specialize hinjective i
specialize hinjective x
apply hinjective
exact hj
exact hisn
rewrite <- hclass_k_right_left_right
rewrite <- hclass_k_right_left_right
exact hclass_j_right_right_right_right
exact hold_i
exfalso
apply hclass_j_right_right_left
exact hji
cases hclass_k_right_right
cases hclass_k_right_right_right
specialize hinjective j
specialize hinjective k
specialize hinjective a
apply hinjective
exact hj
exact hk
exact hclass_j_right_right_right_right
exact hclass_k_right_right_right_right
qed
- Occurrences
- 2,203
- Distinct objects
- 1,435
- Reused references
- 57
- Depth
- 63
- Cuts
- 53
- Certificate SHA-256
b9a49da8fb88…
finite_swap_last_surjective_backFinite swap last surjective back
Quadratic reciprocity campaign
checked
Surjectivity of a swapped successor prefix transports back to the original code.
Exact expanded PA statement
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)))))
Complete replay recipe: dependency imports + authored proof
pa prove 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)))))
use beta_prefix_swap_last_reflect
use le_succ
use le_refl
intro b
intro c
intro z
intro d
intro n
intro sn
intro i
intro x
intro y
intro hsn
intro hi
intro hold_i
intro hold_n
intro hnew_i
intro hnew_n
intro hpreserve
intro hsurjective
rewrite hsn at hsurjective
rewrite hsn at hsurjective
have hisn : exists h. h + S i = S n
specialize le_succ (S i)
specialize le_succ n
apply le_succ
exact hi
have hnsn : exists h. h + S n = S n
specialize le_refl (S n)
exact le_refl
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)))))))
exact beta_prefix_swap_last_reflect
specialize hreflect b
specialize hreflect c
specialize hreflect z
specialize hreflect d
specialize hreflect n
specialize hreflect i
specialize hreflect x
specialize hreflect y
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)))))
apply hreflect
exact hnew_i
exact hnew_n
exact hpreserve
rewrite hsn
rewrite hsn
intro a
intro ha
specialize hsurjective a
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))
apply hsurjective
exact ha
cases hoccurs
cases hoccurs_witness
specialize hreflect_entries x1
specialize hreflect_entries a
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)))))
apply hreflect_entries
exact hoccurs_witness_left
exact hoccurs_witness_right
cases hsource
cases hsource_left
exists n
split
exact hnsn
rewrite hsource_left_right
rewrite hsource_left_right
exact hold_n
cases hsource_right
cases hsource_right_left
exists i
split
exact hisn
rewrite hsource_right_left_right
rewrite hsource_right_left_right
exact hold_i
cases hsource_right_right
cases hsource_right_right_right
exists x1
split
exact hoccurs_witness_left
exact hsource_right_right_right_right
qed
- Occurrences
- 1,929
- Distinct objects
- 1,161
- Reused references
- 57
- Depth
- 63
- Cuts
- 53
- Certificate SHA-256
689f32aef19d…
finite_contains_decidableFinite contains decidable
Quadratic reciprocity campaign
checked
Occurrence of a value in a nonempty decoded prefix is constructively decidable.
Exact expanded PA statement
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))))))
Complete replay recipe: dependency imports + authored proof
pa prove 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))))))
use add_eq_zero_right
use succ_ne_zero
use finite_lt_succ_eq_or_lt
use beta_at_exists
use beta_at_unique
use eq_decidable
use le_refl
use le_succ
intro b
intro c
induction l
intro y
right
intro hcontains
cases hcontains
cases hcontains_witness
cases hcontains_witness_left
have hsi : S x = 0
specialize add_eq_zero_right x1
specialize add_eq_zero_right (S x)
apply add_eq_zero_right
exact hcontains_witness_left_witness
specialize succ_ne_zero x
apply succ_ne_zero
exact hsi
intro y
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)))
specialize IH y
exact IH
cases hpresent
left
cases hpresent_left
cases hpresent_left_witness
exists x
split
specialize le_succ (S x)
specialize le_succ l
apply le_succ
exact hpresent_left_witness_left
exact hpresent_left_witness_right
specialize beta_at_exists b
specialize beta_at_exists c
specialize beta_at_exists l
cases beta_at_exists
specialize eq_decidable x
specialize eq_decidable y
cases eq_decidable
left
exists l
split
specialize le_refl (S l)
exact le_refl
rewrite eq_decidable_left at beta_at_exists_witness
rewrite eq_decidable_left at beta_at_exists_witness
exact beta_at_exists_witness
right
intro hfull
cases hfull
cases hfull_witness
have hindex : x1 = l \/ exists h. h + S x1 = l
specialize finite_lt_succ_eq_or_lt l
specialize finite_lt_succ_eq_or_lt x1
apply finite_lt_succ_eq_or_lt
exact hfull_witness_left
cases hindex
have hentry : ((exists h. h + S y = S ((S l) * c)) /\ exists q. b = q * S ((S l) * c) + y)
rewrite hindex_left at hfull_witness_right
rewrite hindex_left at hfull_witness_right
exact hfull_witness_right
have hxy : x = y
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique l
specialize beta_at_unique x
specialize beta_at_unique y
apply beta_at_unique
exact beta_at_exists_witness
exact hentry
apply eq_decidable_right
exact hxy
apply hpresent_right
exists x1
split
exact hindex_right
exact hfull_witness_right
qed
- Occurrences
- 1,961
- Distinct objects
- 1,140
- Reused references
- 61
- Depth
- 64
- Cuts
- 60
- Certificate SHA-256
264b86a40d0a…
finite_bounded_prefix_without_topFinite bounded prefix without top
Quadratic reciprocity campaign
checked
If a successor prefix omits its top value, its old prefix is bounded by the predecessor.
Exact expanded PA statement
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)))
Complete replay recipe: dependency imports + authored proof
pa prove 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)))
use le_succ
use finite_lt_succ_eq_or_lt
intro b
intro c
intro n
intro sn
intro hsn
intro hbounded
intro hnotop
rewrite hsn at hbounded
rewrite hsn at hbounded
intro i
intro hi
specialize hbounded i
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)
apply hbounded
specialize le_succ (S i)
specialize le_succ n
apply le_succ
exact hi
cases hfull
cases hfull_witness
have hsplit : x = n \/ exists h. h + S x = n
specialize finite_lt_succ_eq_or_lt n
specialize finite_lt_succ_eq_or_lt x
apply finite_lt_succ_eq_or_lt
exact hfull_witness_right
cases hsplit
exfalso
specialize hnotop i
apply hnotop
exact hi
rewrite <- hsplit_left
rewrite <- hsplit_left
exact hfull_witness_left
exists x
split
exact hfull_witness_left
exact hsplit_right
qed
- Occurrences
- 216
- Distinct objects
- 185
- Reused references
- 5
- Depth
- 23
- Cuts
- 8
- Certificate SHA-256
994ca043b11b…
finite_bounded_last_succFinite bounded last succ
Quadratic reciprocity campaign
checked
A bounded successor prefix exposes a bounded final decoded value.
Exact expanded PA statement
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)
Complete replay recipe: dependency imports + authored proof
pa prove 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)
use le_refl
intro b
intro c
intro n
intro sn
intro hsn
intro hbounded
rewrite hsn at hbounded
rewrite hsn at hbounded
specialize hbounded n
apply hbounded
specialize le_refl (S n)
exact le_refl
qed
- Occurrences
- 53
- Distinct objects
- 53
- Reused references
- 0
- Depth
- 17
- Cuts
- 2
- Certificate SHA-256
ac7f1147afe2…
finite_surjective_succ_introFinite surjective succ intro
Quadratic reciprocity campaign
checked
A surjective prefix plus its new top value is surjective at successor length.
Exact expanded PA statement
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)))))
Complete replay recipe: dependency imports + authored proof
pa prove 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)))))
use finite_lt_succ_eq_or_lt
use le_refl
use le_succ
intro b
intro c
intro n
intro sn
intro hsn
intro hsurj
intro hlast
rewrite hsn
rewrite hsn
intro y
intro hy
have hsplit : y = n \/ exists h. h + S y = n
specialize finite_lt_succ_eq_or_lt n
specialize finite_lt_succ_eq_or_lt y
apply finite_lt_succ_eq_or_lt
exact hy
cases hsplit
exists n
split
specialize le_refl (S n)
exact le_refl
rewrite hsplit_left
rewrite hsplit_left
exact hlast
specialize hsurj y
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))
apply hsurj
exact hsplit_right
cases hpre
cases hpre_witness
exists x
split
specialize le_succ (S x)
specialize le_succ n
apply le_succ
exact hpre_witness_left
exact hpre_witness_right
qed
- Occurrences
- 243
- Distinct objects
- 195
- Reused references
- 6
- Depth
- 22
- Cuts
- 10
- Certificate SHA-256
c2ee0348b812…
finite_last_is_top_from_prefix_surjectiveFinite last is top from prefix surjective
Quadratic reciprocity campaign
checked
A bounded injective successor sequence must place the new value last once its prefix is surjective.
Exact expanded PA statement
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)))
Complete replay recipe: dependency imports + authored proof
pa prove 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)))
use finite_bounded_last_succ
use finite_lt_succ_eq_or_lt
use le_refl
use le_succ
use lt_irrefl_expanded
intro b
intro c
intro n
intro sn
intro hsn
intro hbounded
intro hinj
intro hsurj
rewrite hsn at hinj
rewrite hsn at hinj
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)
specialize finite_bounded_last_succ b
specialize finite_bounded_last_succ c
specialize finite_bounded_last_succ n
specialize finite_bounded_last_succ sn
apply finite_bounded_last_succ
exact hsn
exact hbounded
cases hlast
cases hlast_witness
have hsplit : x = n \/ exists h. h + S x = n
specialize finite_lt_succ_eq_or_lt n
specialize finite_lt_succ_eq_or_lt x
apply finite_lt_succ_eq_or_lt
exact hlast_witness_right
cases hsplit
rewrite hsplit_left at hlast_witness_left
rewrite hsplit_left at hlast_witness_left
exact hlast_witness_left
specialize hsurj x
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))
apply hsurj
exact hsplit_right
cases hpre
cases hpre_witness
have hni : n = x1
specialize hinj n
specialize hinj x1
specialize hinj x
apply hinj
specialize le_refl (S n)
exact le_refl
specialize le_succ (S x1)
specialize le_succ n
apply le_succ
exact hpre_witness_left
exact hlast_witness_left
exact hpre_witness_right
exfalso
specialize lt_irrefl_expanded n
apply lt_irrefl_expanded
rewrite hni
exact hpre_witness_left
qed
- Occurrences
- 402
- Distinct objects
- 302
- Reused references
- 8
- Depth
- 30
- Cuts
- 16
- Certificate SHA-256
0a7e3280cd99…
finite_surjective_succ_from_prefixFinite surjective succ from prefix
Quadratic reciprocity campaign
checked
The available successor branch extends prefix surjectivity to the full prefix.
Exact expanded PA statement
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)))))
Complete replay recipe: dependency imports + authored proof
pa prove 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)))))
use finite_last_is_top_from_prefix_surjective
use finite_surjective_succ_intro
intro b
intro c
intro n
intro sn
intro hsn
intro hbounded
intro hinj
intro hsurj
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))
specialize finite_last_is_top_from_prefix_surjective b
specialize finite_last_is_top_from_prefix_surjective c
specialize finite_last_is_top_from_prefix_surjective n
specialize finite_last_is_top_from_prefix_surjective sn
apply finite_last_is_top_from_prefix_surjective
exact hsn
exact hbounded
exact hinj
exact hsurj
specialize finite_surjective_succ_intro b
specialize finite_surjective_succ_intro c
specialize finite_surjective_succ_intro n
specialize finite_surjective_succ_intro sn
apply finite_surjective_succ_intro
exact hsn
exact hsurj
exact hlast
qed
- Occurrences
- 678
- Distinct objects
- 385
- Reused references
- 11
- Depth
- 31
- Cuts
- 28
- Certificate SHA-256
78bdcadaa47a…
finite_no_top_successor_gateFinite no top successor gate
Quadratic reciprocity campaign
checked
The no-top branch of the constructive successor induction is complete.
Exact expanded PA statement
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)))))
Complete replay recipe: dependency imports + authored proof
pa prove 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)))))
use finite_bounded_prefix_without_top
use finite_injective_prefix_succ
use finite_surjective_succ_from_prefix
intro b
intro c
intro n
intro sn
intro hsn
intro hbounded
intro hinj
intro hmissing
intro hinduction
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)
intro i
intro hi
intro hentry
apply hmissing
exists i
split
exact hi
exact hentry
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))
specialize finite_bounded_prefix_without_top b
specialize finite_bounded_prefix_without_top c
specialize finite_bounded_prefix_without_top n
specialize finite_bounded_prefix_without_top sn
apply finite_bounded_prefix_without_top
exact hsn
exact hbounded
exact hnotop
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
specialize finite_injective_prefix_succ b
specialize finite_injective_prefix_succ c
specialize finite_injective_prefix_succ n
specialize finite_injective_prefix_succ sn
apply finite_injective_prefix_succ
exact hsn
exact hinj
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))))
apply hinduction
exact hprefix_bounded
exact hprefix_injective
specialize finite_surjective_succ_from_prefix b
specialize finite_surjective_succ_from_prefix c
specialize finite_surjective_succ_from_prefix n
specialize finite_surjective_succ_from_prefix sn
apply finite_surjective_succ_from_prefix
exact hsn
exact hbounded
exact hinj
exact hprefix_surjective
qed
- Occurrences
- 1,054
- Distinct objects
- 553
- Reused references
- 14
- Depth
- 36
- Cuts
- 41
- Certificate SHA-256
2d6d4891922b…
finite_bounded_injective_surjectiveFinite bounded injective surjective
Quadratic reciprocity campaign
checked
Every bounded injective beta-coded prefix is surjective onto its finite interval.
finite_surjective_zero finite_contains_decidable finite_bounded_last_succ beta_prefix_swap_last_from_entries finite_swap_last_bounded finite_swap_last_injective finite_bounded_prefix_without_top finite_injective_prefix_succ finite_surjective_succ_from_prefix finite_swap_last_surjective_back finite_no_top_successor_gate beta_at_unique le_succ le_refl lt_irrefl_expandedExact expanded PA statement
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)))))
Complete replay recipe: dependency imports + authored proof
pa prove 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)))))
use finite_surjective_zero
use finite_contains_decidable
use finite_bounded_last_succ
use beta_prefix_swap_last_from_entries
use finite_swap_last_bounded
use finite_swap_last_injective
use finite_bounded_prefix_without_top
use finite_injective_prefix_succ
use finite_surjective_succ_from_prefix
use finite_swap_last_surjective_back
use finite_no_top_successor_gate
use beta_at_unique
use le_succ
use le_refl
use lt_irrefl_expanded
induction n
intro b
intro c
intro hbounded
intro hinjective
specialize finite_surjective_zero b
specialize finite_surjective_zero c
specialize finite_surjective_zero 0
apply finite_surjective_zero
refl
intro b
intro c
intro hbounded
intro hinjective
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)))))
specialize finite_contains_decidable b
specialize finite_contains_decidable c
specialize finite_contains_decidable n
specialize finite_contains_decidable n
exact finite_contains_decidable
cases hcontains
cases hcontains_left
cases hcontains_left_witness
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)
specialize finite_bounded_last_succ b
specialize finite_bounded_last_succ c
specialize finite_bounded_last_succ n
specialize finite_bounded_last_succ (S n)
apply finite_bounded_last_succ
refl
exact hbounded
cases hlast
cases hlast_witness
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)))))
specialize beta_prefix_swap_last_from_entries b
specialize beta_prefix_swap_last_from_entries c
specialize beta_prefix_swap_last_from_entries n
specialize beta_prefix_swap_last_from_entries x
specialize beta_prefix_swap_last_from_entries n
specialize beta_prefix_swap_last_from_entries x1
apply beta_prefix_swap_last_from_entries
exact hcontains_left_witness_left
exact hcontains_left_witness_right
exact hlast_witness_left
cases hswap
cases hswap_witness
cases hswap_witness_witness
cases hswap_witness_witness_right
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))
specialize finite_swap_last_bounded b
specialize finite_swap_last_bounded c
specialize finite_swap_last_bounded x2
specialize finite_swap_last_bounded x3
specialize finite_swap_last_bounded n
specialize finite_swap_last_bounded (S n)
specialize finite_swap_last_bounded x
specialize finite_swap_last_bounded n
specialize finite_swap_last_bounded x1
apply finite_swap_last_bounded
refl
exact hcontains_left_witness_left
exact hbounded
exact hcontains_left_witness_right
exact hlast_witness_left
exact hswap_witness_witness_left
exact hswap_witness_witness_right_left
exact hswap_witness_witness_right_right
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
specialize finite_swap_last_injective b
specialize finite_swap_last_injective c
specialize finite_swap_last_injective x2
specialize finite_swap_last_injective x3
specialize finite_swap_last_injective n
specialize finite_swap_last_injective (S n)
specialize finite_swap_last_injective x
specialize finite_swap_last_injective n
specialize finite_swap_last_injective x1
apply finite_swap_last_injective
refl
exact hcontains_left_witness_left
exact hinjective
exact hcontains_left_witness_right
exact hlast_witness_left
exact hswap_witness_witness_left
exact hswap_witness_witness_right_left
exact hswap_witness_witness_right_right
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)))
intro j
intro hj
intro htop
have hjsn : exists h. h + S j = S n
specialize le_succ (S j)
specialize le_succ n
apply le_succ
exact hj
have hnsn : exists h. h + S n = S n
specialize le_refl (S n)
exact le_refl
have hjneq : j = n
specialize hswap_injective j
specialize hswap_injective n
specialize hswap_injective n
apply hswap_injective
exact hjsn
exact hnsn
exact htop
exact hswap_witness_witness_right_left
specialize lt_irrefl_expanded n
apply lt_irrefl_expanded
rewrite hjneq at hj
exact hj
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))
specialize finite_bounded_prefix_without_top x2
specialize finite_bounded_prefix_without_top x3
specialize finite_bounded_prefix_without_top n
specialize finite_bounded_prefix_without_top (S n)
apply finite_bounded_prefix_without_top
refl
exact hswap_bounded
exact hnotop
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
specialize finite_injective_prefix_succ x2
specialize finite_injective_prefix_succ x3
specialize finite_injective_prefix_succ n
specialize finite_injective_prefix_succ (S n)
apply finite_injective_prefix_succ
refl
exact hswap_injective
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))))
specialize IH x2
specialize IH x3
apply IH
exact hprefix_bounded
exact hprefix_injective
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))))
specialize finite_surjective_succ_from_prefix x2
specialize finite_surjective_succ_from_prefix x3
specialize finite_surjective_succ_from_prefix n
specialize finite_surjective_succ_from_prefix (S n)
apply finite_surjective_succ_from_prefix
refl
exact hswap_bounded
exact hswap_injective
exact hprefix_surjective
specialize finite_swap_last_surjective_back b
specialize finite_swap_last_surjective_back c
specialize finite_swap_last_surjective_back x2
specialize finite_swap_last_surjective_back x3
specialize finite_swap_last_surjective_back n
specialize finite_swap_last_surjective_back (S n)
specialize finite_swap_last_surjective_back x
specialize finite_swap_last_surjective_back n
specialize finite_swap_last_surjective_back x1
apply finite_swap_last_surjective_back
refl
exact hcontains_left_witness_left
exact hcontains_left_witness_right
exact hlast_witness_left
exact hswap_witness_witness_left
exact hswap_witness_witness_right_left
exact hswap_witness_witness_right_right
exact hswap_surjective
specialize finite_no_top_successor_gate b
specialize finite_no_top_successor_gate c
specialize finite_no_top_successor_gate n
specialize finite_no_top_successor_gate (S n)
apply finite_no_top_successor_gate
refl
exact hbounded
exact hinjective
exact hcontains_right
intro hprefix_bounded
intro hprefix_injective
specialize IH b
specialize IH c
apply IH
exact hprefix_bounded
exact hprefix_injective
qed
- Occurrences
- 42,463
- Distinct objects
- 6,399
- Reused references
- 274
- Depth
- 89
- Cuts
- 1,266
- Certificate SHA-256
3e4a5f2303e7…
beta_prefix_replace_reflectBeta prefix replace reflect
Quadratic reciprocity campaign
checked
A decoded entry of a one-position replacement is either the replacement or the original entry.
Exact expanded PA statement
forall b c z d k i y. (exists h. h + S i = k) -> (((exists ff_h_replace_reflect_new_i. ff_h_replace_reflect_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_replace_reflect_new_i. z = ff_q_replace_reflect_new_i * S ((S (i)) * d) + (y))) -> (forall j a. (exists h. h + S j = k) -> ~(j = i) -> (((exists ff_h_replace_reflect_old_j. ff_h_replace_reflect_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_replace_reflect_old_j. b = ff_q_replace_reflect_old_j * S ((S (j)) * c) + (a))) -> (((exists ff_h_replace_reflect_new_j. ff_h_replace_reflect_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_replace_reflect_new_j. z = ff_q_replace_reflect_new_j * S ((S (j)) * d) + (a)))) -> forall j a. (exists h. h + S j = k) -> (((exists ff_h_replace_reflect_new_j. ff_h_replace_reflect_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_replace_reflect_new_j. z = ff_q_replace_reflect_new_j * S ((S (j)) * d) + (a))) -> ((j = i /\ a = y) \/ (~(j = i) /\ (((exists ff_h_replace_reflect_old_j. ff_h_replace_reflect_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_replace_reflect_old_j. b = ff_q_replace_reflect_old_j * S ((S (j)) * c) + (a)))))
Complete replay recipe: dependency imports + authored proof
pa prove forall b c z d k i y. (exists h. h + S i = k) -> (((exists ff_h_replace_reflect_new_i. ff_h_replace_reflect_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_replace_reflect_new_i. z = ff_q_replace_reflect_new_i * S ((S (i)) * d) + (y))) -> (forall j a. (exists h. h + S j = k) -> ~(j = i) -> (((exists ff_h_replace_reflect_old_j. ff_h_replace_reflect_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_replace_reflect_old_j. b = ff_q_replace_reflect_old_j * S ((S (j)) * c) + (a))) -> (((exists ff_h_replace_reflect_new_j. ff_h_replace_reflect_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_replace_reflect_new_j. z = ff_q_replace_reflect_new_j * S ((S (j)) * d) + (a)))) -> forall j a. (exists h. h + S j = k) -> (((exists ff_h_replace_reflect_new_j. ff_h_replace_reflect_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_replace_reflect_new_j. z = ff_q_replace_reflect_new_j * S ((S (j)) * d) + (a))) -> ((j = i /\ a = y) \/ (~(j = i) /\ (((exists ff_h_replace_reflect_old_j. ff_h_replace_reflect_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_replace_reflect_old_j. b = ff_q_replace_reflect_old_j * S ((S (j)) * c) + (a)))))
use eq_decidable
use beta_at_exists
use beta_at_unique
intro b
intro c
intro z
intro d
intro k
intro i
intro y
intro hi
intro hnew_i
intro hpreserve
intro j
intro a
intro hj
intro hnew
specialize eq_decidable j
specialize eq_decidable i
cases eq_decidable
left
split
exact eq_decidable_left
specialize beta_at_unique z
specialize beta_at_unique d
specialize beta_at_unique i
specialize beta_at_unique a
specialize beta_at_unique y
apply beta_at_unique
rewrite eq_decidable_left at hnew
rewrite eq_decidable_left at hnew
exact hnew
exact hnew_i
specialize beta_at_exists b
specialize beta_at_exists c
specialize beta_at_exists j
cases beta_at_exists
have htransport : ((exists h. h + S x = S ((S j) * d)) /\ exists q. z = q * S ((S j) * d) + x)
specialize hpreserve j
specialize hpreserve x
apply hpreserve
exact hj
exact eq_decidable_right
exact beta_at_exists_witness
have hax : a = x
specialize beta_at_unique z
specialize beta_at_unique d
specialize beta_at_unique j
specialize beta_at_unique a
specialize beta_at_unique x
apply beta_at_unique
exact hnew
exact htransport
right
split
exact eq_decidable_right
rewrite hax
rewrite hax
exact beta_at_exists_witness
qed
- Occurrences
- 1,735
- Distinct objects
- 1,011
- Reused references
- 55
- Depth
- 62
- Cuts
- 48
- Certificate SHA-256
3e50d9582fa7…
beta_product_replace_balanceBeta product replace balance
Quadratic reciprocity campaign
checked
Replacing one factor balances the old and new finite products by the exchanged values.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use add_eq_zero_right
use succ_ne_zero
use finite_lt_succ_eq_or_lt
use beta_product_succ_decompose
use beta_product_transport_prefix
use beta_product_functional
use beta_at_unique
use mul_assoc
use mul_comm
use le_succ
use le_refl
use lt_irrefl_expanded
induction k
intro b
intro c
intro z
intro d
intro i
intro x
intro y
intro p
intro q
intro hi
exfalso
cases hi
have hsi : S i = 0
specialize add_eq_zero_right x1
specialize add_eq_zero_right (S i)
apply add_eq_zero_right
exact hi_witness
specialize succ_ne_zero i
apply succ_ne_zero
exact hsi
intro b
intro c
intro z
intro d
intro i
intro x
intro y
intro p
intro q
intro hi
intro hold_i
intro hnew_i
intro hpreserve
intro hproduct_old
intro hproduct_new
have hisplit : i = k \/ exists h. h + S i = k
specialize finite_lt_succ_eq_or_lt k
specialize finite_lt_succ_eq_or_lt i
apply finite_lt_succ_eq_or_lt
exact hi
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)
specialize beta_product_succ_decompose b
specialize beta_product_succ_decompose c
specialize beta_product_succ_decompose k
specialize beta_product_succ_decompose p
apply beta_product_succ_decompose
exact hproduct_old
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)
specialize beta_product_succ_decompose z
specialize beta_product_succ_decompose d
specialize beta_product_succ_decompose k
specialize beta_product_succ_decompose q
apply beta_product_succ_decompose
exact hproduct_new
cases hold_decomp
cases hold_decomp_witness
cases hold_decomp_witness_witness
cases hold_decomp_witness_witness_right
cases hnew_decomp
cases hnew_decomp_witness
cases hnew_decomp_witness_witness
cases hnew_decomp_witness_witness_right
cases hisplit
have hax : x1 = x
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique k
specialize beta_at_unique x1
specialize beta_at_unique x
apply beta_at_unique
exact hold_decomp_witness_witness_left
rewrite hisplit_left at hold_i
rewrite hisplit_left at hold_i
exact hold_i
have hby : x3 = y
specialize beta_at_unique z
specialize beta_at_unique d
specialize beta_at_unique k
specialize beta_at_unique x3
specialize beta_at_unique y
apply beta_at_unique
exact hnew_decomp_witness_witness_left
rewrite hisplit_left at hnew_i
rewrite hisplit_left at hnew_i
exact hnew_i
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)))))
specialize beta_product_transport_prefix b
specialize beta_product_transport_prefix c
specialize beta_product_transport_prefix z
specialize beta_product_transport_prefix d
specialize beta_product_transport_prefix k
specialize beta_product_transport_prefix x2
apply beta_product_transport_prefix
exact hold_decomp_witness_witness_right_left
intro j
intro a
intro hj
intro hold
specialize hpreserve j
specialize hpreserve a
apply hpreserve
specialize le_succ (S j)
specialize le_succ k
apply le_succ
exact hj
intro hjk
specialize lt_irrefl_expanded k
apply lt_irrefl_expanded
rewrite hjk at hj
rewrite hisplit_left at hj
exact hj
exact hold
cases hprefix_transport
cases hprefix_transport_witness
cases hnew_decomp_witness_witness_right_left
cases hnew_decomp_witness_witness_right_left_witness
rewrite hold_decomp_witness_witness_right_right
rewrite hnew_decomp_witness_witness_right_right
rewrite hax
rewrite hby
trans (x4 * x) * y
simp [mul_assoc, mul_comm]
congr
congr
symm
specialize beta_product_functional z
specialize beta_product_functional d
specialize beta_product_functional k
specialize beta_product_functional x2
specialize beta_product_functional x5
specialize beta_product_functional x6
specialize beta_product_functional x4
specialize beta_product_functional x7
specialize beta_product_functional x8
apply beta_product_functional
exact hprefix_transport_witness_witness
exact hnew_decomp_witness_witness_right_left_witness_witness
refl
refl
have hki : ~(k = i)
intro hki_eq
specialize lt_irrefl_expanded k
apply lt_irrefl_expanded
rewrite <- hki_eq at hisplit_right
exact hisplit_right
have hlast_new : ((exists h. h + S x1 = S ((S k) * d)) /\ exists w. z = w * S ((S k) * d) + x1)
specialize hpreserve k
specialize hpreserve x1
apply hpreserve
specialize le_refl (S k)
exact le_refl
exact hki
exact hold_decomp_witness_witness_left
have hlast_eq : x3 = x1
specialize beta_at_unique z
specialize beta_at_unique d
specialize beta_at_unique k
specialize beta_at_unique x3
specialize beta_at_unique x1
apply beta_at_unique
exact hnew_decomp_witness_witness_left
exact hlast_new
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)
intro j
intro a
intro hj
intro hji
intro hold
specialize hpreserve j
specialize hpreserve a
apply hpreserve
specialize le_succ (S j)
specialize le_succ k
apply le_succ
exact hj
exact hji
exact hold
have hbalance : x4 * x = x2 * y
specialize IH b
specialize IH c
specialize IH z
specialize IH d
specialize IH i
specialize IH x
specialize IH y
specialize IH x2
specialize IH x4
apply IH
exact hisplit_right
exact hold_i
exact hnew_i
exact hprefix_preserve
exact hold_decomp_witness_witness_right_left
exact hnew_decomp_witness_witness_right_left
rewrite hold_decomp_witness_witness_right_right
rewrite hnew_decomp_witness_witness_right_right
rewrite hlast_eq
trans (x4 * x) * x1
simp [mul_assoc, mul_comm]
rewrite hbalance
simp [mul_assoc, mul_comm]
qed
- Occurrences
- 4,780
- Distinct objects
- 1,552
- Reused references
- 56
- Depth
- 66
- Cuts
- 130
- Certificate SHA-256
e4f1bc0e72bf…
beta_product_swap_last_invariantBeta product swap last invariant
Quadratic reciprocity campaign
checked
Swapping an interior beta-coded factor with the last factor preserves the exact finite product.
Exact expanded PA statement
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
Complete replay recipe: dependency imports + authored proof
pa prove 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
use beta_product_replace_balance
use beta_product_succ_decompose
use beta_at_unique
use le_succ
use le_refl
use lt_irrefl_expanded
intro b
intro c
intro z
intro d
intro n
intro i
intro x
intro y
intro p
intro q
intro hi
intro hold_i
intro hold_n
intro hnew_i
intro hnew_n
intro hpreserve
intro hproduct_old
intro hproduct_new
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)
specialize beta_product_succ_decompose b
specialize beta_product_succ_decompose c
specialize beta_product_succ_decompose n
specialize beta_product_succ_decompose p
apply beta_product_succ_decompose
exact hproduct_old
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)
specialize beta_product_succ_decompose z
specialize beta_product_succ_decompose d
specialize beta_product_succ_decompose n
specialize beta_product_succ_decompose q
apply beta_product_succ_decompose
exact hproduct_new
cases hold_decomp
cases hold_decomp_witness
cases hold_decomp_witness_witness
cases hold_decomp_witness_witness_right
cases hnew_decomp
cases hnew_decomp_witness
cases hnew_decomp_witness_witness
cases hnew_decomp_witness_witness_right
have hold_last : x1 = y
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique n
specialize beta_at_unique x1
specialize beta_at_unique y
apply beta_at_unique
exact hold_decomp_witness_witness_left
exact hold_n
have hnew_last : x3 = x
specialize beta_at_unique z
specialize beta_at_unique d
specialize beta_at_unique n
specialize beta_at_unique x3
specialize beta_at_unique x
apply beta_at_unique
exact hnew_decomp_witness_witness_left
exact hnew_n
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)
intro j
intro a
intro hj
intro hji
intro hold
specialize hpreserve j
specialize hpreserve a
apply hpreserve
specialize le_succ (S j)
specialize le_succ n
apply le_succ
exact hj
exact hji
intro hjn
specialize lt_irrefl_expanded n
apply lt_irrefl_expanded
rewrite hjn at hj
exact hj
exact hold
have hbalance : x4 * x = x2 * y
specialize beta_product_replace_balance n
specialize beta_product_replace_balance b
specialize beta_product_replace_balance c
specialize beta_product_replace_balance z
specialize beta_product_replace_balance d
specialize beta_product_replace_balance i
specialize beta_product_replace_balance x
specialize beta_product_replace_balance y
specialize beta_product_replace_balance x2
specialize beta_product_replace_balance x4
apply beta_product_replace_balance
exact hi
exact hold_i
exact hnew_i
exact hprefix_preserve
exact hold_decomp_witness_witness_right_left
exact hnew_decomp_witness_witness_right_left
rewrite hold_decomp_witness_witness_right_right
rewrite hnew_decomp_witness_witness_right_right
rewrite hold_last
rewrite hnew_last
symm
exact hbalance
qed
- Occurrences
- 7,439
- Distinct objects
- 1,685
- Reused references
- 61
- Depth
- 67
- Cuts
- 205
- Certificate SHA-256
ee7ff4aa1c45…
finite_fixed_last_prefix_boundedFinite fixed last prefix bounded
Quadratic reciprocity campaign
checked
A bounded injective successor reindexing fixed at its last position is bounded on the old prefix.
Exact expanded PA statement
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)))
Complete replay recipe: dependency imports + authored proof
pa prove 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)))
use finite_bounded_prefix_without_top
use le_succ
use le_refl
use lt_irrefl_expanded
intro r
intro s
intro n
intro hbounded
intro hinjective
intro hlast
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)
intro i
intro hi
intro htop
have hisn : exists h. h + S i = S n
specialize le_succ (S i)
specialize le_succ n
apply le_succ
exact hi
have hnsn : exists h. h + S n = S n
specialize le_refl (S n)
exact le_refl
have hin : i = n
specialize hinjective i
specialize hinjective n
specialize hinjective n
apply hinjective
exact hisn
exact hnsn
exact htop
exact hlast
specialize lt_irrefl_expanded n
apply lt_irrefl_expanded
rewrite hin at hi
exact hi
specialize finite_bounded_prefix_without_top r
specialize finite_bounded_prefix_without_top s
specialize finite_bounded_prefix_without_top n
specialize finite_bounded_prefix_without_top (S n)
apply finite_bounded_prefix_without_top
refl
exact hbounded
exact hnotop
qed
- Occurrences
- 409
- Distinct objects
- 294
- Reused references
- 8
- Depth
- 24
- Cuts
- 16
- Certificate SHA-256
f17e5ed17a10…
beta_reindex_alignment_swap_lastBeta reindex alignment swap last
Quadratic reciprocity campaign
checked
Simultaneous interior/final swaps of an index code and target factors preserve alignment.
Exact expanded PA statement
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))))
Complete replay recipe: dependency imports + authored proof
pa prove 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))))
use beta_prefix_swap_last_reflect
use beta_at_unique
intro r
intro s
intro u
intro v
intro b
intro c
intro z
intro d
intro w
intro e
intro n
intro i
intro m
intro x
intro y
intro hmap_i
intro hmap_n
intro hmap_preserve
intro hsource_m
intro hsource_n
intro htarget_i
intro htarget_n
intro htarget_preserve
intro haligned
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))))
specialize beta_prefix_swap_last_reflect r
specialize beta_prefix_swap_last_reflect s
specialize beta_prefix_swap_last_reflect u
specialize beta_prefix_swap_last_reflect v
specialize beta_prefix_swap_last_reflect n
specialize beta_prefix_swap_last_reflect i
specialize beta_prefix_swap_last_reflect n
specialize beta_prefix_swap_last_reflect m
apply beta_prefix_swap_last_reflect
exact hmap_i
exact hmap_n
exact hmap_preserve
intro k
intro j
intro a
intro hk
intro hmap
intro hsource
specialize hreflect k
specialize hreflect j
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))))
apply hreflect
exact hk
exact hmap
cases hcases
cases hcases_left
have hay : a = y
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique m
specialize beta_at_unique a
specialize beta_at_unique y
apply beta_at_unique
rewrite hcases_left_right at hsource
rewrite hcases_left_right at hsource
exact hsource
exact hsource_m
rewrite hcases_left_left
rewrite hcases_left_left
rewrite hay
rewrite hay
exact htarget_i
cases hcases_right
cases hcases_right_left
have hax : a = x
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique n
specialize beta_at_unique a
specialize beta_at_unique x
apply beta_at_unique
rewrite hcases_right_left_right at hsource
rewrite hcases_right_left_right at hsource
exact hsource
exact hsource_n
rewrite hcases_right_left_left
rewrite hcases_right_left_left
rewrite hax
rewrite hax
exact htarget_n
cases hcases_right_right
cases hcases_right_right_right
have hold_target : ((exists h. h + S a = S ((S k) * d)) /\ exists q. z = q * S ((S k) * d) + a)
specialize haligned k
specialize haligned j
specialize haligned a
apply haligned
exact hk
exact hcases_right_right_right_right
exact hsource
specialize htarget_preserve k
specialize htarget_preserve a
apply htarget_preserve
exact hk
exact hcases_right_right_left
exact hcases_right_right_right_left
exact hold_target
qed
- Occurrences
- 3,057
- Distinct objects
- 1,212
- Reused references
- 56
- Depth
- 63
- Cuts
- 80
- Certificate SHA-256
04543723c864…
prime_is_succ_succPrime is succ succ
Quadratic reciprocity campaign
checked
Every prime natural is the second successor of a natural.
Exact expanded PA statement
forall p. ((~(p = 1) /\ forall qrbu_factor_left_prime_p qrbu_factor_right_prime_p. p = qrbu_factor_left_prime_p * qrbu_factor_right_prime_p -> qrbu_factor_left_prime_p = 1 \/ qrbu_factor_right_prime_p = 1)) -> exists k. p = S (S k)
Complete replay recipe: dependency imports + authored proof
pa prove forall p. ((~(p = 1) /\ forall qrbu_factor_left_prime_p qrbu_factor_right_prime_p. p = qrbu_factor_left_prime_p * qrbu_factor_right_prime_p -> qrbu_factor_left_prime_p = 1 \/ qrbu_factor_right_prime_p = 1)) -> exists k. p = S (S k)
use prime_nonzero
use nonzero_is_succ
intro p
intro hp
have hp0 : ~(p = 0)
intro hpzero
specialize prime_nonzero p
apply prime_nonzero
exact hp
exact hpzero
have hps : exists k. p = S k
specialize nonzero_is_succ p
apply nonzero_is_succ
exact hp0
cases hps
have hx0 : ~(x = 0)
intro hx0
cases hp
apply hp_left
rewrite hps_witness
rewrite hx0
refl
have hxs : exists k. x = S k
specialize nonzero_is_succ x
apply nonzero_is_succ
exact hx0
cases hxs
exists x1
rewrite hps_witness
rewrite hxs_witness
refl
qed
- Occurrences
- 98
- Distinct objects
- 98
- Reused references
- 0
- Depth
- 13
- Cuts
- 4
- Certificate SHA-256
e0cd8df0205c…
prime_bounded_nonzero_mod_inversePrime bounded nonzero mod inverse
Quadratic reciprocity campaign
checked
A nonzero residue below a prime has a nonzero bounded inverse.
Exact expanded PA statement
forall p a. ((~(p = 1) /\ forall qrbu_factor_left_prime_p qrbu_factor_right_prime_p. p = qrbu_factor_left_prime_p * qrbu_factor_right_prime_p -> qrbu_factor_left_prime_p = 1 \/ qrbu_factor_right_prime_p = 1)) -> ~(a = 0) -> (exists qrbu_gap_a_lt_p. qrbu_gap_a_lt_p + S a = p) -> (exists qrbu_inverse_bounded_inverse. (~(qrbu_inverse_bounded_inverse = 0) /\ ((exists qrbu_gap_bounded_inverse_bound. qrbu_gap_bounded_inverse_bound + S qrbu_inverse_bounded_inverse = p) /\ (exists qrbu_mod_left_bounded_inverse_mod qrbu_mod_right_bounded_inverse_mod. a * qrbu_inverse_bounded_inverse + p * qrbu_mod_left_bounded_inverse_mod = 1 + p * qrbu_mod_right_bounded_inverse_mod))))
Complete replay recipe: dependency imports + authored proof
pa prove forall p a. ((~(p = 1) /\ forall qrbu_factor_left_prime_p qrbu_factor_right_prime_p. p = qrbu_factor_left_prime_p * qrbu_factor_right_prime_p -> qrbu_factor_left_prime_p = 1 \/ qrbu_factor_right_prime_p = 1)) -> ~(a = 0) -> (exists qrbu_gap_a_lt_p. qrbu_gap_a_lt_p + S a = p) -> (exists qrbu_inverse_bounded_inverse. (~(qrbu_inverse_bounded_inverse = 0) /\ ((exists qrbu_gap_bounded_inverse_bound. qrbu_gap_bounded_inverse_bound + S qrbu_inverse_bounded_inverse = p) /\ (exists qrbu_mod_left_bounded_inverse_mod qrbu_mod_right_bounded_inverse_mod. a * qrbu_inverse_bounded_inverse + p * qrbu_mod_left_bounded_inverse_mod = 1 + p * qrbu_mod_right_bounded_inverse_mod))))
use prime_is_succ_succ
use prime_nonzero
use divisor_le_nonzero
use lt_not_le
use prime_mod_inverse
use division_remainder_exists
use mul_comm
use remainder_decomposition_to_mod_eq
use mod_eq_mul_left
use mod_eq_symm
use mod_eq_trans
use mod_eq_bounded_unique
use succ_ne_zero
intro p
intro a
intro hp
intro ha0
intro hap
have hp0 : ~(p = 0)
intro hpzero
specialize prime_nonzero p
apply prime_nonzero
exact hp
exact hpzero
have hnotdiv : ~(exists k. a = p * k)
intro hdiv
have hpa : exists t. t + p = a
specialize divisor_le_nonzero p
specialize divisor_le_nonzero a
apply divisor_le_nonzero
exact ha0
exact hdiv
specialize lt_not_le a
specialize lt_not_le p
apply lt_not_le
exact hap
exact hpa
have hinv : exists z u v. a * z + p * u = 1 + p * v
specialize prime_mod_inverse p
specialize prime_mod_inverse a
apply prime_mod_inverse
exact hp
exact hnotdiv
cases hinv
cases hinv_witness
cases hinv_witness_witness
have hdivz : exists q r. x = p * q + r /\ exists h. h + S r = p
specialize division_remainder_exists p
specialize division_remainder_exists x
apply division_remainder_exists
exact hp0
cases hdivz
cases hdivz_witness
cases hdivz_witness_witness
have hzdecomp : x = x3 * p + x4
trans p * x3 + x4
exact hdivz_witness_witness_left
congr
apply mul_comm
refl
have hzr : exists u v. x + p * u = x4 + p * v
specialize remainder_decomposition_to_mod_eq p
specialize remainder_decomposition_to_mod_eq x
specialize remainder_decomposition_to_mod_eq x3
specialize remainder_decomposition_to_mod_eq x4
apply remainder_decomposition_to_mod_eq
exact hzdecomp
have hscaled : exists u v. (a * x) + p * u = (a * x4) + p * v
specialize mod_eq_mul_left p
specialize mod_eq_mul_left x
specialize mod_eq_mul_left x4
specialize mod_eq_mul_left a
apply mod_eq_mul_left
exact hzr
have hrz : exists u v. (a * x4) + p * u = (a * x) + p * v
specialize mod_eq_symm p
specialize mod_eq_symm (a * x)
specialize mod_eq_symm (a * x4)
apply mod_eq_symm
exact hscaled
have hfinal : exists u v. (a * x4) + p * u = 1 + p * v
specialize mod_eq_trans p
specialize mod_eq_trans (a * x4)
specialize mod_eq_trans (a * x)
specialize mod_eq_trans 1
apply mod_eq_trans
exact hrz
exists x1
exists x2
exact hinv_witness_witness_witness
have hp2 : exists k. p = S (S k)
specialize prime_is_succ_succ p
apply prime_is_succ_succ
exact hp
cases hp2
have h0bound : exists h. h + S 0 = p
exists S x5
rewrite hp2_witness
simp
have h1bound : exists h. h + S 1 = p
exists x5
rewrite hp2_witness
simp
have hr0 : ~(x4 = 0)
intro hrzero
have hzeroone : exists u v. 0 + p * u = 1 + p * v
cases hfinal
cases hfinal_witness
exists x6
exists x7
trans (a * x4) + p * x6
congr
symm
trans a * 0
congr
refl
exact hrzero
apply PA5
refl
exact hfinal_witness_witness
have hzeroeqone : 0 = 1
specialize mod_eq_bounded_unique p
specialize mod_eq_bounded_unique 0
specialize mod_eq_bounded_unique 1
apply mod_eq_bounded_unique
exact h0bound
exact h1bound
exact hzeroone
specialize succ_ne_zero 0
apply succ_ne_zero
symm
exact hzeroeqone
exists x4
split
exact hr0
split
exact hdivz_witness_witness_right
exact hfinal
qed
- Occurrences
- 8,684
- Distinct objects
- 2,801
- Reused references
- 151
- Depth
- 71
- Cuts
- 260
- Certificate SHA-256
a954ec4e9c70…
canonical_remainder_existsCanonical remainder existence
Division
checked
Every dividend has a canonical remainder for each nonzero modulus.
Exact expanded PA statement
forall m n. ~(m = 0) -> exists r. (((exists hcr_quotient_result. n = m * hcr_quotient_result + r) /\ exists hcr_gap_result. hcr_gap_result + S r = m))
Complete replay recipe: dependency imports + authored proof
pa prove forall m n. ~(m = 0) -> exists r. (((exists hcr_quotient_result. n = m * hcr_quotient_result + r) /\ exists hcr_gap_result. hcr_gap_result + S r = m))
use division_remainder_exists
intro m
intro n
intro hm
have hdivision : exists q r. n = m * q + r /\ exists gap. gap + S r = m
specialize division_remainder_exists m
specialize division_remainder_exists n
apply division_remainder_exists
exact hm
cases hdivision
cases hdivision_witness
cases hdivision_witness_witness
exists x1
split
exists x
exact hdivision_witness_witness_left
exact hdivision_witness_witness_right
qed
- Occurrences
- 238
- Distinct objects
- 215
- Reused references
- 16
- Depth
- 29
- Cuts
- 6
- Certificate SHA-256
02da660e4be1…
canonical_remainder_functionalCanonical remainder functionality
Division
checked
Canonical remainders for a fixed modulus are functional whenever they exist.
Exact expanded PA statement
forall m n r s. (((exists hcr_quotient_result. n = m * hcr_quotient_result + r) /\ exists hcr_gap_result. hcr_gap_result + S r = m)) -> (((exists hcr_quotient_comparison. n = m * hcr_quotient_comparison + s) /\ exists hcr_gap_comparison. hcr_gap_comparison + S s = m)) -> r = s
Complete replay recipe: dependency imports + authored proof
pa prove forall m n r s. (((exists hcr_quotient_result. n = m * hcr_quotient_result + r) /\ exists hcr_gap_result. hcr_gap_result + S r = m)) -> (((exists hcr_quotient_comparison. n = m * hcr_quotient_comparison + s) /\ exists hcr_gap_comparison. hcr_gap_comparison + S s = m)) -> r = s
use division_remainder_unique
intro m
intro n
intro r
intro s
intro hr
intro hs
cases hr
cases hs
cases hr_left
cases hs_left
have hunique : x = x1 /\ r = s
specialize division_remainder_unique m
specialize division_remainder_unique n
specialize division_remainder_unique x
specialize division_remainder_unique r
specialize division_remainder_unique x1
specialize division_remainder_unique s
apply division_remainder_unique
exact hr_left_witness
exact hr_right
exact hs_left_witness
exact hs_right
cases hunique
exact hunique_right
qed
- Occurrences
- 885
- Distinct objects
- 575
- Reused references
- 22
- Depth
- 58
- Cuts
- 23
- Certificate SHA-256
075a5bc6bceb…
canonical_remainder_zero_impossibleCanonical remainder excludes modulus zero
Division
checked
The canonical-remainder relation has no inhabitant at modulus zero.
Exact expanded PA statement
forall m n r. m = 0 -> ~(((exists hcr_quotient_zero_impossible. n = m * hcr_quotient_zero_impossible + r) /\ exists hcr_gap_zero_impossible. hcr_gap_zero_impossible + S r = m))
Complete replay recipe: dependency imports + authored proof
pa prove forall m n r. m = 0 -> ~(((exists hcr_quotient_zero_impossible. n = m * hcr_quotient_zero_impossible + r) /\ exists hcr_gap_zero_impossible. hcr_gap_zero_impossible + S r = m))
use succ_ne_zero
intro m
intro n
intro r
intro hm
intro hrem
cases hrem
rewrite hm at hrem_right
cases hrem_right
have hsucc : S (x + r) = 0
trans x + S r
symm
apply PA4
exact hrem_right_witness
specialize succ_ne_zero (x + r)
apply succ_ne_zero
exact hsucc
qed
- Occurrences
- 21
- Distinct objects
- 21
- Reused references
- 0
- Depth
- 13
- Cuts
- 1
- Certificate SHA-256
ba801ceeb223…
canonical_remainder_exists_uniqueUnique canonical remainder
Division
checked
For every nonzero modulus, the canonical remainder exists uniquely; the comparison remainder is proved equal to the chosen remainder.
Exact expanded PA statement
forall m n. ~(m = 0) -> exists r. ((((exists hcr_quotient_unique_result. n = m * hcr_quotient_unique_result + r) /\ exists hcr_gap_unique_result. hcr_gap_unique_result + S r = m)) /\ forall s. (((exists hcr_quotient_unique_comparison. n = m * hcr_quotient_unique_comparison + s) /\ exists hcr_gap_unique_comparison. hcr_gap_unique_comparison + S s = m)) -> s = r)
Complete replay recipe: dependency imports + authored proof
pa prove forall m n. ~(m = 0) -> exists r. ((((exists hcr_quotient_unique_result. n = m * hcr_quotient_unique_result + r) /\ exists hcr_gap_unique_result. hcr_gap_unique_result + S r = m)) /\ forall s. (((exists hcr_quotient_unique_comparison. n = m * hcr_quotient_unique_comparison + s) /\ exists hcr_gap_unique_comparison. hcr_gap_unique_comparison + S s = m)) -> s = r)
use canonical_remainder_exists
use canonical_remainder_functional
intro m
intro n
intro hm
have hexists : exists r. (((exists hcr_quotient_unique_result. n = m * hcr_quotient_unique_result + r) /\ exists hcr_gap_unique_result. hcr_gap_unique_result + S r = m))
specialize canonical_remainder_exists m
specialize canonical_remainder_exists n
apply canonical_remainder_exists
exact hm
cases hexists
exists x
split
exact hexists_witness
intro s
intro hs
specialize canonical_remainder_functional m
specialize canonical_remainder_functional n
specialize canonical_remainder_functional s
specialize canonical_remainder_functional x
apply canonical_remainder_functional
exact hs
exact hexists_witness
qed
- Occurrences
- 1,148
- Distinct objects
- 765
- Reused references
- 39
- Depth
- 60
- Cuts
- 31
- Certificate SHA-256
40bd3cda0f0b…
canonical_remainders_characterize_mod_eqCanonical remainders characterize congruence
Congruence & CRT
checked
Two canonical remainders are equal exactly when their dividends are congruent modulo the shared modulus.
Exact expanded PA statement
forall m a b r s. (((exists hcr_quotient_left. a = m * hcr_quotient_left + r) /\ exists hcr_gap_left. hcr_gap_left + S r = m)) -> (((exists hcr_quotient_right. b = m * hcr_quotient_right + s) /\ exists hcr_gap_right. hcr_gap_right + S s = m)) -> (((exists hcc_mod_left_source hcc_mod_right_source. a + m * hcc_mod_left_source = b + m * hcc_mod_right_source) -> r = s) /\ (r = s -> (exists hcc_mod_left_result hcc_mod_right_result. a + m * hcc_mod_left_result = b + m * hcc_mod_right_result)))
Complete replay recipe: dependency imports + authored proof
pa prove forall m a b r s. (((exists hcr_quotient_left. a = m * hcr_quotient_left + r) /\ exists hcr_gap_left. hcr_gap_left + S r = m)) -> (((exists hcr_quotient_right. b = m * hcr_quotient_right + s) /\ exists hcr_gap_right. hcr_gap_right + S s = m)) -> (((exists hcc_mod_left_source hcc_mod_right_source. a + m * hcc_mod_left_source = b + m * hcc_mod_right_source) -> r = s) /\ (r = s -> (exists hcc_mod_left_result hcc_mod_right_result. a + m * hcc_mod_left_result = b + m * hcc_mod_right_result)))
use mul_comm
use remainder_decomposition_to_mod_eq
use mod_eq_symm
use mod_eq_trans
use mod_eq_bounded_unique
intro m
intro a
intro b
intro r
intro s
intro hr
intro hs
cases hr
cases hs
cases hr_left
cases hs_left
have hadecomp : a = x * m + r
trans m * x + r
exact hr_left_witness
congr
apply mul_comm
refl
have hbdecomp : b = x1 * m + s
trans m * x1 + s
exact hs_left_witness
congr
apply mul_comm
refl
have har : exists hcc_mod_left_a_r hcc_mod_right_a_r. a + m * hcc_mod_left_a_r = r + m * hcc_mod_right_a_r
specialize remainder_decomposition_to_mod_eq m
specialize remainder_decomposition_to_mod_eq a
specialize remainder_decomposition_to_mod_eq x
specialize remainder_decomposition_to_mod_eq r
apply remainder_decomposition_to_mod_eq
exact hadecomp
have hbs : exists hcc_mod_left_b_s hcc_mod_right_b_s. b + m * hcc_mod_left_b_s = s + m * hcc_mod_right_b_s
specialize remainder_decomposition_to_mod_eq m
specialize remainder_decomposition_to_mod_eq b
specialize remainder_decomposition_to_mod_eq x1
specialize remainder_decomposition_to_mod_eq s
apply remainder_decomposition_to_mod_eq
exact hbdecomp
split
intro hab
have hra : exists hcc_mod_left_r_a hcc_mod_right_r_a. r + m * hcc_mod_left_r_a = a + m * hcc_mod_right_r_a
specialize mod_eq_symm m
specialize mod_eq_symm a
specialize mod_eq_symm r
apply mod_eq_symm
exact har
have hrb : exists hcc_mod_left_r_b hcc_mod_right_r_b. r + m * hcc_mod_left_r_b = b + m * hcc_mod_right_r_b
specialize mod_eq_trans m
specialize mod_eq_trans r
specialize mod_eq_trans a
specialize mod_eq_trans b
apply mod_eq_trans
exact hra
exact hab
have hrs : exists hcc_mod_left_r_s hcc_mod_right_r_s. r + m * hcc_mod_left_r_s = s + m * hcc_mod_right_r_s
specialize mod_eq_trans m
specialize mod_eq_trans r
specialize mod_eq_trans b
specialize mod_eq_trans s
apply mod_eq_trans
exact hrb
exact hbs
specialize mod_eq_bounded_unique m
specialize mod_eq_bounded_unique r
specialize mod_eq_bounded_unique s
apply mod_eq_bounded_unique
exact hr_right
exact hs_right
exact hrs
intro hrs_equal
rewrite hrs_equal at har
have hsb : exists hcc_mod_left_s_b hcc_mod_right_s_b. s + m * hcc_mod_left_s_b = b + m * hcc_mod_right_s_b
specialize mod_eq_symm m
specialize mod_eq_symm b
specialize mod_eq_symm s
apply mod_eq_symm
exact hbs
specialize mod_eq_trans m
specialize mod_eq_trans a
specialize mod_eq_trans s
specialize mod_eq_trans b
apply mod_eq_trans
exact har
exact hsb
qed
- Occurrences
- 1,888
- Distinct objects
- 908
- Reused references
- 43
- Depth
- 64
- Cuts
- 53
- Certificate SHA-256
f15b6a2109e7…
bounded_mod_inverse_uniqueUniqueness of bounded modular inverses
GCD, Bézout & coprimality
checked
Two bounded inverses of the same residue are equal.
Exact expanded PA statement
forall p x y z. (exists wip_strict_gap_unique_y_bound. wip_strict_gap_unique_y_bound + S y = p) -> (exists wip_strict_gap_unique_z_bound. wip_strict_gap_unique_z_bound + S z = p) -> (exists wip_mod_left_unique_xy wip_mod_right_unique_xy. x * y + p * wip_mod_left_unique_xy = 1 + p * wip_mod_right_unique_xy) -> (exists wip_mod_left_unique_xz wip_mod_right_unique_xz. x * z + p * wip_mod_left_unique_xz = 1 + p * wip_mod_right_unique_xz) -> y = z
Complete replay recipe: dependency imports + authored proof
pa prove forall p x y z. (exists wip_strict_gap_unique_y_bound. wip_strict_gap_unique_y_bound + S y = p) -> (exists wip_strict_gap_unique_z_bound. wip_strict_gap_unique_z_bound + S z = p) -> (exists wip_mod_left_unique_xy wip_mod_right_unique_xy. x * y + p * wip_mod_left_unique_xy = 1 + p * wip_mod_right_unique_xy) -> (exists wip_mod_left_unique_xz wip_mod_right_unique_xz. x * z + p * wip_mod_left_unique_xz = 1 + p * wip_mod_right_unique_xz) -> y = z
use mod_eq_symm
use mod_eq_mul_left
use mod_eq_mul_right
use mul_assoc
use mul_comm
use mul_one
use one_mul
use mod_eq_trans
use mod_eq_bounded_unique
intro p
intro x
intro y
intro z
intro hy
intro hz
intro hxy
intro hxz
have hreverse : exists wip_mod_left_unique_reverse_xz wip_mod_right_unique_reverse_xz. 1 + p * wip_mod_left_unique_reverse_xz = x * z + p * wip_mod_right_unique_reverse_xz
specialize mod_eq_symm p
specialize mod_eq_symm (x * z)
specialize mod_eq_symm 1
apply mod_eq_symm
exact hxz
have hleftscaled : exists wip_mod_left_unique_left_scaled wip_mod_right_unique_left_scaled. y * 1 + p * wip_mod_left_unique_left_scaled = y * (x * z) + p * wip_mod_right_unique_left_scaled
specialize mod_eq_mul_left p
specialize mod_eq_mul_left 1
specialize mod_eq_mul_left (x * z)
specialize mod_eq_mul_left y
apply mod_eq_mul_left
exact hreverse
have hrightscaled : exists wip_mod_left_unique_right_scaled wip_mod_right_unique_right_scaled. (x * y) * z + p * wip_mod_left_unique_right_scaled = 1 * z + p * wip_mod_right_unique_right_scaled
specialize mod_eq_mul_right p
specialize mod_eq_mul_right (x * y)
specialize mod_eq_mul_right 1
specialize mod_eq_mul_right z
apply mod_eq_mul_right
exact hxy
have hleft : y * 1 = y
specialize mul_one y
exact mul_one
have hmiddle : y * (x * z) = (x * y) * z
trans (y * x) * z
symm
specialize mul_assoc y
specialize mul_assoc x
specialize mul_assoc z
apply mul_assoc
congr
apply mul_comm
refl
have hright : 1 * z = z
specialize one_mul z
exact one_mul
rewrite hleft at hleftscaled
rewrite hmiddle at hleftscaled
rewrite hright at hrightscaled
have hyz : exists wip_mod_left_unique_result wip_mod_right_unique_result. y + p * wip_mod_left_unique_result = z + p * wip_mod_right_unique_result
specialize mod_eq_trans p
specialize mod_eq_trans y
specialize mod_eq_trans ((x * y) * z)
specialize mod_eq_trans z
apply mod_eq_trans
exact hleftscaled
exact hrightscaled
specialize mod_eq_bounded_unique p
specialize mod_eq_bounded_unique y
specialize mod_eq_bounded_unique z
apply mod_eq_bounded_unique
exact hy
exact hz
exact hyz
qed
- Occurrences
- 2,914
- Distinct objects
- 1,001
- Reused references
- 61
- Depth
- 68
- Cuts
- 84
- Certificate SHA-256
fd4a80c79f23…
coprime_bounded_mod_inverseCoprime residues have bounded modular inverses
GCD, Bézout & coprimality
checked
Every coprime residue has an inverse in the canonical interval below a nonzero modulus.
Exact expanded PA statement
forall a m. ~(m = 0) -> (forall hmi_divisor_assumption. (exists hmi_left_factor_assumption. a = hmi_divisor_assumption * hmi_left_factor_assumption) -> (exists hmi_right_factor_assumption. m = hmi_divisor_assumption * hmi_right_factor_assumption) -> hmi_divisor_assumption = 1) -> exists r. (exists hmi_gap_result_bound. hmi_gap_result_bound + S r = m) /\ (exists hmi_left_offset_result_inverse hmi_right_offset_result_inverse. a * r + m * hmi_left_offset_result_inverse = 1 + m * hmi_right_offset_result_inverse)
Complete replay recipe: dependency imports + authored proof
pa prove forall a m. ~(m = 0) -> (forall hmi_divisor_assumption. (exists hmi_left_factor_assumption. a = hmi_divisor_assumption * hmi_left_factor_assumption) -> (exists hmi_right_factor_assumption. m = hmi_divisor_assumption * hmi_right_factor_assumption) -> hmi_divisor_assumption = 1) -> exists r. (exists hmi_gap_result_bound. hmi_gap_result_bound + S r = m) /\ (exists hmi_left_offset_result_inverse hmi_right_offset_result_inverse. a * r + m * hmi_left_offset_result_inverse = 1 + m * hmi_right_offset_result_inverse)
use canonical_remainder_exists
use coprime_mod_inverse
use mul_comm
use remainder_decomposition_to_mod_eq
use mod_eq_mul_left
use mod_eq_symm
use mod_eq_trans
intro a
intro m
intro hm
intro hcop
have hinv : exists z u v. a * z + m * u = 1 + m * v
specialize coprime_mod_inverse a
specialize coprime_mod_inverse m
apply coprime_mod_inverse
exact hm
exact hcop
cases hinv
cases hinv_witness
cases hinv_witness_witness
have hrem : exists r. (((exists hcr_quotient_inverse_witness. x = m * hcr_quotient_inverse_witness + r) /\ exists hcr_gap_inverse_witness. hcr_gap_inverse_witness + S r = m))
specialize canonical_remainder_exists m
specialize canonical_remainder_exists x
apply canonical_remainder_exists
exact hm
cases hrem
cases hrem_witness
cases hrem_witness_left
have hzdecomp : x = x4 * m + x3
trans m * x4 + x3
exact hrem_witness_left_witness
congr
apply mul_comm
refl
have hzr : exists u v. x + m * u = x3 + m * v
specialize remainder_decomposition_to_mod_eq m
specialize remainder_decomposition_to_mod_eq x
specialize remainder_decomposition_to_mod_eq x4
specialize remainder_decomposition_to_mod_eq x3
apply remainder_decomposition_to_mod_eq
exact hzdecomp
have hscaled : exists u v. (a * x) + m * u = (a * x3) + m * v
specialize mod_eq_mul_left m
specialize mod_eq_mul_left x
specialize mod_eq_mul_left x3
specialize mod_eq_mul_left a
apply mod_eq_mul_left
exact hzr
have hreverse : exists u v. (a * x3) + m * u = (a * x) + m * v
specialize mod_eq_symm m
specialize mod_eq_symm (a * x)
specialize mod_eq_symm (a * x3)
apply mod_eq_symm
exact hscaled
have hfinal : exists u v. (a * x3) + m * u = 1 + m * v
specialize mod_eq_trans m
specialize mod_eq_trans (a * x3)
specialize mod_eq_trans (a * x)
specialize mod_eq_trans 1
apply mod_eq_trans
exact hreverse
exists x1
exists x2
exact hinv_witness_witness_witness
exists x3
split
exact hrem_witness_right
exact hfinal
qed
- Occurrences
- 5,675
- Distinct objects
- 1,752
- Reused references
- 102
- Depth
- 53
- Cuts
- 168
- Certificate SHA-256
00e30d9df307…
mod_inverse_implies_coprimeA modular inverse implies coprimality
GCD, Bézout & coprimality
checked
Any natural modular inverse forces coprimality, without a nonzero-modulus side condition.
Exact expanded PA statement
forall a m z. (exists hmi_left_offset_converse_assumption hmi_right_offset_converse_assumption. a * z + m * hmi_left_offset_converse_assumption = 1 + m * hmi_right_offset_converse_assumption) -> (forall hmi_divisor_converse_result. (exists hmi_left_factor_converse_result. a = hmi_divisor_converse_result * hmi_left_factor_converse_result) -> (exists hmi_right_factor_converse_result. m = hmi_divisor_converse_result * hmi_right_factor_converse_result) -> hmi_divisor_converse_result = 1)
Complete replay recipe: dependency imports + authored proof
pa prove forall a m z. (exists hmi_left_offset_converse_assumption hmi_right_offset_converse_assumption. a * z + m * hmi_left_offset_converse_assumption = 1 + m * hmi_right_offset_converse_assumption) -> (forall hmi_divisor_converse_result. (exists hmi_left_factor_converse_result. a = hmi_divisor_converse_result * hmi_left_factor_converse_result) -> (exists hmi_right_factor_converse_result. m = hmi_divisor_converse_result * hmi_right_factor_converse_result) -> hmi_divisor_converse_result = 1)
use common_divisor_divides_balanced_result
use zero_add
use divisor_one
intro a
intro m
intro z
intro hinv
intro d
intro hda
intro hdm
cases hinv
cases hinv_witness
have hbez : a * z + m * x = 1 + (a * 0 + m * x1)
trans 1 + m * x1
exact hinv_witness_witness
congr
refl
symm
trans 0 + m * x1
congr
apply PA5
refl
apply zero_add
have hdivone : exists w. 1 = d * w
specialize common_divisor_divides_balanced_result d
specialize common_divisor_divides_balanced_result a
specialize common_divisor_divides_balanced_result m
specialize common_divisor_divides_balanced_result 1
specialize common_divisor_divides_balanced_result z
specialize common_divisor_divides_balanced_result x
specialize common_divisor_divides_balanced_result 0
specialize common_divisor_divides_balanced_result x1
apply common_divisor_divides_balanced_result
exact hda
exact hdm
exact hbez
specialize divisor_one d
apply divisor_one
exact hdivone
qed
- Occurrences
- 874
- Distinct objects
- 602
- Reused references
- 42
- Depth
- 40
- Cuts
- 23
- Certificate SHA-256
64b57d743e89…
coprime_iff_unique_bounded_mod_inverseCoprimality iff unique bounded modular inverse
GCD, Bézout & coprimality
checked
For a nonzero modulus, coprimality is equivalent to unique existence of a modular inverse in the canonical interval.
Exact expanded PA statement
forall a m. ~(m = 0) -> ((forall hmi_divisor_package_coprime. (exists hmi_left_factor_package_coprime. a = hmi_divisor_package_coprime * hmi_left_factor_package_coprime) -> (exists hmi_right_factor_package_coprime. m = hmi_divisor_package_coprime * hmi_right_factor_package_coprime) -> hmi_divisor_package_coprime = 1) -> (exists hmi_solution_package_result. ((((exists hmi_gap_package_result_chosen_bound. hmi_gap_package_result_chosen_bound + S hmi_solution_package_result = m) /\ (exists hmi_left_offset_package_result_chosen_inverse hmi_right_offset_package_result_chosen_inverse. a * hmi_solution_package_result + m * hmi_left_offset_package_result_chosen_inverse = 1 + m * hmi_right_offset_package_result_chosen_inverse))) /\ forall hmi_comparison_package_result. (((exists hmi_gap_package_result_compared_bound. hmi_gap_package_result_compared_bound + S hmi_comparison_package_result = m) /\ (exists hmi_left_offset_package_result_compared_inverse hmi_right_offset_package_result_compared_inverse. a * hmi_comparison_package_result + m * hmi_left_offset_package_result_compared_inverse = 1 + m * hmi_right_offset_package_result_compared_inverse))) -> hmi_comparison_package_result = hmi_solution_package_result))) /\ ((exists hmi_solution_package_result. ((((exists hmi_gap_package_result_chosen_bound. hmi_gap_package_result_chosen_bound + S hmi_solution_package_result = m) /\ (exists hmi_left_offset_package_result_chosen_inverse hmi_right_offset_package_result_chosen_inverse. a * hmi_solution_package_result + m * hmi_left_offset_package_result_chosen_inverse = 1 + m * hmi_right_offset_package_result_chosen_inverse))) /\ forall hmi_comparison_package_result. (((exists hmi_gap_package_result_compared_bound. hmi_gap_package_result_compared_bound + S hmi_comparison_package_result = m) /\ (exists hmi_left_offset_package_result_compared_inverse hmi_right_offset_package_result_compared_inverse. a * hmi_comparison_package_result + m * hmi_left_offset_package_result_compared_inverse = 1 + m * hmi_right_offset_package_result_compared_inverse))) -> hmi_comparison_package_result = hmi_solution_package_result)) -> (forall hmi_divisor_package_coprime. (exists hmi_left_factor_package_coprime. a = hmi_divisor_package_coprime * hmi_left_factor_package_coprime) -> (exists hmi_right_factor_package_coprime. m = hmi_divisor_package_coprime * hmi_right_factor_package_coprime) -> hmi_divisor_package_coprime = 1))
Complete replay recipe: dependency imports + authored proof
pa prove forall a m. ~(m = 0) -> ((forall hmi_divisor_package_coprime. (exists hmi_left_factor_package_coprime. a = hmi_divisor_package_coprime * hmi_left_factor_package_coprime) -> (exists hmi_right_factor_package_coprime. m = hmi_divisor_package_coprime * hmi_right_factor_package_coprime) -> hmi_divisor_package_coprime = 1) -> (exists hmi_solution_package_result. ((((exists hmi_gap_package_result_chosen_bound. hmi_gap_package_result_chosen_bound + S hmi_solution_package_result = m) /\ (exists hmi_left_offset_package_result_chosen_inverse hmi_right_offset_package_result_chosen_inverse. a * hmi_solution_package_result + m * hmi_left_offset_package_result_chosen_inverse = 1 + m * hmi_right_offset_package_result_chosen_inverse))) /\ forall hmi_comparison_package_result. (((exists hmi_gap_package_result_compared_bound. hmi_gap_package_result_compared_bound + S hmi_comparison_package_result = m) /\ (exists hmi_left_offset_package_result_compared_inverse hmi_right_offset_package_result_compared_inverse. a * hmi_comparison_package_result + m * hmi_left_offset_package_result_compared_inverse = 1 + m * hmi_right_offset_package_result_compared_inverse))) -> hmi_comparison_package_result = hmi_solution_package_result))) /\ ((exists hmi_solution_package_result. ((((exists hmi_gap_package_result_chosen_bound. hmi_gap_package_result_chosen_bound + S hmi_solution_package_result = m) /\ (exists hmi_left_offset_package_result_chosen_inverse hmi_right_offset_package_result_chosen_inverse. a * hmi_solution_package_result + m * hmi_left_offset_package_result_chosen_inverse = 1 + m * hmi_right_offset_package_result_chosen_inverse))) /\ forall hmi_comparison_package_result. (((exists hmi_gap_package_result_compared_bound. hmi_gap_package_result_compared_bound + S hmi_comparison_package_result = m) /\ (exists hmi_left_offset_package_result_compared_inverse hmi_right_offset_package_result_compared_inverse. a * hmi_comparison_package_result + m * hmi_left_offset_package_result_compared_inverse = 1 + m * hmi_right_offset_package_result_compared_inverse))) -> hmi_comparison_package_result = hmi_solution_package_result)) -> (forall hmi_divisor_package_coprime. (exists hmi_left_factor_package_coprime. a = hmi_divisor_package_coprime * hmi_left_factor_package_coprime) -> (exists hmi_right_factor_package_coprime. m = hmi_divisor_package_coprime * hmi_right_factor_package_coprime) -> hmi_divisor_package_coprime = 1))
use coprime_bounded_mod_inverse
use bounded_mod_inverse_unique
use mod_inverse_implies_coprime
intro a
intro m
intro hm
split
intro hcop
have hexists : exists u. (((exists hmi_gap_package_exists_bound. hmi_gap_package_exists_bound + S u = m) /\ (exists hmi_left_offset_package_exists_inverse hmi_right_offset_package_exists_inverse. a * u + m * hmi_left_offset_package_exists_inverse = 1 + m * hmi_right_offset_package_exists_inverse)))
specialize coprime_bounded_mod_inverse a
specialize coprime_bounded_mod_inverse m
apply coprime_bounded_mod_inverse
exact hm
exact hcop
cases hexists
exists x
split
exact hexists_witness
intro v
intro hv
cases hv
cases hexists_witness
specialize bounded_mod_inverse_unique m
specialize bounded_mod_inverse_unique a
specialize bounded_mod_inverse_unique v
specialize bounded_mod_inverse_unique x
apply bounded_mod_inverse_unique
exact hv_left
exact hexists_witness_left
exact hv_right
exact hexists_witness_right
intro hunique
cases hunique
cases hunique_witness
cases hunique_witness_left
specialize mod_inverse_implies_coprime a
specialize mod_inverse_implies_coprime m
specialize mod_inverse_implies_coprime x
apply mod_inverse_implies_coprime
exact hunique_witness_left_right
qed
- Occurrences
- 9,512
- Distinct objects
- 2,538
- Reused references
- 142
- Depth
- 70
- Cuts
- 278
- Certificate SHA-256
4cce94405a13…
is_lcm_multiple_leftA relational LCM is a multiple of its left input
GCD, Bézout & coprimality
checked
A relational lcm is a multiple of its left input.
Exact expanded PA statement
forall l a b. ((((exists hlcm_left_factor_projection_left. l = a * hlcm_left_factor_projection_left) /\ (exists hlcm_right_factor_projection_left. l = b * hlcm_right_factor_projection_left)) /\ forall hlcm_common_projection_left. (exists hlcm_left_common_projection_left. hlcm_common_projection_left = a * hlcm_left_common_projection_left) -> (exists hlcm_right_common_projection_left. hlcm_common_projection_left = b * hlcm_right_common_projection_left) -> exists hlcm_least_factor_projection_left. hlcm_common_projection_left = l * hlcm_least_factor_projection_left)) -> exists x. l = a * x
Complete replay recipe: dependency imports + authored proof
pa prove forall l a b. ((((exists hlcm_left_factor_projection_left. l = a * hlcm_left_factor_projection_left) /\ (exists hlcm_right_factor_projection_left. l = b * hlcm_right_factor_projection_left)) /\ forall hlcm_common_projection_left. (exists hlcm_left_common_projection_left. hlcm_common_projection_left = a * hlcm_left_common_projection_left) -> (exists hlcm_right_common_projection_left. hlcm_common_projection_left = b * hlcm_right_common_projection_left) -> exists hlcm_least_factor_projection_left. hlcm_common_projection_left = l * hlcm_least_factor_projection_left)) -> exists x. l = a * x
intro l
intro a
intro b
intro h
cases h
cases h_left
exact h_left_left
qed
- Occurrences
- 21
- Distinct objects
- 21
- Reused references
- 0
- Depth
- 13
- Cuts
- 0
- Certificate SHA-256
848a8df1aab9…
is_lcm_multiple_rightA relational LCM is a multiple of its right input
GCD, Bézout & coprimality
checked
A relational lcm is a multiple of its right input.
Exact expanded PA statement
forall l a b. ((((exists hlcm_left_factor_projection_right. l = a * hlcm_left_factor_projection_right) /\ (exists hlcm_right_factor_projection_right. l = b * hlcm_right_factor_projection_right)) /\ forall hlcm_common_projection_right. (exists hlcm_left_common_projection_right. hlcm_common_projection_right = a * hlcm_left_common_projection_right) -> (exists hlcm_right_common_projection_right. hlcm_common_projection_right = b * hlcm_right_common_projection_right) -> exists hlcm_least_factor_projection_right. hlcm_common_projection_right = l * hlcm_least_factor_projection_right)) -> exists x. l = b * x
Complete replay recipe: dependency imports + authored proof
pa prove forall l a b. ((((exists hlcm_left_factor_projection_right. l = a * hlcm_left_factor_projection_right) /\ (exists hlcm_right_factor_projection_right. l = b * hlcm_right_factor_projection_right)) /\ forall hlcm_common_projection_right. (exists hlcm_left_common_projection_right. hlcm_common_projection_right = a * hlcm_left_common_projection_right) -> (exists hlcm_right_common_projection_right. hlcm_common_projection_right = b * hlcm_right_common_projection_right) -> exists hlcm_least_factor_projection_right. hlcm_common_projection_right = l * hlcm_least_factor_projection_right)) -> exists x. l = b * x
intro l
intro a
intro b
intro h
cases h
cases h_left
exact h_left_right
qed
- Occurrences
- 21
- Distinct objects
- 21
- Reused references
- 0
- Depth
- 13
- Cuts
- 0
- Certificate SHA-256
bdbcd5dadc77…
is_lcm_leastA relational LCM divides every common multiple
GCD, Bézout & coprimality
checked
A relational lcm divides every common multiple.
Exact expanded PA statement
forall l a b c. ((((exists hlcm_left_factor_least. l = a * hlcm_left_factor_least) /\ (exists hlcm_right_factor_least. l = b * hlcm_right_factor_least)) /\ forall hlcm_common_least. (exists hlcm_left_common_least. hlcm_common_least = a * hlcm_left_common_least) -> (exists hlcm_right_common_least. hlcm_common_least = b * hlcm_right_common_least) -> exists hlcm_least_factor_least. hlcm_common_least = l * hlcm_least_factor_least)) -> (exists x. c = a * x) -> (exists y. c = b * y) -> exists z. c = l * z
Complete replay recipe: dependency imports + authored proof
pa prove forall l a b c. ((((exists hlcm_left_factor_least. l = a * hlcm_left_factor_least) /\ (exists hlcm_right_factor_least. l = b * hlcm_right_factor_least)) /\ forall hlcm_common_least. (exists hlcm_left_common_least. hlcm_common_least = a * hlcm_left_common_least) -> (exists hlcm_right_common_least. hlcm_common_least = b * hlcm_right_common_least) -> exists hlcm_least_factor_least. hlcm_common_least = l * hlcm_least_factor_least)) -> (exists x. c = a * x) -> (exists y. c = b * y) -> exists z. c = l * z
intro l
intro a
intro b
intro c
intro h
intro ha
intro hb
cases h
specialize h_right c
apply h_right
exact ha
exact hb
qed
- Occurrences
- 24
- Distinct objects
- 24
- Reused references
- 0
- Depth
- 16
- Cuts
- 0
- Certificate SHA-256
90f411bbe254…
is_lcm_symmSymmetry of relational LCM
GCD, Bézout & coprimality
checked
The expanded relational lcm specification is symmetric.
Exact expanded PA statement
forall l a b. ((((exists hlcm_left_factor_symmetry_source. l = a * hlcm_left_factor_symmetry_source) /\ (exists hlcm_right_factor_symmetry_source. l = b * hlcm_right_factor_symmetry_source)) /\ forall hlcm_common_symmetry_source. (exists hlcm_left_common_symmetry_source. hlcm_common_symmetry_source = a * hlcm_left_common_symmetry_source) -> (exists hlcm_right_common_symmetry_source. hlcm_common_symmetry_source = b * hlcm_right_common_symmetry_source) -> exists hlcm_least_factor_symmetry_source. hlcm_common_symmetry_source = l * hlcm_least_factor_symmetry_source)) -> ((((exists hlcm_left_factor_symmetry_target. l = b * hlcm_left_factor_symmetry_target) /\ (exists hlcm_right_factor_symmetry_target. l = a * hlcm_right_factor_symmetry_target)) /\ forall hlcm_common_symmetry_target. (exists hlcm_left_common_symmetry_target. hlcm_common_symmetry_target = b * hlcm_left_common_symmetry_target) -> (exists hlcm_right_common_symmetry_target. hlcm_common_symmetry_target = a * hlcm_right_common_symmetry_target) -> exists hlcm_least_factor_symmetry_target. hlcm_common_symmetry_target = l * hlcm_least_factor_symmetry_target))
Complete replay recipe: dependency imports + authored proof
pa prove forall l a b. ((((exists hlcm_left_factor_symmetry_source. l = a * hlcm_left_factor_symmetry_source) /\ (exists hlcm_right_factor_symmetry_source. l = b * hlcm_right_factor_symmetry_source)) /\ forall hlcm_common_symmetry_source. (exists hlcm_left_common_symmetry_source. hlcm_common_symmetry_source = a * hlcm_left_common_symmetry_source) -> (exists hlcm_right_common_symmetry_source. hlcm_common_symmetry_source = b * hlcm_right_common_symmetry_source) -> exists hlcm_least_factor_symmetry_source. hlcm_common_symmetry_source = l * hlcm_least_factor_symmetry_source)) -> ((((exists hlcm_left_factor_symmetry_target. l = b * hlcm_left_factor_symmetry_target) /\ (exists hlcm_right_factor_symmetry_target. l = a * hlcm_right_factor_symmetry_target)) /\ forall hlcm_common_symmetry_target. (exists hlcm_left_common_symmetry_target. hlcm_common_symmetry_target = b * hlcm_left_common_symmetry_target) -> (exists hlcm_right_common_symmetry_target. hlcm_common_symmetry_target = a * hlcm_right_common_symmetry_target) -> exists hlcm_least_factor_symmetry_target. hlcm_common_symmetry_target = l * hlcm_least_factor_symmetry_target))
intro l
intro a
intro b
intro h
cases h
cases h_left
split
split
exact h_left_right
exact h_left_left
intro c
intro hbc
intro hac
specialize h_right c
apply h_right
exact hac
exact hbc
qed
- Occurrences
- 36
- Distinct objects
- 36
- Reused references
- 0
- Depth
- 21
- Cuts
- 0
- Certificate SHA-256
bf63a0e526c3…
is_lcm_uniqueUniqueness of relational LCM
GCD, Bézout & coprimality
checked
The expanded relational lcm specification is single-valued.
Exact expanded PA statement
forall l m a b. ((((exists hlcm_left_factor_unique_left. l = a * hlcm_left_factor_unique_left) /\ (exists hlcm_right_factor_unique_left. l = b * hlcm_right_factor_unique_left)) /\ forall hlcm_common_unique_left. (exists hlcm_left_common_unique_left. hlcm_common_unique_left = a * hlcm_left_common_unique_left) -> (exists hlcm_right_common_unique_left. hlcm_common_unique_left = b * hlcm_right_common_unique_left) -> exists hlcm_least_factor_unique_left. hlcm_common_unique_left = l * hlcm_least_factor_unique_left)) -> ((((exists hlcm_left_factor_unique_right. m = a * hlcm_left_factor_unique_right) /\ (exists hlcm_right_factor_unique_right. m = b * hlcm_right_factor_unique_right)) /\ forall hlcm_common_unique_right. (exists hlcm_left_common_unique_right. hlcm_common_unique_right = a * hlcm_left_common_unique_right) -> (exists hlcm_right_common_unique_right. hlcm_common_unique_right = b * hlcm_right_common_unique_right) -> exists hlcm_least_factor_unique_right. hlcm_common_unique_right = m * hlcm_least_factor_unique_right)) -> l = m
Complete replay recipe: dependency imports + authored proof
pa prove forall l m a b. ((((exists hlcm_left_factor_unique_left. l = a * hlcm_left_factor_unique_left) /\ (exists hlcm_right_factor_unique_left. l = b * hlcm_right_factor_unique_left)) /\ forall hlcm_common_unique_left. (exists hlcm_left_common_unique_left. hlcm_common_unique_left = a * hlcm_left_common_unique_left) -> (exists hlcm_right_common_unique_left. hlcm_common_unique_left = b * hlcm_right_common_unique_left) -> exists hlcm_least_factor_unique_left. hlcm_common_unique_left = l * hlcm_least_factor_unique_left)) -> ((((exists hlcm_left_factor_unique_right. m = a * hlcm_left_factor_unique_right) /\ (exists hlcm_right_factor_unique_right. m = b * hlcm_right_factor_unique_right)) /\ forall hlcm_common_unique_right. (exists hlcm_left_common_unique_right. hlcm_common_unique_right = a * hlcm_left_common_unique_right) -> (exists hlcm_right_common_unique_right. hlcm_common_unique_right = b * hlcm_right_common_unique_right) -> exists hlcm_least_factor_unique_right. hlcm_common_unique_right = m * hlcm_least_factor_unique_right)) -> l = m
use multiple_antisymm
intro l
intro m
intro a
intro b
intro hl
intro hm
cases hl
cases hl_left
cases hm
cases hm_left
have hlm : exists q. m = l * q
specialize hl_right m
apply hl_right
exact hm_left_left
exact hm_left_right
have hml : exists q. l = m * q
specialize hm_right l
apply hm_right
exact hl_left_left
exact hl_left_right
specialize multiple_antisymm l
specialize multiple_antisymm m
apply multiple_antisymm
exact hlm
exact hml
qed
- Occurrences
- 680
- Distinct objects
- 561
- Reused references
- 35
- Depth
- 34
- Cuts
- 20
- Certificate SHA-256
d39024dce998…
is_lcm_zero_rightLCM with zero on the right
GCD, Bézout & coprimality
checked
Zero is an lcm of every natural and zero.
Exact expanded PA statement
forall a. ((((exists hlcm_left_factor_zero_right. 0 = a * hlcm_left_factor_zero_right) /\ (exists hlcm_right_factor_zero_right. 0 = 0 * hlcm_right_factor_zero_right)) /\ forall hlcm_common_zero_right. (exists hlcm_left_common_zero_right. hlcm_common_zero_right = a * hlcm_left_common_zero_right) -> (exists hlcm_right_common_zero_right. hlcm_common_zero_right = 0 * hlcm_right_common_zero_right) -> exists hlcm_least_factor_zero_right. hlcm_common_zero_right = 0 * hlcm_least_factor_zero_right))
Complete replay recipe: dependency imports + authored proof
pa prove forall a. ((((exists hlcm_left_factor_zero_right. 0 = a * hlcm_left_factor_zero_right) /\ (exists hlcm_right_factor_zero_right. 0 = 0 * hlcm_right_factor_zero_right)) /\ forall hlcm_common_zero_right. (exists hlcm_left_common_zero_right. hlcm_common_zero_right = a * hlcm_left_common_zero_right) -> (exists hlcm_right_common_zero_right. hlcm_common_zero_right = 0 * hlcm_right_common_zero_right) -> exists hlcm_least_factor_zero_right. hlcm_common_zero_right = 0 * hlcm_least_factor_zero_right))
use multiple_zero
intro a
split
split
specialize multiple_zero a
exact multiple_zero
specialize multiple_zero 0
exact multiple_zero
intro c
intro hca
intro hc0
exact hc0
qed
- Occurrences
- 25
- Distinct objects
- 25
- Reused references
- 0
- Depth
- 7
- Cuts
- 1
- Certificate SHA-256
166243d22548…
is_lcm_zero_leftLCM with zero on the left
GCD, Bézout & coprimality
checked
Zero is an lcm of zero and every natural.
Exact expanded PA statement
forall b. ((((exists hlcm_left_factor_zero_left. 0 = 0 * hlcm_left_factor_zero_left) /\ (exists hlcm_right_factor_zero_left. 0 = b * hlcm_right_factor_zero_left)) /\ forall hlcm_common_zero_left. (exists hlcm_left_common_zero_left. hlcm_common_zero_left = 0 * hlcm_left_common_zero_left) -> (exists hlcm_right_common_zero_left. hlcm_common_zero_left = b * hlcm_right_common_zero_left) -> exists hlcm_least_factor_zero_left. hlcm_common_zero_left = 0 * hlcm_least_factor_zero_left))
Complete replay recipe: dependency imports + authored proof
pa prove forall b. ((((exists hlcm_left_factor_zero_left. 0 = 0 * hlcm_left_factor_zero_left) /\ (exists hlcm_right_factor_zero_left. 0 = b * hlcm_right_factor_zero_left)) /\ forall hlcm_common_zero_left. (exists hlcm_left_common_zero_left. hlcm_common_zero_left = 0 * hlcm_left_common_zero_left) -> (exists hlcm_right_common_zero_left. hlcm_common_zero_left = b * hlcm_right_common_zero_left) -> exists hlcm_least_factor_zero_left. hlcm_common_zero_left = 0 * hlcm_least_factor_zero_left))
use is_lcm_zero_right
use is_lcm_symm
intro b
have h : ((((exists hlcm_left_factor_zero_left_middle. 0 = b * hlcm_left_factor_zero_left_middle) /\ (exists hlcm_right_factor_zero_left_middle. 0 = 0 * hlcm_right_factor_zero_left_middle)) /\ forall hlcm_common_zero_left_middle. (exists hlcm_left_common_zero_left_middle. hlcm_common_zero_left_middle = b * hlcm_left_common_zero_left_middle) -> (exists hlcm_right_common_zero_left_middle. hlcm_common_zero_left_middle = 0 * hlcm_right_common_zero_left_middle) -> exists hlcm_least_factor_zero_left_middle. hlcm_common_zero_left_middle = 0 * hlcm_least_factor_zero_left_middle))
specialize is_lcm_zero_right b
exact is_lcm_zero_right
specialize is_lcm_symm 0
specialize is_lcm_symm b
specialize is_lcm_symm 0
apply is_lcm_symm
exact h
qed
- Occurrences
- 71
- Distinct objects
- 71
- Reused references
- 0
- Depth
- 23
- Cuts
- 3
- Certificate SHA-256
a4202018cabb…
balanced_bezout_one_implies_coprimeBalanced Bezout result one implies coprimality
GCD, Bézout & coprimality
checked
A balanced natural Bezout equation with result one forces the two inputs to be coprime.
Exact expanded PA statement
forall a b xp yp xn yn. a * xp + b * yp = 1 + (a * xn + b * yn) -> forall d. (exists u. a = d * u) -> (exists v. b = d * v) -> d = 1
Complete replay recipe: dependency imports + authored proof
pa prove forall a b xp yp xn yn. a * xp + b * yp = 1 + (a * xn + b * yn) -> forall d. (exists u. a = d * u) -> (exists v. b = d * v) -> d = 1
use common_divisor_divides_balanced_result
use divisor_one
intro a
intro b
intro xp
intro yp
intro xn
intro yn
intro hbez
intro d
intro ha
intro hb
specialize divisor_one d
apply divisor_one
specialize common_divisor_divides_balanced_result d
specialize common_divisor_divides_balanced_result a
specialize common_divisor_divides_balanced_result b
specialize common_divisor_divides_balanced_result 1
specialize common_divisor_divides_balanced_result xp
specialize common_divisor_divides_balanced_result yp
specialize common_divisor_divides_balanced_result xn
specialize common_divisor_divides_balanced_result yn
apply common_divisor_divides_balanced_result
exact ha
exact hb
exact hbez
qed
- Occurrences
- 871
- Distinct objects
- 616
- Reused references
- 41
- Depth
- 40
- Cuts
- 22
- Certificate SHA-256
50e944a45f51…
coprime_product_is_lcmThe product of coprime naturals is an LCM
GCD, Bézout & coprimality
checked
The product of coprime naturals satisfies the universal relational LCM specification.
Exact expanded PA statement
forall a b. (forall d. (exists u. a = d * u) -> (exists v. b = d * v) -> d = 1) -> ((((exists hlcm_left_factor_coprime_product. a * b = a * hlcm_left_factor_coprime_product) /\ (exists hlcm_right_factor_coprime_product. a * b = b * hlcm_right_factor_coprime_product)) /\ forall hlcm_common_coprime_product. (exists hlcm_left_common_coprime_product. hlcm_common_coprime_product = a * hlcm_left_common_coprime_product) -> (exists hlcm_right_common_coprime_product. hlcm_common_coprime_product = b * hlcm_right_common_coprime_product) -> exists hlcm_least_factor_coprime_product. hlcm_common_coprime_product = a * b * hlcm_least_factor_coprime_product))
Complete replay recipe: dependency imports + authored proof
pa prove forall a b. (forall d. (exists u. a = d * u) -> (exists v. b = d * v) -> d = 1) -> ((((exists hlcm_left_factor_coprime_product. a * b = a * hlcm_left_factor_coprime_product) /\ (exists hlcm_right_factor_coprime_product. a * b = b * hlcm_right_factor_coprime_product)) /\ forall hlcm_common_coprime_product. (exists hlcm_left_common_coprime_product. hlcm_common_coprime_product = a * hlcm_left_common_coprime_product) -> (exists hlcm_right_common_coprime_product. hlcm_common_coprime_product = b * hlcm_right_common_coprime_product) -> exists hlcm_least_factor_coprime_product. hlcm_common_coprime_product = a * b * hlcm_least_factor_coprime_product))
use mul_comm
use gauss_coprime_cancel
use mul_assoc
intro a
intro b
intro hcop
split
split
exists b
refl
exists a
apply mul_comm
intro c
intro ha
intro hb
cases ha
cases hb
have hdiv : exists q. b * x1 = a * q
exists x
trans c
symm
exact hb_witness
exact ha_witness
have hfactor : exists w. x1 = a * w
specialize gauss_coprime_cancel a
specialize gauss_coprime_cancel b
specialize gauss_coprime_cancel x1
apply gauss_coprime_cancel
exact hcop
exact hdiv
cases hfactor
exists x2
trans b * x1
exact hb_witness
trans b * (a * x2)
rewrite hfactor_witness
refl
trans (b * a) * x2
symm
apply mul_assoc
congr
apply mul_comm
refl
qed
- Occurrences
- 4,191
- Distinct objects
- 1,552
- Reused references
- 95
- Depth
- 53
- Cuts
- 121
- Certificate SHA-256
1bb51a1a4ac2…
is_lcm_scale_nonzeroNonzero scaling preserves relational LCM
GCD, Bézout & coprimality
checked
A nonzero common left scale preserves the universal relational LCM specification.
Exact expanded PA statement
forall k l a b. ~(k = 0) -> ((((exists hscale_left_factor_source. l = a * hscale_left_factor_source) /\ (exists hscale_right_factor_source. l = b * hscale_right_factor_source)) /\ forall hscale_common_source. (exists hscale_left_common_source. hscale_common_source = a * hscale_left_common_source) -> (exists hscale_right_common_source. hscale_common_source = b * hscale_right_common_source) -> exists hscale_least_factor_source. hscale_common_source = l * hscale_least_factor_source)) -> ((((exists hscale_left_factor_target. (k * l) = (k * a) * hscale_left_factor_target) /\ (exists hscale_right_factor_target. (k * l) = (k * b) * hscale_right_factor_target)) /\ forall hscale_common_target. (exists hscale_left_common_target. hscale_common_target = (k * a) * hscale_left_common_target) -> (exists hscale_right_common_target. hscale_common_target = (k * b) * hscale_right_common_target) -> exists hscale_least_factor_target. hscale_common_target = (k * l) * hscale_least_factor_target))
Complete replay recipe: dependency imports + authored proof
pa prove forall k l a b. ~(k = 0) -> ((((exists hscale_left_factor_source. l = a * hscale_left_factor_source) /\ (exists hscale_right_factor_source. l = b * hscale_right_factor_source)) /\ forall hscale_common_source. (exists hscale_left_common_source. hscale_common_source = a * hscale_left_common_source) -> (exists hscale_right_common_source. hscale_common_source = b * hscale_right_common_source) -> exists hscale_least_factor_source. hscale_common_source = l * hscale_least_factor_source)) -> ((((exists hscale_left_factor_target. (k * l) = (k * a) * hscale_left_factor_target) /\ (exists hscale_right_factor_target. (k * l) = (k * b) * hscale_right_factor_target)) /\ forall hscale_common_target. (exists hscale_left_common_target. hscale_common_target = (k * a) * hscale_left_common_target) -> (exists hscale_right_common_target. hscale_common_target = (k * b) * hscale_right_common_target) -> exists hscale_least_factor_target. hscale_common_target = (k * l) * hscale_least_factor_target))
use mul_assoc
use mul_left_cancel_nonzero
intro k
intro l
intro a
intro b
intro hk
intro h
cases h
cases h_left
cases h_left_left
cases h_left_right
split
split
exists x
rewrite h_left_left_witness
symm
apply mul_assoc
exists x1
rewrite h_left_right_witness
symm
apply mul_assoc
intro c
intro hca
intro hcb
cases hca
cases hcb
have hca_norm : c = k * (a * x2)
trans (k * a) * x2
exact hca_witness
apply mul_assoc
have hcb_norm : c = k * (b * x3)
trans (k * b) * x3
exact hcb_witness
apply mul_assoc
have hab : a * x2 = b * x3
specialize mul_left_cancel_nonzero k
specialize mul_left_cancel_nonzero (a * x2)
specialize mul_left_cancel_nonzero (b * x3)
apply mul_left_cancel_nonzero
exact hk
trans c
symm
exact hca_norm
exact hcb_norm
have hleast : exists w. a * x2 = l * w
specialize h_right (a * x2)
apply h_right
exists x2
refl
exists x3
exact hab
cases hleast
exists x4
trans k * (a * x2)
exact hca_norm
trans k * (l * x4)
congr
refl
exact hleast_witness
symm
apply mul_assoc
qed
- Occurrences
- 430
- Distinct objects
- 371
- Reused references
- 13
- Depth
- 27
- Cuts
- 11
- Certificate SHA-256
e53557b877b4…
balanced_bezout_cancel_gcdCancel a nonzero gcd from balanced Bezout
GCD, Bézout & coprimality
checked
Cancel a nonzero common gcd factor from a balanced Bezout equation.
Exact expanded PA statement
forall g a b A B xp yp xn yn. ~(g = 0) -> a = g * A -> b = g * B -> a * xp + b * yp = g + (a * xn + b * yn) -> A * xp + B * yp = 1 + (A * xn + B * yn)
Complete replay recipe: dependency imports + authored proof
pa prove forall g a b A B xp yp xn yn. ~(g = 0) -> a = g * A -> b = g * B -> a * xp + b * yp = g + (a * xn + b * yn) -> A * xp + B * yp = 1 + (A * xn + B * yn)
use mul_left_cancel_nonzero
use mul_add
use mul_assoc
use mul_one
intro g
intro a
intro b
intro A
intro B
intro xp
intro yp
intro xn
intro yn
intro hg
intro ha
intro hb
intro hbez
specialize mul_left_cancel_nonzero g
specialize mul_left_cancel_nonzero (A * xp + B * yp)
specialize mul_left_cancel_nonzero (1 + (A * xn + B * yn))
apply mul_left_cancel_nonzero
exact hg
trans g * (A * xp) + g * (B * yp)
apply mul_add
trans (g * A) * xp + (g * B) * yp
congr
symm
apply mul_assoc
symm
apply mul_assoc
trans a * xp + b * yp
rewrite ha
rewrite hb
refl
trans g + (a * xn + b * yn)
exact hbez
trans g + ((g * A) * xn + (g * B) * yn)
rewrite ha
rewrite hb
refl
trans g * 1 + ((g * A) * xn + (g * B) * yn)
congr
symm
apply mul_one
refl
trans g * 1 + (g * (A * xn) + g * (B * yn))
congr
refl
congr
apply mul_assoc
apply mul_assoc
trans g * 1 + g * (A * xn + B * yn)
congr
refl
symm
apply mul_add
symm
apply mul_add
qed
- Occurrences
- 549
- Distinct objects
- 409
- Reused references
- 18
- Depth
- 38
- Cuts
- 15
- Certificate SHA-256
2f0613e9f78c…
gcd_zero_inputsA zero gcd forces zero inputs
GCD, Bézout & coprimality
checked
A zero relational gcd can divide only the zero input pair.
Exact expanded PA statement
forall g a b. g = 0 -> ((((exists hag_left_factor_zero_inputs. a = g * hag_left_factor_zero_inputs) /\ (exists hag_right_factor_zero_inputs. b = g * hag_right_factor_zero_inputs)) /\ forall hag_divisor_zero_inputs. (exists hag_common_left_zero_inputs. a = hag_divisor_zero_inputs * hag_common_left_zero_inputs) -> (exists hag_common_right_zero_inputs. b = hag_divisor_zero_inputs * hag_common_right_zero_inputs) -> exists hag_greatest_factor_zero_inputs. g = hag_divisor_zero_inputs * hag_greatest_factor_zero_inputs)) -> (a = 0 /\ b = 0)
Complete replay recipe: dependency imports + authored proof
pa prove forall g a b. g = 0 -> ((((exists hag_left_factor_zero_inputs. a = g * hag_left_factor_zero_inputs) /\ (exists hag_right_factor_zero_inputs. b = g * hag_right_factor_zero_inputs)) /\ forall hag_divisor_zero_inputs. (exists hag_common_left_zero_inputs. a = hag_divisor_zero_inputs * hag_common_left_zero_inputs) -> (exists hag_common_right_zero_inputs. b = hag_divisor_zero_inputs * hag_common_right_zero_inputs) -> exists hag_greatest_factor_zero_inputs. g = hag_divisor_zero_inputs * hag_greatest_factor_zero_inputs)) -> (a = 0 /\ b = 0)
use mul_zero_left
intro g
intro a
intro b
intro hg
intro h
cases h
cases h_left
cases h_left_left
cases h_left_right
split
trans g * x
exact h_left_left_witness
rewrite hg
apply mul_zero_left
trans g * x1
exact h_left_right_witness
rewrite hg
apply mul_zero_left
qed
- Occurrences
- 62
- Distinct objects
- 62
- Reused references
- 0
- Depth
- 21
- Cuts
- 1
- Certificate SHA-256
0cfd18ba4f88…
gcd_lcm_compatible_existsCompatible gcd and LCM witnesses exist
GCD, Bézout & coprimality
checked
Every pair has compatible relational gcd and lcm witnesses whose product is the product of the inputs, including zero inputs.
Exact expanded PA statement
forall a b. exists g l. ((((((exists hag_left_factor_compatible. a = g * hag_left_factor_compatible) /\ (exists hag_right_factor_compatible. b = g * hag_right_factor_compatible)) /\ forall hag_divisor_compatible. (exists hag_common_left_compatible. a = hag_divisor_compatible * hag_common_left_compatible) -> (exists hag_common_right_compatible. b = hag_divisor_compatible * hag_common_right_compatible) -> exists hag_greatest_factor_compatible. g = hag_divisor_compatible * hag_greatest_factor_compatible)) /\ ((((exists hlcm_left_factor_compatible. l = a * hlcm_left_factor_compatible) /\ (exists hlcm_right_factor_compatible. l = b * hlcm_right_factor_compatible)) /\ forall hlcm_common_compatible. (exists hlcm_left_common_compatible. hlcm_common_compatible = a * hlcm_left_common_compatible) -> (exists hlcm_right_common_compatible. hlcm_common_compatible = b * hlcm_right_common_compatible) -> exists hlcm_least_factor_compatible. hlcm_common_compatible = l * hlcm_least_factor_compatible))) /\ g * l = a * b)
Complete replay recipe: dependency imports + authored proof
pa prove forall a b. exists g l. ((((((exists hag_left_factor_compatible. a = g * hag_left_factor_compatible) /\ (exists hag_right_factor_compatible. b = g * hag_right_factor_compatible)) /\ forall hag_divisor_compatible. (exists hag_common_left_compatible. a = hag_divisor_compatible * hag_common_left_compatible) -> (exists hag_common_right_compatible. b = hag_divisor_compatible * hag_common_right_compatible) -> exists hag_greatest_factor_compatible. g = hag_divisor_compatible * hag_greatest_factor_compatible)) /\ ((((exists hlcm_left_factor_compatible. l = a * hlcm_left_factor_compatible) /\ (exists hlcm_right_factor_compatible. l = b * hlcm_right_factor_compatible)) /\ forall hlcm_common_compatible. (exists hlcm_left_common_compatible. hlcm_common_compatible = a * hlcm_left_common_compatible) -> (exists hlcm_right_common_compatible. hlcm_common_compatible = b * hlcm_right_common_compatible) -> exists hlcm_least_factor_compatible. hlcm_common_compatible = l * hlcm_least_factor_compatible))) /\ g * l = a * b)
use gcd_balanced_bezout_exists
use eq_decidable
use gcd_zero_inputs
use is_lcm_zero_left
use balanced_bezout_cancel_gcd
use balanced_bezout_one_implies_coprime
use coprime_product_is_lcm
use is_lcm_scale_nonzero
use mul_assoc
use mul_comm
intro a
intro b
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))
specialize gcd_balanced_bezout_exists a
specialize gcd_balanced_bezout_exists b
apply gcd_balanced_bezout_exists
cases hgb
cases hgb_witness
have hzero : x = 0 \/ ~(x = 0)
specialize eq_decidable x
specialize eq_decidable 0
exact eq_decidable
cases hzero
have habzero : a = 0 /\ b = 0
specialize gcd_zero_inputs x
specialize gcd_zero_inputs a
specialize gcd_zero_inputs b
apply gcd_zero_inputs
exact hzero_left
exact hgb_witness_left
cases habzero
have hlcmzero : ((((exists hlcm_left_factor_compatible_zero. 0 = 0 * hlcm_left_factor_compatible_zero) /\ (exists hlcm_right_factor_compatible_zero. 0 = 0 * hlcm_right_factor_compatible_zero)) /\ forall hlcm_common_compatible_zero. (exists hlcm_left_common_compatible_zero. hlcm_common_compatible_zero = 0 * hlcm_left_common_compatible_zero) -> (exists hlcm_right_common_compatible_zero. hlcm_common_compatible_zero = 0 * hlcm_right_common_compatible_zero) -> exists hlcm_least_factor_compatible_zero. hlcm_common_compatible_zero = 0 * hlcm_least_factor_compatible_zero))
specialize is_lcm_zero_left 0
exact is_lcm_zero_left
exists x
exists 0
split
split
exact hgb_witness_left
rewrite habzero_left
rewrite habzero_left
rewrite habzero_right
rewrite habzero_right
exact hlcmzero
rewrite hzero_left
rewrite habzero_left
rewrite habzero_right
refl
cases hgb_witness_left
cases hgb_witness_left_left
cases hgb_witness_left_left_left
cases hgb_witness_left_left_right
cases hgb_witness_right
cases hgb_witness_right_witness
cases hgb_witness_right_witness_witness
cases hgb_witness_right_witness_witness_witness
have hquotbez : x1 * x3 + x2 * x4 = 1 + (x1 * x5 + x2 * x6)
specialize balanced_bezout_cancel_gcd x
specialize balanced_bezout_cancel_gcd a
specialize balanced_bezout_cancel_gcd b
specialize balanced_bezout_cancel_gcd x1
specialize balanced_bezout_cancel_gcd x2
specialize balanced_bezout_cancel_gcd x3
specialize balanced_bezout_cancel_gcd x4
specialize balanced_bezout_cancel_gcd x5
specialize balanced_bezout_cancel_gcd x6
apply balanced_bezout_cancel_gcd
exact hzero_right
exact hgb_witness_left_left_left_witness
exact hgb_witness_left_left_right_witness
exact hgb_witness_right_witness_witness_witness_witness
have hcop : forall d. (exists u. x1 = d * u) -> (exists v. x2 = d * v) -> d = 1
specialize balanced_bezout_one_implies_coprime x1
specialize balanced_bezout_one_implies_coprime x2
specialize balanced_bezout_one_implies_coprime x3
specialize balanced_bezout_one_implies_coprime x4
specialize balanced_bezout_one_implies_coprime x5
specialize balanced_bezout_one_implies_coprime x6
apply balanced_bezout_one_implies_coprime
exact hquotbez
have hbase : ((((exists hlcm_left_factor_compatible_base. x1 * x2 = x1 * hlcm_left_factor_compatible_base) /\ (exists hlcm_right_factor_compatible_base. x1 * x2 = x2 * hlcm_right_factor_compatible_base)) /\ forall hlcm_common_compatible_base. (exists hlcm_left_common_compatible_base. hlcm_common_compatible_base = x1 * hlcm_left_common_compatible_base) -> (exists hlcm_right_common_compatible_base. hlcm_common_compatible_base = x2 * hlcm_right_common_compatible_base) -> exists hlcm_least_factor_compatible_base. hlcm_common_compatible_base = x1 * x2 * hlcm_least_factor_compatible_base))
specialize coprime_product_is_lcm x1
specialize coprime_product_is_lcm x2
apply coprime_product_is_lcm
exact hcop
have hscaled : ((((exists hscale_left_factor_compatible_scaled. (x * (x1 * x2)) = (x * x1) * hscale_left_factor_compatible_scaled) /\ (exists hscale_right_factor_compatible_scaled. (x * (x1 * x2)) = (x * x2) * hscale_right_factor_compatible_scaled)) /\ forall hscale_common_compatible_scaled. (exists hscale_left_common_compatible_scaled. hscale_common_compatible_scaled = (x * x1) * hscale_left_common_compatible_scaled) -> (exists hscale_right_common_compatible_scaled. hscale_common_compatible_scaled = (x * x2) * hscale_right_common_compatible_scaled) -> exists hscale_least_factor_compatible_scaled. hscale_common_compatible_scaled = (x * (x1 * x2)) * hscale_least_factor_compatible_scaled))
specialize is_lcm_scale_nonzero x
specialize is_lcm_scale_nonzero (x1 * x2)
specialize is_lcm_scale_nonzero x1
specialize is_lcm_scale_nonzero x2
apply is_lcm_scale_nonzero
exact hzero_right
exact hbase
exists x
exists x * (x1 * x2)
split
split
exact hgb_witness_left
rewrite hgb_witness_left_left_left_witness
rewrite hgb_witness_left_left_left_witness
rewrite hgb_witness_left_left_right_witness
rewrite hgb_witness_left_left_right_witness
exact hscaled
rewrite hgb_witness_left_left_left_witness
rewrite hgb_witness_left_left_right_witness
trans x * (x1 * (x * x2))
congr
refl
trans (x * x1) * x2
symm
apply mul_assoc
trans (x1 * x) * x2
congr
apply mul_comm
refl
apply mul_assoc
symm
apply mul_assoc
qed
- Occurrences
- 9,038
- Distinct objects
- 2,390
- Reused references
- 121
- Depth
- 60
- Cuts
- 257
- Certificate SHA-256
7f93d3556a9f…
lcm_exists_relationalRelational LCM exists
GCD, Bézout & coprimality
checked
Every pair of naturals has a relational LCM; this is the direct LCM projection of the compatible pair theorem.
Exact expanded PA statement
forall a b. exists l. ((((exists hlcm_left_factor_existence. l = a * hlcm_left_factor_existence) /\ (exists hlcm_right_factor_existence. l = b * hlcm_right_factor_existence)) /\ forall hlcm_common_existence. (exists hlcm_left_common_existence. hlcm_common_existence = a * hlcm_left_common_existence) -> (exists hlcm_right_common_existence. hlcm_common_existence = b * hlcm_right_common_existence) -> exists hlcm_least_factor_existence. hlcm_common_existence = l * hlcm_least_factor_existence))
Complete replay recipe: dependency imports + authored proof
pa prove forall a b. exists l. ((((exists hlcm_left_factor_existence. l = a * hlcm_left_factor_existence) /\ (exists hlcm_right_factor_existence. l = b * hlcm_right_factor_existence)) /\ forall hlcm_common_existence. (exists hlcm_left_common_existence. hlcm_common_existence = a * hlcm_left_common_existence) -> (exists hlcm_right_common_existence. hlcm_common_existence = b * hlcm_right_common_existence) -> exists hlcm_least_factor_existence. hlcm_common_existence = l * hlcm_least_factor_existence))
use gcd_lcm_compatible_exists
intro a
intro b
specialize gcd_lcm_compatible_exists a
specialize gcd_lcm_compatible_exists b
cases gcd_lcm_compatible_exists
cases gcd_lcm_compatible_exists_witness
cases gcd_lcm_compatible_exists_witness_witness
cases gcd_lcm_compatible_exists_witness_witness_left
exists x1
exact gcd_lcm_compatible_exists_witness_witness_left_right
qed
- Occurrences
- 9,071
- Distinct objects
- 2,423
- Reused references
- 121
- Depth
- 61
- Cuts
- 258
- Certificate SHA-256
804dd563fab9…
canonical_lcm_exists_uniqueCanonical LCM exists uniquely
GCD, Bézout & coprimality
checked
The relational LCM value exists uniquely; divisibility witnesses themselves are not claimed to be unique.
Exact expanded PA statement
forall a b. exists l. (((((exists hlcm_left_factor_unique_chosen. l = a * hlcm_left_factor_unique_chosen) /\ (exists hlcm_right_factor_unique_chosen. l = b * hlcm_right_factor_unique_chosen)) /\ forall hlcm_common_unique_chosen. (exists hlcm_left_common_unique_chosen. hlcm_common_unique_chosen = a * hlcm_left_common_unique_chosen) -> (exists hlcm_right_common_unique_chosen. hlcm_common_unique_chosen = b * hlcm_right_common_unique_chosen) -> exists hlcm_least_factor_unique_chosen. hlcm_common_unique_chosen = l * hlcm_least_factor_unique_chosen)) /\ forall m. ((((exists hlcm_left_factor_unique_compared. m = a * hlcm_left_factor_unique_compared) /\ (exists hlcm_right_factor_unique_compared. m = b * hlcm_right_factor_unique_compared)) /\ forall hlcm_common_unique_compared. (exists hlcm_left_common_unique_compared. hlcm_common_unique_compared = a * hlcm_left_common_unique_compared) -> (exists hlcm_right_common_unique_compared. hlcm_common_unique_compared = b * hlcm_right_common_unique_compared) -> exists hlcm_least_factor_unique_compared. hlcm_common_unique_compared = m * hlcm_least_factor_unique_compared)) -> m = l)
Complete replay recipe: dependency imports + authored proof
pa prove forall a b. exists l. (((((exists hlcm_left_factor_unique_chosen. l = a * hlcm_left_factor_unique_chosen) /\ (exists hlcm_right_factor_unique_chosen. l = b * hlcm_right_factor_unique_chosen)) /\ forall hlcm_common_unique_chosen. (exists hlcm_left_common_unique_chosen. hlcm_common_unique_chosen = a * hlcm_left_common_unique_chosen) -> (exists hlcm_right_common_unique_chosen. hlcm_common_unique_chosen = b * hlcm_right_common_unique_chosen) -> exists hlcm_least_factor_unique_chosen. hlcm_common_unique_chosen = l * hlcm_least_factor_unique_chosen)) /\ forall m. ((((exists hlcm_left_factor_unique_compared. m = a * hlcm_left_factor_unique_compared) /\ (exists hlcm_right_factor_unique_compared. m = b * hlcm_right_factor_unique_compared)) /\ forall hlcm_common_unique_compared. (exists hlcm_left_common_unique_compared. hlcm_common_unique_compared = a * hlcm_left_common_unique_compared) -> (exists hlcm_right_common_unique_compared. hlcm_common_unique_compared = b * hlcm_right_common_unique_compared) -> exists hlcm_least_factor_unique_compared. hlcm_common_unique_compared = m * hlcm_least_factor_unique_compared)) -> m = l)
use lcm_exists_relational
use is_lcm_unique
intro a
intro b
specialize lcm_exists_relational a
specialize lcm_exists_relational b
cases lcm_exists_relational
exists x
split
exact lcm_exists_relational_witness
intro m
intro hm
specialize is_lcm_unique m
specialize is_lcm_unique x
specialize is_lcm_unique a
specialize is_lcm_unique b
apply is_lcm_unique
exact hm
exact lcm_exists_relational_witness
qed
- Occurrences
- 9,791
- Distinct objects
- 2,565
- Reused references
- 127
- Depth
- 62
- Cuts
- 280
- Certificate SHA-256
e40bc5728296…
gcd_lcm_productThe gcd-LCM product identity
GCD, Bézout & coprimality
checked
Any relational gcd and LCM pair satisfies the gcd--LCM product identity, by uniqueness from a compatible pair.
Exact expanded PA statement
forall g l a b. ((((exists hag_left_factor_product_gcd_assumption. a = g * hag_left_factor_product_gcd_assumption) /\ (exists hag_right_factor_product_gcd_assumption. b = g * hag_right_factor_product_gcd_assumption)) /\ forall hag_divisor_product_gcd_assumption. (exists hag_common_left_product_gcd_assumption. a = hag_divisor_product_gcd_assumption * hag_common_left_product_gcd_assumption) -> (exists hag_common_right_product_gcd_assumption. b = hag_divisor_product_gcd_assumption * hag_common_right_product_gcd_assumption) -> exists hag_greatest_factor_product_gcd_assumption. g = hag_divisor_product_gcd_assumption * hag_greatest_factor_product_gcd_assumption)) -> ((((exists hlcm_left_factor_product_lcm_assumption. l = a * hlcm_left_factor_product_lcm_assumption) /\ (exists hlcm_right_factor_product_lcm_assumption. l = b * hlcm_right_factor_product_lcm_assumption)) /\ forall hlcm_common_product_lcm_assumption. (exists hlcm_left_common_product_lcm_assumption. hlcm_common_product_lcm_assumption = a * hlcm_left_common_product_lcm_assumption) -> (exists hlcm_right_common_product_lcm_assumption. hlcm_common_product_lcm_assumption = b * hlcm_right_common_product_lcm_assumption) -> exists hlcm_least_factor_product_lcm_assumption. hlcm_common_product_lcm_assumption = l * hlcm_least_factor_product_lcm_assumption)) -> g * l = a * b
Complete replay recipe: dependency imports + authored proof
pa prove forall g l a b. ((((exists hag_left_factor_product_gcd_assumption. a = g * hag_left_factor_product_gcd_assumption) /\ (exists hag_right_factor_product_gcd_assumption. b = g * hag_right_factor_product_gcd_assumption)) /\ forall hag_divisor_product_gcd_assumption. (exists hag_common_left_product_gcd_assumption. a = hag_divisor_product_gcd_assumption * hag_common_left_product_gcd_assumption) -> (exists hag_common_right_product_gcd_assumption. b = hag_divisor_product_gcd_assumption * hag_common_right_product_gcd_assumption) -> exists hag_greatest_factor_product_gcd_assumption. g = hag_divisor_product_gcd_assumption * hag_greatest_factor_product_gcd_assumption)) -> ((((exists hlcm_left_factor_product_lcm_assumption. l = a * hlcm_left_factor_product_lcm_assumption) /\ (exists hlcm_right_factor_product_lcm_assumption. l = b * hlcm_right_factor_product_lcm_assumption)) /\ forall hlcm_common_product_lcm_assumption. (exists hlcm_left_common_product_lcm_assumption. hlcm_common_product_lcm_assumption = a * hlcm_left_common_product_lcm_assumption) -> (exists hlcm_right_common_product_lcm_assumption. hlcm_common_product_lcm_assumption = b * hlcm_right_common_product_lcm_assumption) -> exists hlcm_least_factor_product_lcm_assumption. hlcm_common_product_lcm_assumption = l * hlcm_least_factor_product_lcm_assumption)) -> g * l = a * b
use gcd_lcm_compatible_exists
use is_gcd_unique
use is_lcm_unique
intro g
intro l
intro a
intro b
intro hg
intro hl
specialize gcd_lcm_compatible_exists a
specialize gcd_lcm_compatible_exists b
cases gcd_lcm_compatible_exists
cases gcd_lcm_compatible_exists_witness
cases gcd_lcm_compatible_exists_witness_witness
cases gcd_lcm_compatible_exists_witness_witness_left
have hgeq : g = x
specialize is_gcd_unique g
specialize is_gcd_unique x
specialize is_gcd_unique a
specialize is_gcd_unique b
apply is_gcd_unique
exact hg
exact gcd_lcm_compatible_exists_witness_witness_left_left
have hleq : l = x1
specialize is_lcm_unique l
specialize is_lcm_unique x1
specialize is_lcm_unique a
specialize is_lcm_unique b
apply is_lcm_unique
exact hl
exact gcd_lcm_compatible_exists_witness_witness_left_right
rewrite hgeq
rewrite hleq
exact gcd_lcm_compatible_exists_witness_witness_right
qed
- Occurrences
- 10,441
- Distinct objects
- 2,569
- Reused references
- 128
- Depth
- 61
- Cuts
- 300
- Certificate SHA-256
8f7608a596be…
mod_eq_zero_iff_eqMod eq zero iff eq
Congruence & CRT
checked
Balanced congruence modulo zero is exactly equality.
Exact expanded PA statement
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)))
Complete replay recipe: dependency imports + authored proof
pa prove 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)))
use mul_zero_left
intro a
intro b
split
intro h
cases h
cases h_witness
trans a + 0 * x
symm
trans a + 0
congr
refl
apply mul_zero_left
apply PA3
trans b + 0 * x1
exact h_witness_witness
trans b + 0
congr
refl
apply mul_zero_left
apply PA3
intro h
exists 0
exists 0
rewrite h
refl
qed
- Occurrences
- 55
- Distinct objects
- 55
- Reused references
- 0
- Depth
- 13
- Cuts
- 1
- Certificate SHA-256
af253fd988c1…
mod_eq_scaleMod eq scale
Congruence & CRT
checked
Scaling values and their modulus preserves balanced congruence.
Exact expanded PA statement
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)
Complete replay recipe: dependency imports + authored proof
pa prove 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)
use mul_add
use mul_assoc
intro k
intro m
intro a
intro b
intro h
cases h
cases h_witness
exists x
exists x1
trans k * a + k * (m * x)
congr
refl
apply mul_assoc
trans k * (a + m * x)
symm
apply mul_add
trans k * (b + m * x1)
congr
refl
exact h_witness_witness
trans k * b + k * (m * x1)
apply mul_add
congr
refl
symm
apply mul_assoc
qed
- Occurrences
- 235
- Distinct objects
- 146
- Reused references
- 13
- Depth
- 21
- Cuts
- 5
- Certificate SHA-256
d9c5bcb8145d…
crt_solution_pair_congruentCrt solution pair congruent
Congruence & CRT
checked
Any two solutions of one binary CRT problem agree modulo each modulus.
Exact expanded PA statement
forall m n a b x y. (((exists hgcrt_mod_left_pair_x_left hgcrt_mod_right_pair_x_left. x + m * hgcrt_mod_left_pair_x_left = a + m * hgcrt_mod_right_pair_x_left) /\ (exists hgcrt_mod_left_pair_x_right hgcrt_mod_right_pair_x_right. x + n * hgcrt_mod_left_pair_x_right = b + n * hgcrt_mod_right_pair_x_right))) -> (((exists hgcrt_mod_left_pair_y_left hgcrt_mod_right_pair_y_left. y + m * hgcrt_mod_left_pair_y_left = a + m * hgcrt_mod_right_pair_y_left) /\ (exists hgcrt_mod_left_pair_y_right hgcrt_mod_right_pair_y_right. y + n * hgcrt_mod_left_pair_y_right = b + n * hgcrt_mod_right_pair_y_right))) -> ((exists hgcrt_mod_left_pair_mod_m hgcrt_mod_right_pair_mod_m. x + m * hgcrt_mod_left_pair_mod_m = y + m * hgcrt_mod_right_pair_mod_m) /\ (exists hgcrt_mod_left_pair_mod_n hgcrt_mod_right_pair_mod_n. x + n * hgcrt_mod_left_pair_mod_n = y + n * hgcrt_mod_right_pair_mod_n))
Complete replay recipe: dependency imports + authored proof
pa prove forall m n a b x y. (((exists hgcrt_mod_left_pair_x_left hgcrt_mod_right_pair_x_left. x + m * hgcrt_mod_left_pair_x_left = a + m * hgcrt_mod_right_pair_x_left) /\ (exists hgcrt_mod_left_pair_x_right hgcrt_mod_right_pair_x_right. x + n * hgcrt_mod_left_pair_x_right = b + n * hgcrt_mod_right_pair_x_right))) -> (((exists hgcrt_mod_left_pair_y_left hgcrt_mod_right_pair_y_left. y + m * hgcrt_mod_left_pair_y_left = a + m * hgcrt_mod_right_pair_y_left) /\ (exists hgcrt_mod_left_pair_y_right hgcrt_mod_right_pair_y_right. y + n * hgcrt_mod_left_pair_y_right = b + n * hgcrt_mod_right_pair_y_right))) -> ((exists hgcrt_mod_left_pair_mod_m hgcrt_mod_right_pair_mod_m. x + m * hgcrt_mod_left_pair_mod_m = y + m * hgcrt_mod_right_pair_mod_m) /\ (exists hgcrt_mod_left_pair_mod_n hgcrt_mod_right_pair_mod_n. x + n * hgcrt_mod_left_pair_mod_n = y + n * hgcrt_mod_right_pair_mod_n))
use mod_eq_symm
use mod_eq_trans
intro m
intro n
intro a
intro b
intro x
intro y
intro hx
intro hy
cases hx
cases hy
split
have hay : exists hgcrt_mod_left_pair_a_y hgcrt_mod_right_pair_a_y. a + m * hgcrt_mod_left_pair_a_y = y + m * hgcrt_mod_right_pair_a_y
specialize mod_eq_symm m
specialize mod_eq_symm y
specialize mod_eq_symm a
apply mod_eq_symm
exact hy_left
specialize mod_eq_trans m
specialize mod_eq_trans x
specialize mod_eq_trans a
specialize mod_eq_trans y
apply mod_eq_trans
exact hx_left
exact hay
have hby : exists hgcrt_mod_left_pair_b_y hgcrt_mod_right_pair_b_y. b + n * hgcrt_mod_left_pair_b_y = y + n * hgcrt_mod_right_pair_b_y
specialize mod_eq_symm n
specialize mod_eq_symm y
specialize mod_eq_symm b
apply mod_eq_symm
exact hy_right
specialize mod_eq_trans n
specialize mod_eq_trans x
specialize mod_eq_trans b
specialize mod_eq_trans y
apply mod_eq_trans
exact hx_right
exact hby
qed
- Occurrences
- 307
- Distinct objects
- 259
- Reused references
- 16
- Depth
- 31
- Cuts
- 8
- Certificate SHA-256
a3425a60d00e…
crt_common_solution_implies_gcd_compatibleCrt common solution implies gcd compatible
Congruence & CRT
checked
A common CRT solution forces the residues to be congruent modulo every relational gcd.
Exact expanded PA statement
forall g m n a b x. ((((exists hag_left_factor_crt_necessity. m = g * hag_left_factor_crt_necessity) /\ (exists hag_right_factor_crt_necessity. n = g * hag_right_factor_crt_necessity)) /\ forall hag_divisor_crt_necessity. (exists hag_common_left_crt_necessity. m = hag_divisor_crt_necessity * hag_common_left_crt_necessity) -> (exists hag_common_right_crt_necessity. n = hag_divisor_crt_necessity * hag_common_right_crt_necessity) -> exists hag_greatest_factor_crt_necessity. g = hag_divisor_crt_necessity * hag_greatest_factor_crt_necessity)) -> (((exists hgcrt_mod_left_necessity_solution_left hgcrt_mod_right_necessity_solution_left. x + m * hgcrt_mod_left_necessity_solution_left = a + m * hgcrt_mod_right_necessity_solution_left) /\ (exists hgcrt_mod_left_necessity_solution_right hgcrt_mod_right_necessity_solution_right. x + n * hgcrt_mod_left_necessity_solution_right = b + n * hgcrt_mod_right_necessity_solution_right))) -> (exists hgcrt_mod_left_necessity_compatibility hgcrt_mod_right_necessity_compatibility. a + g * hgcrt_mod_left_necessity_compatibility = b + g * hgcrt_mod_right_necessity_compatibility)
Complete replay recipe: dependency imports + authored proof
pa prove forall g m n a b x. ((((exists hag_left_factor_crt_necessity. m = g * hag_left_factor_crt_necessity) /\ (exists hag_right_factor_crt_necessity. n = g * hag_right_factor_crt_necessity)) /\ forall hag_divisor_crt_necessity. (exists hag_common_left_crt_necessity. m = hag_divisor_crt_necessity * hag_common_left_crt_necessity) -> (exists hag_common_right_crt_necessity. n = hag_divisor_crt_necessity * hag_common_right_crt_necessity) -> exists hag_greatest_factor_crt_necessity. g = hag_divisor_crt_necessity * hag_greatest_factor_crt_necessity)) -> (((exists hgcrt_mod_left_necessity_solution_left hgcrt_mod_right_necessity_solution_left. x + m * hgcrt_mod_left_necessity_solution_left = a + m * hgcrt_mod_right_necessity_solution_left) /\ (exists hgcrt_mod_left_necessity_solution_right hgcrt_mod_right_necessity_solution_right. x + n * hgcrt_mod_left_necessity_solution_right = b + n * hgcrt_mod_right_necessity_solution_right))) -> (exists hgcrt_mod_left_necessity_compatibility hgcrt_mod_right_necessity_compatibility. a + g * hgcrt_mod_left_necessity_compatibility = b + g * hgcrt_mod_right_necessity_compatibility)
use is_gcd_dvd_left
use is_gcd_dvd_right
use mod_eq_of_mod_eq_multiple
use mod_eq_symm
use mod_eq_trans
intro g
intro m
intro n
intro a
intro b
intro x
intro hg
intro hx
cases hx
have hgm : exists q. m = g * q
specialize is_gcd_dvd_left g
specialize is_gcd_dvd_left m
specialize is_gcd_dvd_left n
apply is_gcd_dvd_left
exact hg
have hgn : exists q. n = g * q
specialize is_gcd_dvd_right g
specialize is_gcd_dvd_right m
specialize is_gcd_dvd_right n
apply is_gcd_dvd_right
exact hg
have hxa : exists hgcrt_mod_left_necessity_x_a hgcrt_mod_right_necessity_x_a. x + g * hgcrt_mod_left_necessity_x_a = a + g * hgcrt_mod_right_necessity_x_a
specialize mod_eq_of_mod_eq_multiple g
specialize mod_eq_of_mod_eq_multiple m
specialize mod_eq_of_mod_eq_multiple x
specialize mod_eq_of_mod_eq_multiple a
apply mod_eq_of_mod_eq_multiple
exact hgm
exact hx_left
have hxb : exists hgcrt_mod_left_necessity_x_b hgcrt_mod_right_necessity_x_b. x + g * hgcrt_mod_left_necessity_x_b = b + g * hgcrt_mod_right_necessity_x_b
specialize mod_eq_of_mod_eq_multiple g
specialize mod_eq_of_mod_eq_multiple n
specialize mod_eq_of_mod_eq_multiple x
specialize mod_eq_of_mod_eq_multiple b
apply mod_eq_of_mod_eq_multiple
exact hgn
exact hx_right
have hax : exists hgcrt_mod_left_necessity_a_x hgcrt_mod_right_necessity_a_x. a + g * hgcrt_mod_left_necessity_a_x = x + g * hgcrt_mod_right_necessity_a_x
specialize mod_eq_symm g
specialize mod_eq_symm x
specialize mod_eq_symm a
apply mod_eq_symm
exact hxa
specialize mod_eq_trans g
specialize mod_eq_trans a
specialize mod_eq_trans x
specialize mod_eq_trans b
apply mod_eq_trans
exact hax
exact hxb
qed
- Occurrences
- 518
- Distinct objects
- 388
- Reused references
- 22
- Depth
- 34
- Cuts
- 14
- Certificate SHA-256
aa5633a5e767…
crt_incompatibility_obstructs_solutionCrt incompatibility obstructs solution
Congruence & CRT
checked
Failure of gcd compatibility constructively refutes every common CRT solution.
Exact expanded PA statement
forall g m n a b. ((((exists hag_left_factor_crt_obstruction. m = g * hag_left_factor_crt_obstruction) /\ (exists hag_right_factor_crt_obstruction. n = g * hag_right_factor_crt_obstruction)) /\ forall hag_divisor_crt_obstruction. (exists hag_common_left_crt_obstruction. m = hag_divisor_crt_obstruction * hag_common_left_crt_obstruction) -> (exists hag_common_right_crt_obstruction. n = hag_divisor_crt_obstruction * hag_common_right_crt_obstruction) -> exists hag_greatest_factor_crt_obstruction. g = hag_divisor_crt_obstruction * hag_greatest_factor_crt_obstruction)) -> ~(exists hgcrt_mod_left_obstruction_compatibility hgcrt_mod_right_obstruction_compatibility. a + g * hgcrt_mod_left_obstruction_compatibility = b + g * hgcrt_mod_right_obstruction_compatibility) -> ~(exists x. (((exists hgcrt_mod_left_obstruction_solution_left hgcrt_mod_right_obstruction_solution_left. x + m * hgcrt_mod_left_obstruction_solution_left = a + m * hgcrt_mod_right_obstruction_solution_left) /\ (exists hgcrt_mod_left_obstruction_solution_right hgcrt_mod_right_obstruction_solution_right. x + n * hgcrt_mod_left_obstruction_solution_right = b + n * hgcrt_mod_right_obstruction_solution_right))))
Complete replay recipe: dependency imports + authored proof
pa prove forall g m n a b. ((((exists hag_left_factor_crt_obstruction. m = g * hag_left_factor_crt_obstruction) /\ (exists hag_right_factor_crt_obstruction. n = g * hag_right_factor_crt_obstruction)) /\ forall hag_divisor_crt_obstruction. (exists hag_common_left_crt_obstruction. m = hag_divisor_crt_obstruction * hag_common_left_crt_obstruction) -> (exists hag_common_right_crt_obstruction. n = hag_divisor_crt_obstruction * hag_common_right_crt_obstruction) -> exists hag_greatest_factor_crt_obstruction. g = hag_divisor_crt_obstruction * hag_greatest_factor_crt_obstruction)) -> ~(exists hgcrt_mod_left_obstruction_compatibility hgcrt_mod_right_obstruction_compatibility. a + g * hgcrt_mod_left_obstruction_compatibility = b + g * hgcrt_mod_right_obstruction_compatibility) -> ~(exists x. (((exists hgcrt_mod_left_obstruction_solution_left hgcrt_mod_right_obstruction_solution_left. x + m * hgcrt_mod_left_obstruction_solution_left = a + m * hgcrt_mod_right_obstruction_solution_left) /\ (exists hgcrt_mod_left_obstruction_solution_right hgcrt_mod_right_obstruction_solution_right. x + n * hgcrt_mod_left_obstruction_solution_right = b + n * hgcrt_mod_right_obstruction_solution_right))))
use crt_common_solution_implies_gcd_compatible
intro g
intro m
intro n
intro a
intro b
intro hg
intro hnot
intro hsolution
cases hsolution
apply hnot
specialize crt_common_solution_implies_gcd_compatible g
specialize crt_common_solution_implies_gcd_compatible m
specialize crt_common_solution_implies_gcd_compatible n
specialize crt_common_solution_implies_gcd_compatible a
specialize crt_common_solution_implies_gcd_compatible b
specialize crt_common_solution_implies_gcd_compatible x
apply crt_common_solution_implies_gcd_compatible
exact hg
exact hsolution_witness
qed
- Occurrences
- 560
- Distinct objects
- 430
- Reused references
- 22
- Depth
- 35
- Cuts
- 15
- Certificate SHA-256
3e304725fcdf…
is_gcd_quotients_coprime_nonzeroIs gcd quotients coprime nonzero
Congruence & CRT
checked
Nonzero gcd cofactors are coprime by the greatest-divisor property.
Exact expanded PA statement
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)
Complete replay recipe: dependency imports + authored proof
pa prove 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)
use is_gcd_greatest
use mul_assoc
use mul_one
use mul_left_cancel_nonzero
use divisor_one
intro g
intro m
intro n
intro M
intro N
intro hg
intro hg0
intro hm
intro hn
intro d
intro hdM
intro hdN
cases hdM
cases hdN
have hdm : exists u. m = (g * d) * u
exists x
trans g * M
exact hm
trans g * (d * x)
congr
refl
exact hdM_witness
symm
apply mul_assoc
have hdn : exists v. n = (g * d) * v
exists x1
trans g * N
exact hn
trans g * (d * x1)
congr
refl
exact hdN_witness
symm
apply mul_assoc
have hdg : exists w. g = (g * d) * w
specialize is_gcd_greatest g
specialize is_gcd_greatest m
specialize is_gcd_greatest n
specialize is_gcd_greatest (g * d)
apply is_gcd_greatest
exact hg
exact hdm
exact hdn
cases hdg
have hnorm : g = g * (d * x2)
trans (g * d) * x2
exact hdg_witness
apply mul_assoc
have hone : 1 = d * x2
specialize mul_left_cancel_nonzero g
specialize mul_left_cancel_nonzero 1
specialize mul_left_cancel_nonzero (d * x2)
apply mul_left_cancel_nonzero
exact hg0
trans g
apply mul_one
exact hnorm
specialize divisor_one d
apply divisor_one
exists x2
exact hone
qed
- Occurrences
- 660
- Distinct objects
- 562
- Reused references
- 34
- Depth
- 33
- Cuts
- 19
- Certificate SHA-256
7c3914650910…
mod_eq_common_remainder_decompositionMod eq common remainder decomposition
Congruence & CRT
checked
Compatible residues share one bounded remainder modulo their gcd.
Exact expanded PA statement
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))
Complete replay recipe: dependency imports + authored proof
pa prove 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))
use division_remainder_exists
use remainder_decomposition_to_mod_eq
use mod_eq_symm
use mod_eq_trans
use mod_eq_to_remainder_decomposition
use mul_comm
intro g
intro a
intro b
intro hg0
intro hab
have hdiva : exists q r. a = g * q + r /\ exists h. h + S r = g
specialize division_remainder_exists g
specialize division_remainder_exists a
apply division_remainder_exists
exact hg0
cases hdiva
cases hdiva_witness
cases hdiva_witness_witness
have haqr : a = x * g + x1
trans g * x + x1
exact hdiva_witness_witness_left
congr
apply mul_comm
refl
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
specialize remainder_decomposition_to_mod_eq g
specialize remainder_decomposition_to_mod_eq a
specialize remainder_decomposition_to_mod_eq x
specialize remainder_decomposition_to_mod_eq x1
apply remainder_decomposition_to_mod_eq
exact haqr
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
specialize mod_eq_symm g
specialize mod_eq_symm a
specialize mod_eq_symm b
apply mod_eq_symm
exact hab
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
specialize mod_eq_trans g
specialize mod_eq_trans b
specialize mod_eq_trans a
specialize mod_eq_trans x1
apply mod_eq_trans
exact hba
exact har
have hqb : exists q. b = q * g + x1
specialize mod_eq_to_remainder_decomposition g
specialize mod_eq_to_remainder_decomposition b
specialize mod_eq_to_remainder_decomposition x1
apply mod_eq_to_remainder_decomposition
exact hg0
exact hdiva_witness_witness_right
exact hbr
cases hqb
exists x
exists x2
exists x1
split
split
exact hdiva_witness_witness_left
trans x2 * g + x1
exact hqb_witness
congr
apply mul_comm
refl
exact hdiva_witness_witness_right
qed
- Occurrences
- 2,894
- Distinct objects
- 1,075
- Reused references
- 64
- Depth
- 69
- Cuts
- 83
- Certificate SHA-256
fadb87563251…
crt_scaled_common_remainder_liftCrt scaled common remainder lift
Congruence & CRT
checked
A coprime cofactor CRT solution scales and lifts through a common remainder.
Exact expanded PA statement
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)))
Complete replay recipe: dependency imports + authored proof
pa prove 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)))
use binary_crt
use mod_eq_scale
use mod_eq_refl
use mod_eq_add
intro g
intro m
intro n
intro a
intro b
intro M
intro N
intro A
intro B
intro r
intro hm
intro hn
intro ha
intro hb
intro hM
intro hN
intro hcop
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)))
specialize binary_crt M
specialize binary_crt N
specialize binary_crt A
specialize binary_crt B
apply binary_crt
exact hM
exact hN
exact hcop
cases hcrt
cases hcrt_witness
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
specialize mod_eq_scale g
specialize mod_eq_scale M
specialize mod_eq_scale x
specialize mod_eq_scale A
apply mod_eq_scale
exact hcrt_witness_left
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
specialize mod_eq_scale g
specialize mod_eq_scale N
specialize mod_eq_scale x
specialize mod_eq_scale B
apply mod_eq_scale
exact hcrt_witness_right
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
specialize mod_eq_refl (g * M)
specialize mod_eq_refl r
apply mod_eq_refl
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
specialize mod_eq_refl (g * N)
specialize mod_eq_refl r
apply mod_eq_refl
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
specialize mod_eq_add (g * M)
specialize mod_eq_add (g * x)
specialize mod_eq_add (g * A)
specialize mod_eq_add r
specialize mod_eq_add r
apply mod_eq_add
exact hls
exact hlr
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
specialize mod_eq_add (g * N)
specialize mod_eq_add (g * x)
specialize mod_eq_add (g * B)
specialize mod_eq_add r
specialize mod_eq_add r
apply mod_eq_add
exact hrs
exact hrr
exists g * x + r
split
rewrite <- hm at hll
rewrite <- hm at hll
rewrite <- ha at hll
exact hll
rewrite <- hn at hrl
rewrite <- hn at hrl
rewrite <- hb at hrl
exact hrl
qed
- Occurrences
- 5,745
- Distinct objects
- 2,062
- Reused references
- 113
- Depth
- 52
- Cuts
- 163
- Certificate SHA-256
983f84cbd94a…
generalized_binary_crt_sufficient_nonzeroGeneralized binary crt sufficient nonzero
Congruence & CRT
checked
Gcd compatibility is sufficient for a common solution when both moduli are nonzero.
Exact expanded PA statement
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)))
Complete replay recipe: dependency imports + authored proof
pa prove 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)))
use is_gcd_dvd_left
use is_gcd_dvd_right
use mul_zero_left
use is_gcd_quotients_coprime_nonzero
use mod_eq_common_remainder_decomposition
use crt_scaled_common_remainder_lift
intro g
intro m
intro n
intro a
intro b
intro hm0
intro hn0
intro hgcd
intro hcompat
have hmfactor : exists M. m = g * M
specialize is_gcd_dvd_left g
specialize is_gcd_dvd_left m
specialize is_gcd_dvd_left n
apply is_gcd_dvd_left
exact hgcd
have hnfactor : exists N. n = g * N
specialize is_gcd_dvd_right g
specialize is_gcd_dvd_right m
specialize is_gcd_dvd_right n
apply is_gcd_dvd_right
exact hgcd
cases hmfactor
cases hnfactor
have hg0 : ~(g = 0)
intro hgz
apply hm0
trans g * x
exact hmfactor_witness
rewrite hgz
apply mul_zero_left
have hM0 : ~(x = 0)
intro hx0
apply hm0
trans g * x
exact hmfactor_witness
rewrite hx0
apply PA5
have hN0 : ~(x1 = 0)
intro hx10
apply hn0
trans g * x1
exact hnfactor_witness
rewrite hx10
apply PA5
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
specialize is_gcd_quotients_coprime_nonzero g
specialize is_gcd_quotients_coprime_nonzero m
specialize is_gcd_quotients_coprime_nonzero n
specialize is_gcd_quotients_coprime_nonzero x
specialize is_gcd_quotients_coprime_nonzero x1
apply is_gcd_quotients_coprime_nonzero
exact hgcd
exact hg0
exact hmfactor_witness
exact hnfactor_witness
have hrem : exists A B r. ((a = g * A + r /\ b = g * B + r) /\ exists h. h + S r = g)
specialize mod_eq_common_remainder_decomposition g
specialize mod_eq_common_remainder_decomposition a
specialize mod_eq_common_remainder_decomposition b
apply mod_eq_common_remainder_decomposition
exact hg0
exact hcompat
cases hrem
cases hrem_witness
cases hrem_witness_witness
cases hrem_witness_witness_witness
cases hrem_witness_witness_witness_left
specialize crt_scaled_common_remainder_lift g
specialize crt_scaled_common_remainder_lift m
specialize crt_scaled_common_remainder_lift n
specialize crt_scaled_common_remainder_lift a
specialize crt_scaled_common_remainder_lift b
specialize crt_scaled_common_remainder_lift x
specialize crt_scaled_common_remainder_lift x1
specialize crt_scaled_common_remainder_lift x2
specialize crt_scaled_common_remainder_lift x3
specialize crt_scaled_common_remainder_lift x4
apply crt_scaled_common_remainder_lift
exact hmfactor_witness
exact hnfactor_witness
exact hrem_witness_witness_witness_left_left
exact hrem_witness_witness_witness_left_right
exact hM0
exact hN0
exact hcop
qed
- Occurrences
- 9,482
- Distinct objects
- 3,147
- Reused references
- 156
- Depth
- 74
- Cuts
- 271
- Certificate SHA-256
632ca3c58954…
generalized_binary_crt_sufficient_zero_leftGeneralized binary crt sufficient zero left
Congruence & CRT
checked
If the left modulus is zero, gcd compatibility constructs a solution by choosing the left residue.
Exact expanded PA statement
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)))
Complete replay recipe: dependency imports + authored proof
pa prove 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)))
use is_gcd_symm
use is_gcd_zero_right
use is_gcd_unique
use mod_eq_refl
intro g
intro n
intro a
intro b
intro hg
intro hab
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)
specialize is_gcd_symm g
specialize is_gcd_symm 0
specialize is_gcd_symm n
apply is_gcd_symm
exact hg
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)
specialize is_gcd_zero_right n
exact is_gcd_zero_right
have hgn : g = n
specialize is_gcd_unique g
specialize is_gcd_unique n
specialize is_gcd_unique n
specialize is_gcd_unique 0
apply is_gcd_unique
exact hsym
exact hn
rewrite hgn at hab
rewrite hgn at hab
exists a
split
specialize mod_eq_refl 0
specialize mod_eq_refl a
exact mod_eq_refl
exact hab
qed
- Occurrences
- 834
- Distinct objects
- 682
- Reused references
- 36
- Depth
- 37
- Cuts
- 28
- Certificate SHA-256
a45dc68d2381…
generalized_binary_crt_sufficient_zero_rightGeneralized binary crt sufficient zero right
Congruence & CRT
checked
If the right modulus is zero, gcd compatibility constructs a solution by choosing the right residue.
Exact expanded PA statement
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)))
Complete replay recipe: dependency imports + authored proof
pa prove 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)))
use is_gcd_zero_right
use is_gcd_unique
use mod_eq_symm
use mod_eq_refl
intro g
intro m
intro a
intro b
intro hg
intro hab
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)
specialize is_gcd_zero_right m
exact is_gcd_zero_right
have hgm : g = m
specialize is_gcd_unique g
specialize is_gcd_unique m
specialize is_gcd_unique m
specialize is_gcd_unique 0
apply is_gcd_unique
exact hg
exact hm
rewrite hgm at hab
rewrite hgm at hab
exists b
split
specialize mod_eq_symm m
specialize mod_eq_symm a
specialize mod_eq_symm b
apply mod_eq_symm
exact hab
specialize mod_eq_refl 0
specialize mod_eq_refl b
exact mod_eq_refl
qed
- Occurrences
- 805
- Distinct objects
- 653
- Reused references
- 36
- Depth
- 36
- Cuts
- 28
- Certificate SHA-256
015740ead687…
generalized_binary_crt_sufficientGeneralized binary crt sufficient
Congruence & CRT
checked
Gcd compatibility constructs a common solution for arbitrary natural moduli, including zero.
Exact expanded PA statement
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)))
Complete replay recipe: dependency imports + authored proof
pa prove 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)))
use eq_decidable
use generalized_binary_crt_sufficient_zero_left
use generalized_binary_crt_sufficient_zero_right
use generalized_binary_crt_sufficient_nonzero
intro g
intro m
intro n
intro a
intro b
intro hg
intro hab
have hmzero : m = 0 \/ ~(m = 0)
specialize eq_decidable m
specialize eq_decidable 0
exact eq_decidable
cases hmzero
rewrite hmzero_left at hg
rewrite hmzero_left at hg
rewrite hmzero_left
rewrite hmzero_left
specialize generalized_binary_crt_sufficient_zero_left g
specialize generalized_binary_crt_sufficient_zero_left n
specialize generalized_binary_crt_sufficient_zero_left a
specialize generalized_binary_crt_sufficient_zero_left b
apply generalized_binary_crt_sufficient_zero_left
exact hg
exact hab
have hnzero : n = 0 \/ ~(n = 0)
specialize eq_decidable n
specialize eq_decidable 0
exact eq_decidable
cases hnzero
rewrite hnzero_left at hg
rewrite hnzero_left at hg
rewrite hnzero_left
rewrite hnzero_left
specialize generalized_binary_crt_sufficient_zero_right g
specialize generalized_binary_crt_sufficient_zero_right m
specialize generalized_binary_crt_sufficient_zero_right a
specialize generalized_binary_crt_sufficient_zero_right b
apply generalized_binary_crt_sufficient_zero_right
exact hg
exact hab
specialize generalized_binary_crt_sufficient_nonzero g
specialize generalized_binary_crt_sufficient_nonzero m
specialize generalized_binary_crt_sufficient_nonzero n
specialize generalized_binary_crt_sufficient_nonzero a
specialize generalized_binary_crt_sufficient_nonzero b
apply generalized_binary_crt_sufficient_nonzero
exact hmzero_right
exact hnzero_right
exact hg
exact hab
qed
- Occurrences
- 11,240
- Distinct objects
- 3,495
- Reused references
- 168
- Depth
- 78
- Cuts
- 331
- Certificate SHA-256
f22596043fc0…
generalized_binary_crt_solvable_iffGeneralized binary crt solvable iff
Congruence & CRT
checked
For arbitrary natural moduli, a binary CRT system is solvable exactly when its residues are congruent modulo a relational gcd.
Exact expanded PA statement
forall g m n a b. ((((exists hag_left_factor_total_iff_gcd. m = g * hag_left_factor_total_iff_gcd) /\ (exists hag_right_factor_total_iff_gcd. n = g * hag_right_factor_total_iff_gcd)) /\ forall hag_divisor_total_iff_gcd. (exists hag_common_left_total_iff_gcd. m = hag_divisor_total_iff_gcd * hag_common_left_total_iff_gcd) -> (exists hag_common_right_total_iff_gcd. n = hag_divisor_total_iff_gcd * hag_common_right_total_iff_gcd) -> exists hag_greatest_factor_total_iff_gcd. g = hag_divisor_total_iff_gcd * hag_greatest_factor_total_iff_gcd)) -> (((exists x. (((exists hgcrt_mod_left_total_iff_forward_solution_left hgcrt_mod_right_total_iff_forward_solution_left. x + m * hgcrt_mod_left_total_iff_forward_solution_left = a + m * hgcrt_mod_right_total_iff_forward_solution_left) /\ (exists hgcrt_mod_left_total_iff_forward_solution_right hgcrt_mod_right_total_iff_forward_solution_right. x + n * hgcrt_mod_left_total_iff_forward_solution_right = b + n * hgcrt_mod_right_total_iff_forward_solution_right)))) -> (exists hgcrt_mod_left_total_iff_forward_compatibility hgcrt_mod_right_total_iff_forward_compatibility. a + g * hgcrt_mod_left_total_iff_forward_compatibility = b + g * hgcrt_mod_right_total_iff_forward_compatibility)) /\ ((exists hgcrt_mod_left_total_iff_reverse_compatibility hgcrt_mod_right_total_iff_reverse_compatibility. a + g * hgcrt_mod_left_total_iff_reverse_compatibility = b + g * hgcrt_mod_right_total_iff_reverse_compatibility) -> exists x. (((exists hgcrt_mod_left_total_iff_reverse_solution_left hgcrt_mod_right_total_iff_reverse_solution_left. x + m * hgcrt_mod_left_total_iff_reverse_solution_left = a + m * hgcrt_mod_right_total_iff_reverse_solution_left) /\ (exists hgcrt_mod_left_total_iff_reverse_solution_right hgcrt_mod_right_total_iff_reverse_solution_right. x + n * hgcrt_mod_left_total_iff_reverse_solution_right = b + n * hgcrt_mod_right_total_iff_reverse_solution_right)))))
Complete replay recipe: dependency imports + authored proof
pa prove forall g m n a b. ((((exists hag_left_factor_total_iff_gcd. m = g * hag_left_factor_total_iff_gcd) /\ (exists hag_right_factor_total_iff_gcd. n = g * hag_right_factor_total_iff_gcd)) /\ forall hag_divisor_total_iff_gcd. (exists hag_common_left_total_iff_gcd. m = hag_divisor_total_iff_gcd * hag_common_left_total_iff_gcd) -> (exists hag_common_right_total_iff_gcd. n = hag_divisor_total_iff_gcd * hag_common_right_total_iff_gcd) -> exists hag_greatest_factor_total_iff_gcd. g = hag_divisor_total_iff_gcd * hag_greatest_factor_total_iff_gcd)) -> (((exists x. (((exists hgcrt_mod_left_total_iff_forward_solution_left hgcrt_mod_right_total_iff_forward_solution_left. x + m * hgcrt_mod_left_total_iff_forward_solution_left = a + m * hgcrt_mod_right_total_iff_forward_solution_left) /\ (exists hgcrt_mod_left_total_iff_forward_solution_right hgcrt_mod_right_total_iff_forward_solution_right. x + n * hgcrt_mod_left_total_iff_forward_solution_right = b + n * hgcrt_mod_right_total_iff_forward_solution_right)))) -> (exists hgcrt_mod_left_total_iff_forward_compatibility hgcrt_mod_right_total_iff_forward_compatibility. a + g * hgcrt_mod_left_total_iff_forward_compatibility = b + g * hgcrt_mod_right_total_iff_forward_compatibility)) /\ ((exists hgcrt_mod_left_total_iff_reverse_compatibility hgcrt_mod_right_total_iff_reverse_compatibility. a + g * hgcrt_mod_left_total_iff_reverse_compatibility = b + g * hgcrt_mod_right_total_iff_reverse_compatibility) -> exists x. (((exists hgcrt_mod_left_total_iff_reverse_solution_left hgcrt_mod_right_total_iff_reverse_solution_left. x + m * hgcrt_mod_left_total_iff_reverse_solution_left = a + m * hgcrt_mod_right_total_iff_reverse_solution_left) /\ (exists hgcrt_mod_left_total_iff_reverse_solution_right hgcrt_mod_right_total_iff_reverse_solution_right. x + n * hgcrt_mod_left_total_iff_reverse_solution_right = b + n * hgcrt_mod_right_total_iff_reverse_solution_right)))))
use crt_common_solution_implies_gcd_compatible
use generalized_binary_crt_sufficient
intro g
intro m
intro n
intro a
intro b
intro hg
split
intro hsolution
cases hsolution
specialize crt_common_solution_implies_gcd_compatible g
specialize crt_common_solution_implies_gcd_compatible m
specialize crt_common_solution_implies_gcd_compatible n
specialize crt_common_solution_implies_gcd_compatible a
specialize crt_common_solution_implies_gcd_compatible b
specialize crt_common_solution_implies_gcd_compatible x
apply crt_common_solution_implies_gcd_compatible
exact hg
exact hsolution_witness
intro hcompat
specialize generalized_binary_crt_sufficient g
specialize generalized_binary_crt_sufficient m
specialize generalized_binary_crt_sufficient n
specialize generalized_binary_crt_sufficient a
specialize generalized_binary_crt_sufficient b
apply generalized_binary_crt_sufficient
exact hg
exact hcompat
qed
- Occurrences
- 11,825
- Distinct objects
- 3,658
- Reused references
- 173
- Depth
- 80
- Cuts
- 347
- Certificate SHA-256
f3767085f631…
mod_eq_ordered_gap_multipleMod eq ordered gap multiple
Congruence & CRT
checked
The directed gap between two congruent naturals is a multiple of the modulus.
Exact expanded PA statement
forall d k x y. k + x = y -> (exists hgcrt_mod_left_ordered_gap_assumption hgcrt_mod_right_ordered_gap_assumption. x + d * hgcrt_mod_left_ordered_gap_assumption = y + d * hgcrt_mod_right_ordered_gap_assumption) -> (exists hgcrt_divides_factor_ordered_gap_result. k = d * hgcrt_divides_factor_ordered_gap_result)
Complete replay recipe: dependency imports + authored proof
pa prove forall d k x y. k + x = y -> (exists hgcrt_mod_left_ordered_gap_assumption hgcrt_mod_right_ordered_gap_assumption. x + d * hgcrt_mod_left_ordered_gap_assumption = y + d * hgcrt_mod_right_ordered_gap_assumption) -> (exists hgcrt_divides_factor_ordered_gap_result. k = d * hgcrt_divides_factor_ordered_gap_result)
use add_comm
use add_assoc
use add_left_cancel
use factor_difference
intro d
intro k
intro x
intro y
intro hgap
intro hmod
cases hmod
cases hmod_witness
rewrite <- hgap at hmod_witness_witness
have hcancel : d * x1 = k + d * x2
specialize add_left_cancel x
specialize add_left_cancel (d * x1)
specialize add_left_cancel (k + d * x2)
apply add_left_cancel
trans (k + x) + d * x2
exact hmod_witness_witness
trans (x + k) + d * x2
congr
apply add_comm
refl
apply add_assoc
have hfactor : d * x1 = d * x2 + k
trans k + d * x2
exact hcancel
apply add_comm
specialize factor_difference d
specialize factor_difference x1
specialize factor_difference x2
specialize factor_difference k
apply factor_difference
exact hfactor
qed
- Occurrences
- 558
- Distinct objects
- 310
- Reused references
- 16
- Depth
- 30
- Cuts
- 17
- Certificate SHA-256
49758875c6ef…
mod_eq_lcm_mergeMod eq lcm merge
Congruence & CRT
checked
Congruence modulo both inputs merges to congruence modulo a relational lcm.
Exact expanded PA statement
forall l m n x y. ((((exists hlcm_left_factor_merge. l = m * hlcm_left_factor_merge) /\ (exists hlcm_right_factor_merge. l = n * hlcm_right_factor_merge)) /\ forall hlcm_common_merge. (exists hlcm_left_common_merge. hlcm_common_merge = m * hlcm_left_common_merge) -> (exists hlcm_right_common_merge. hlcm_common_merge = n * hlcm_right_common_merge) -> exists hlcm_least_factor_merge. hlcm_common_merge = l * hlcm_least_factor_merge)) -> (exists hgcrt_mod_left_merge_m hgcrt_mod_right_merge_m. x + m * hgcrt_mod_left_merge_m = y + m * hgcrt_mod_right_merge_m) -> (exists hgcrt_mod_left_merge_n hgcrt_mod_right_merge_n. x + n * hgcrt_mod_left_merge_n = y + n * hgcrt_mod_right_merge_n) -> (exists hgcrt_mod_left_merge_l hgcrt_mod_right_merge_l. x + l * hgcrt_mod_left_merge_l = y + l * hgcrt_mod_right_merge_l)
Complete replay recipe: dependency imports + authored proof
pa prove forall l m n x y. ((((exists hlcm_left_factor_merge. l = m * hlcm_left_factor_merge) /\ (exists hlcm_right_factor_merge. l = n * hlcm_right_factor_merge)) /\ forall hlcm_common_merge. (exists hlcm_left_common_merge. hlcm_common_merge = m * hlcm_left_common_merge) -> (exists hlcm_right_common_merge. hlcm_common_merge = n * hlcm_right_common_merge) -> exists hlcm_least_factor_merge. hlcm_common_merge = l * hlcm_least_factor_merge)) -> (exists hgcrt_mod_left_merge_m hgcrt_mod_right_merge_m. x + m * hgcrt_mod_left_merge_m = y + m * hgcrt_mod_right_merge_m) -> (exists hgcrt_mod_left_merge_n hgcrt_mod_right_merge_n. x + n * hgcrt_mod_left_merge_n = y + n * hgcrt_mod_right_merge_n) -> (exists hgcrt_mod_left_merge_l hgcrt_mod_right_merge_l. x + l * hgcrt_mod_left_merge_l = y + l * hgcrt_mod_right_merge_l)
use le_total
use mod_eq_symm
use mod_eq_ordered_gap_multiple
use is_lcm_least
use mul_comm
use remainder_decomposition_to_mod_eq
intro l
intro m
intro n
intro x
intro y
intro hl
intro hm
intro hn
have horder : x <= y \/ y <= x
specialize le_total x
specialize le_total y
exact le_total
cases horder
cases horder_left
have hmk : exists q. x1 = m * q
specialize mod_eq_ordered_gap_multiple m
specialize mod_eq_ordered_gap_multiple x1
specialize mod_eq_ordered_gap_multiple x
specialize mod_eq_ordered_gap_multiple y
apply mod_eq_ordered_gap_multiple
exact horder_left_witness
exact hm
have hnk : exists q. x1 = n * q
specialize mod_eq_ordered_gap_multiple n
specialize mod_eq_ordered_gap_multiple x1
specialize mod_eq_ordered_gap_multiple x
specialize mod_eq_ordered_gap_multiple y
apply mod_eq_ordered_gap_multiple
exact horder_left_witness
exact hn
have hlk : exists q. x1 = l * q
specialize is_lcm_least l
specialize is_lcm_least m
specialize is_lcm_least n
specialize is_lcm_least x1
apply is_lcm_least
exact hl
exact hmk
exact hnk
cases hlk
have hdecomp : y = x2 * l + x
trans x1 + x
symm
exact horder_left_witness
rewrite hlk_witness
congr
apply mul_comm
refl
have hyx : exists hgcrt_mod_left_merge_l_reverse hgcrt_mod_right_merge_l_reverse. y + l * hgcrt_mod_left_merge_l_reverse = x + l * hgcrt_mod_right_merge_l_reverse
specialize remainder_decomposition_to_mod_eq l
specialize remainder_decomposition_to_mod_eq y
specialize remainder_decomposition_to_mod_eq x2
specialize remainder_decomposition_to_mod_eq x
apply remainder_decomposition_to_mod_eq
exact hdecomp
specialize mod_eq_symm l
specialize mod_eq_symm y
specialize mod_eq_symm x
apply mod_eq_symm
exact hyx
cases horder_right
have hmyx : exists hgcrt_mod_left_merge_m_reverse hgcrt_mod_right_merge_m_reverse. y + m * hgcrt_mod_left_merge_m_reverse = x + m * hgcrt_mod_right_merge_m_reverse
specialize mod_eq_symm m
specialize mod_eq_symm x
specialize mod_eq_symm y
apply mod_eq_symm
exact hm
have hnyx : exists hgcrt_mod_left_merge_n_reverse hgcrt_mod_right_merge_n_reverse. y + n * hgcrt_mod_left_merge_n_reverse = x + n * hgcrt_mod_right_merge_n_reverse
specialize mod_eq_symm n
specialize mod_eq_symm x
specialize mod_eq_symm y
apply mod_eq_symm
exact hn
have hmk : exists q. x1 = m * q
specialize mod_eq_ordered_gap_multiple m
specialize mod_eq_ordered_gap_multiple x1
specialize mod_eq_ordered_gap_multiple y
specialize mod_eq_ordered_gap_multiple x
apply mod_eq_ordered_gap_multiple
exact horder_right_witness
exact hmyx
have hnk : exists q. x1 = n * q
specialize mod_eq_ordered_gap_multiple n
specialize mod_eq_ordered_gap_multiple x1
specialize mod_eq_ordered_gap_multiple y
specialize mod_eq_ordered_gap_multiple x
apply mod_eq_ordered_gap_multiple
exact horder_right_witness
exact hnyx
have hlk : exists q. x1 = l * q
specialize is_lcm_least l
specialize is_lcm_least m
specialize is_lcm_least n
specialize is_lcm_least x1
apply is_lcm_least
exact hl
exact hmk
exact hnk
cases hlk
have hdecomp : x = x2 * l + y
trans x1 + y
symm
exact horder_right_witness
rewrite hlk_witness
congr
apply mul_comm
refl
specialize remainder_decomposition_to_mod_eq l
specialize remainder_decomposition_to_mod_eq x
specialize remainder_decomposition_to_mod_eq x2
specialize remainder_decomposition_to_mod_eq y
apply remainder_decomposition_to_mod_eq
exact hdecomp
qed
- Occurrences
- 1,315
- Distinct objects
- 653
- Reused references
- 33
- Depth
- 33
- Cuts
- 39
- Certificate SHA-256
437802e4814c…
mod_eq_lcm_iff_pairMod eq lcm iff pair
Congruence & CRT
checked
Congruence modulo a relational lcm is equivalent to congruence modulo both inputs.
Exact expanded PA statement
forall l m n x y. ((((exists hlcm_left_factor_iff_pair. l = m * hlcm_left_factor_iff_pair) /\ (exists hlcm_right_factor_iff_pair. l = n * hlcm_right_factor_iff_pair)) /\ forall hlcm_common_iff_pair. (exists hlcm_left_common_iff_pair. hlcm_common_iff_pair = m * hlcm_left_common_iff_pair) -> (exists hlcm_right_common_iff_pair. hlcm_common_iff_pair = n * hlcm_right_common_iff_pair) -> exists hlcm_least_factor_iff_pair. hlcm_common_iff_pair = l * hlcm_least_factor_iff_pair)) -> (((exists hgcrt_mod_left_iff_l_forward hgcrt_mod_right_iff_l_forward. x + l * hgcrt_mod_left_iff_l_forward = y + l * hgcrt_mod_right_iff_l_forward) -> ((exists hgcrt_mod_left_iff_m_forward hgcrt_mod_right_iff_m_forward. x + m * hgcrt_mod_left_iff_m_forward = y + m * hgcrt_mod_right_iff_m_forward) /\ (exists hgcrt_mod_left_iff_n_forward hgcrt_mod_right_iff_n_forward. x + n * hgcrt_mod_left_iff_n_forward = y + n * hgcrt_mod_right_iff_n_forward))) /\ (((exists hgcrt_mod_left_iff_m_reverse hgcrt_mod_right_iff_m_reverse. x + m * hgcrt_mod_left_iff_m_reverse = y + m * hgcrt_mod_right_iff_m_reverse) /\ (exists hgcrt_mod_left_iff_n_reverse hgcrt_mod_right_iff_n_reverse. x + n * hgcrt_mod_left_iff_n_reverse = y + n * hgcrt_mod_right_iff_n_reverse)) -> (exists hgcrt_mod_left_iff_l_reverse hgcrt_mod_right_iff_l_reverse. x + l * hgcrt_mod_left_iff_l_reverse = y + l * hgcrt_mod_right_iff_l_reverse)))
Complete replay recipe: dependency imports + authored proof
pa prove forall l m n x y. ((((exists hlcm_left_factor_iff_pair. l = m * hlcm_left_factor_iff_pair) /\ (exists hlcm_right_factor_iff_pair. l = n * hlcm_right_factor_iff_pair)) /\ forall hlcm_common_iff_pair. (exists hlcm_left_common_iff_pair. hlcm_common_iff_pair = m * hlcm_left_common_iff_pair) -> (exists hlcm_right_common_iff_pair. hlcm_common_iff_pair = n * hlcm_right_common_iff_pair) -> exists hlcm_least_factor_iff_pair. hlcm_common_iff_pair = l * hlcm_least_factor_iff_pair)) -> (((exists hgcrt_mod_left_iff_l_forward hgcrt_mod_right_iff_l_forward. x + l * hgcrt_mod_left_iff_l_forward = y + l * hgcrt_mod_right_iff_l_forward) -> ((exists hgcrt_mod_left_iff_m_forward hgcrt_mod_right_iff_m_forward. x + m * hgcrt_mod_left_iff_m_forward = y + m * hgcrt_mod_right_iff_m_forward) /\ (exists hgcrt_mod_left_iff_n_forward hgcrt_mod_right_iff_n_forward. x + n * hgcrt_mod_left_iff_n_forward = y + n * hgcrt_mod_right_iff_n_forward))) /\ (((exists hgcrt_mod_left_iff_m_reverse hgcrt_mod_right_iff_m_reverse. x + m * hgcrt_mod_left_iff_m_reverse = y + m * hgcrt_mod_right_iff_m_reverse) /\ (exists hgcrt_mod_left_iff_n_reverse hgcrt_mod_right_iff_n_reverse. x + n * hgcrt_mod_left_iff_n_reverse = y + n * hgcrt_mod_right_iff_n_reverse)) -> (exists hgcrt_mod_left_iff_l_reverse hgcrt_mod_right_iff_l_reverse. x + l * hgcrt_mod_left_iff_l_reverse = y + l * hgcrt_mod_right_iff_l_reverse)))
use is_lcm_multiple_left
use is_lcm_multiple_right
use mod_eq_of_mod_eq_multiple
use mod_eq_lcm_merge
intro l
intro m
intro n
intro x
intro y
intro hl
split
intro hxy
have hml : exists q. l = m * q
specialize is_lcm_multiple_left l
specialize is_lcm_multiple_left m
specialize is_lcm_multiple_left n
apply is_lcm_multiple_left
exact hl
have hnl : exists q. l = n * q
specialize is_lcm_multiple_right l
specialize is_lcm_multiple_right m
specialize is_lcm_multiple_right n
apply is_lcm_multiple_right
exact hl
split
specialize mod_eq_of_mod_eq_multiple m
specialize mod_eq_of_mod_eq_multiple l
specialize mod_eq_of_mod_eq_multiple x
specialize mod_eq_of_mod_eq_multiple y
apply mod_eq_of_mod_eq_multiple
exact hml
exact hxy
specialize mod_eq_of_mod_eq_multiple n
specialize mod_eq_of_mod_eq_multiple l
specialize mod_eq_of_mod_eq_multiple x
specialize mod_eq_of_mod_eq_multiple y
apply mod_eq_of_mod_eq_multiple
exact hnl
exact hxy
intro hpair
cases hpair
specialize mod_eq_lcm_merge l
specialize mod_eq_lcm_merge m
specialize mod_eq_lcm_merge n
specialize mod_eq_lcm_merge x
specialize mod_eq_lcm_merge y
apply mod_eq_lcm_merge
exact hl
exact hpair_left
exact hpair_right
qed
- Occurrences
- 1,570
- Distinct objects
- 864
- Reused references
- 45
- Depth
- 37
- Cuts
- 46
- Certificate SHA-256
8e89d2f01135…
crt_solution_class_iff_lcmCrt solution class iff lcm
Congruence & CRT
checked
Relative to one fixed common solution, all solutions are exactly its relational-lcm congruence class.
Exact expanded PA statement
forall l m n a b x y. ((((exists hlcm_left_factor_solution_class. l = m * hlcm_left_factor_solution_class) /\ (exists hlcm_right_factor_solution_class. l = n * hlcm_right_factor_solution_class)) /\ forall hlcm_common_solution_class. (exists hlcm_left_common_solution_class. hlcm_common_solution_class = m * hlcm_left_common_solution_class) -> (exists hlcm_right_common_solution_class. hlcm_common_solution_class = n * hlcm_right_common_solution_class) -> exists hlcm_least_factor_solution_class. hlcm_common_solution_class = l * hlcm_least_factor_solution_class)) -> (((exists hgcrt_mod_left_class_fixed_left hgcrt_mod_right_class_fixed_left. x + m * hgcrt_mod_left_class_fixed_left = a + m * hgcrt_mod_right_class_fixed_left) /\ (exists hgcrt_mod_left_class_fixed_right hgcrt_mod_right_class_fixed_right. x + n * hgcrt_mod_left_class_fixed_right = b + n * hgcrt_mod_right_class_fixed_right))) -> (((((exists hgcrt_mod_left_class_candidate_forward_left hgcrt_mod_right_class_candidate_forward_left. y + m * hgcrt_mod_left_class_candidate_forward_left = a + m * hgcrt_mod_right_class_candidate_forward_left) /\ (exists hgcrt_mod_left_class_candidate_forward_right hgcrt_mod_right_class_candidate_forward_right. y + n * hgcrt_mod_left_class_candidate_forward_right = b + n * hgcrt_mod_right_class_candidate_forward_right))) -> (exists hgcrt_mod_left_class_l_forward hgcrt_mod_right_class_l_forward. y + l * hgcrt_mod_left_class_l_forward = x + l * hgcrt_mod_right_class_l_forward)) /\ ((exists hgcrt_mod_left_class_l_reverse hgcrt_mod_right_class_l_reverse. y + l * hgcrt_mod_left_class_l_reverse = x + l * hgcrt_mod_right_class_l_reverse) -> (((exists hgcrt_mod_left_class_candidate_reverse_left hgcrt_mod_right_class_candidate_reverse_left. y + m * hgcrt_mod_left_class_candidate_reverse_left = a + m * hgcrt_mod_right_class_candidate_reverse_left) /\ (exists hgcrt_mod_left_class_candidate_reverse_right hgcrt_mod_right_class_candidate_reverse_right. y + n * hgcrt_mod_left_class_candidate_reverse_right = b + n * hgcrt_mod_right_class_candidate_reverse_right)))))
Complete replay recipe: dependency imports + authored proof
pa prove forall l m n a b x y. ((((exists hlcm_left_factor_solution_class. l = m * hlcm_left_factor_solution_class) /\ (exists hlcm_right_factor_solution_class. l = n * hlcm_right_factor_solution_class)) /\ forall hlcm_common_solution_class. (exists hlcm_left_common_solution_class. hlcm_common_solution_class = m * hlcm_left_common_solution_class) -> (exists hlcm_right_common_solution_class. hlcm_common_solution_class = n * hlcm_right_common_solution_class) -> exists hlcm_least_factor_solution_class. hlcm_common_solution_class = l * hlcm_least_factor_solution_class)) -> (((exists hgcrt_mod_left_class_fixed_left hgcrt_mod_right_class_fixed_left. x + m * hgcrt_mod_left_class_fixed_left = a + m * hgcrt_mod_right_class_fixed_left) /\ (exists hgcrt_mod_left_class_fixed_right hgcrt_mod_right_class_fixed_right. x + n * hgcrt_mod_left_class_fixed_right = b + n * hgcrt_mod_right_class_fixed_right))) -> (((((exists hgcrt_mod_left_class_candidate_forward_left hgcrt_mod_right_class_candidate_forward_left. y + m * hgcrt_mod_left_class_candidate_forward_left = a + m * hgcrt_mod_right_class_candidate_forward_left) /\ (exists hgcrt_mod_left_class_candidate_forward_right hgcrt_mod_right_class_candidate_forward_right. y + n * hgcrt_mod_left_class_candidate_forward_right = b + n * hgcrt_mod_right_class_candidate_forward_right))) -> (exists hgcrt_mod_left_class_l_forward hgcrt_mod_right_class_l_forward. y + l * hgcrt_mod_left_class_l_forward = x + l * hgcrt_mod_right_class_l_forward)) /\ ((exists hgcrt_mod_left_class_l_reverse hgcrt_mod_right_class_l_reverse. y + l * hgcrt_mod_left_class_l_reverse = x + l * hgcrt_mod_right_class_l_reverse) -> (((exists hgcrt_mod_left_class_candidate_reverse_left hgcrt_mod_right_class_candidate_reverse_left. y + m * hgcrt_mod_left_class_candidate_reverse_left = a + m * hgcrt_mod_right_class_candidate_reverse_left) /\ (exists hgcrt_mod_left_class_candidate_reverse_right hgcrt_mod_right_class_candidate_reverse_right. y + n * hgcrt_mod_left_class_candidate_reverse_right = b + n * hgcrt_mod_right_class_candidate_reverse_right)))))
use crt_solution_pair_congruent
use mod_eq_lcm_iff_pair
use mod_eq_trans
intro l
intro m
intro n
intro a
intro b
intro x
intro y
intro hl
intro hx
split
intro hy
have hpair : ((exists hgcrt_mod_left_class_pair_m hgcrt_mod_right_class_pair_m. y + m * hgcrt_mod_left_class_pair_m = x + m * hgcrt_mod_right_class_pair_m) /\ (exists hgcrt_mod_left_class_pair_n hgcrt_mod_right_class_pair_n. y + n * hgcrt_mod_left_class_pair_n = x + n * hgcrt_mod_right_class_pair_n))
specialize crt_solution_pair_congruent m
specialize crt_solution_pair_congruent n
specialize crt_solution_pair_congruent a
specialize crt_solution_pair_congruent b
specialize crt_solution_pair_congruent y
specialize crt_solution_pair_congruent x
apply crt_solution_pair_congruent
exact hy
exact hx
have hiff : (((exists hgcrt_mod_left_class_l_aux hgcrt_mod_right_class_l_aux. y + l * hgcrt_mod_left_class_l_aux = x + l * hgcrt_mod_right_class_l_aux) -> ((exists hgcrt_mod_left_class_pair_m hgcrt_mod_right_class_pair_m. y + m * hgcrt_mod_left_class_pair_m = x + m * hgcrt_mod_right_class_pair_m) /\ (exists hgcrt_mod_left_class_pair_n hgcrt_mod_right_class_pair_n. y + n * hgcrt_mod_left_class_pair_n = x + n * hgcrt_mod_right_class_pair_n))) /\ (((exists hgcrt_mod_left_class_pair_m hgcrt_mod_right_class_pair_m. y + m * hgcrt_mod_left_class_pair_m = x + m * hgcrt_mod_right_class_pair_m) /\ (exists hgcrt_mod_left_class_pair_n hgcrt_mod_right_class_pair_n. y + n * hgcrt_mod_left_class_pair_n = x + n * hgcrt_mod_right_class_pair_n)) -> (exists hgcrt_mod_left_class_l_aux hgcrt_mod_right_class_l_aux. y + l * hgcrt_mod_left_class_l_aux = x + l * hgcrt_mod_right_class_l_aux)))
specialize mod_eq_lcm_iff_pair l
specialize mod_eq_lcm_iff_pair m
specialize mod_eq_lcm_iff_pair n
specialize mod_eq_lcm_iff_pair y
specialize mod_eq_lcm_iff_pair x
apply mod_eq_lcm_iff_pair
exact hl
cases hiff
apply hiff_right
exact hpair
intro hlyx
have hiff2 : (((exists hgcrt_mod_left_class_l_aux hgcrt_mod_right_class_l_aux. y + l * hgcrt_mod_left_class_l_aux = x + l * hgcrt_mod_right_class_l_aux) -> ((exists hgcrt_mod_left_class_pair_m hgcrt_mod_right_class_pair_m. y + m * hgcrt_mod_left_class_pair_m = x + m * hgcrt_mod_right_class_pair_m) /\ (exists hgcrt_mod_left_class_pair_n hgcrt_mod_right_class_pair_n. y + n * hgcrt_mod_left_class_pair_n = x + n * hgcrt_mod_right_class_pair_n))) /\ (((exists hgcrt_mod_left_class_pair_m hgcrt_mod_right_class_pair_m. y + m * hgcrt_mod_left_class_pair_m = x + m * hgcrt_mod_right_class_pair_m) /\ (exists hgcrt_mod_left_class_pair_n hgcrt_mod_right_class_pair_n. y + n * hgcrt_mod_left_class_pair_n = x + n * hgcrt_mod_right_class_pair_n)) -> (exists hgcrt_mod_left_class_l_aux hgcrt_mod_right_class_l_aux. y + l * hgcrt_mod_left_class_l_aux = x + l * hgcrt_mod_right_class_l_aux)))
specialize mod_eq_lcm_iff_pair l
specialize mod_eq_lcm_iff_pair m
specialize mod_eq_lcm_iff_pair n
specialize mod_eq_lcm_iff_pair y
specialize mod_eq_lcm_iff_pair x
apply mod_eq_lcm_iff_pair
exact hl
cases hiff2
have hpair2 : ((exists hgcrt_mod_left_class_pair_m hgcrt_mod_right_class_pair_m. y + m * hgcrt_mod_left_class_pair_m = x + m * hgcrt_mod_right_class_pair_m) /\ (exists hgcrt_mod_left_class_pair_n hgcrt_mod_right_class_pair_n. y + n * hgcrt_mod_left_class_pair_n = x + n * hgcrt_mod_right_class_pair_n))
apply hiff2_left
exact hlyx
cases hpair2
cases hx
split
specialize mod_eq_trans m
specialize mod_eq_trans y
specialize mod_eq_trans x
specialize mod_eq_trans a
apply mod_eq_trans
exact hpair2_left
exact hx_left
specialize mod_eq_trans n
specialize mod_eq_trans y
specialize mod_eq_trans x
specialize mod_eq_trans b
apply mod_eq_trans
exact hpair2_right
exact hx_right
qed
- Occurrences
- 2,208
- Distinct objects
- 1,055
- Reused references
- 50
- Depth
- 39
- Cuts
- 63
- Certificate SHA-256
7917de5c171d…
crt_solution_unique_lcm_zeroCrt solution unique lcm zero
Congruence & CRT
checked
At relational lcm zero, every common solution equals a fixed common solution.
Exact expanded PA statement
forall l m n a b x y. l = 0 -> ((((exists hlcm_left_factor_unique_zero. l = m * hlcm_left_factor_unique_zero) /\ (exists hlcm_right_factor_unique_zero. l = n * hlcm_right_factor_unique_zero)) /\ forall hlcm_common_unique_zero. (exists hlcm_left_common_unique_zero. hlcm_common_unique_zero = m * hlcm_left_common_unique_zero) -> (exists hlcm_right_common_unique_zero. hlcm_common_unique_zero = n * hlcm_right_common_unique_zero) -> exists hlcm_least_factor_unique_zero. hlcm_common_unique_zero = l * hlcm_least_factor_unique_zero)) -> (((exists hgcrt_mod_left_unique_zero_fixed_left hgcrt_mod_right_unique_zero_fixed_left. x + m * hgcrt_mod_left_unique_zero_fixed_left = a + m * hgcrt_mod_right_unique_zero_fixed_left) /\ (exists hgcrt_mod_left_unique_zero_fixed_right hgcrt_mod_right_unique_zero_fixed_right. x + n * hgcrt_mod_left_unique_zero_fixed_right = b + n * hgcrt_mod_right_unique_zero_fixed_right))) -> (((exists hgcrt_mod_left_unique_zero_candidate_left hgcrt_mod_right_unique_zero_candidate_left. y + m * hgcrt_mod_left_unique_zero_candidate_left = a + m * hgcrt_mod_right_unique_zero_candidate_left) /\ (exists hgcrt_mod_left_unique_zero_candidate_right hgcrt_mod_right_unique_zero_candidate_right. y + n * hgcrt_mod_left_unique_zero_candidate_right = b + n * hgcrt_mod_right_unique_zero_candidate_right))) -> y = x
Complete replay recipe: dependency imports + authored proof
pa prove forall l m n a b x y. l = 0 -> ((((exists hlcm_left_factor_unique_zero. l = m * hlcm_left_factor_unique_zero) /\ (exists hlcm_right_factor_unique_zero. l = n * hlcm_right_factor_unique_zero)) /\ forall hlcm_common_unique_zero. (exists hlcm_left_common_unique_zero. hlcm_common_unique_zero = m * hlcm_left_common_unique_zero) -> (exists hlcm_right_common_unique_zero. hlcm_common_unique_zero = n * hlcm_right_common_unique_zero) -> exists hlcm_least_factor_unique_zero. hlcm_common_unique_zero = l * hlcm_least_factor_unique_zero)) -> (((exists hgcrt_mod_left_unique_zero_fixed_left hgcrt_mod_right_unique_zero_fixed_left. x + m * hgcrt_mod_left_unique_zero_fixed_left = a + m * hgcrt_mod_right_unique_zero_fixed_left) /\ (exists hgcrt_mod_left_unique_zero_fixed_right hgcrt_mod_right_unique_zero_fixed_right. x + n * hgcrt_mod_left_unique_zero_fixed_right = b + n * hgcrt_mod_right_unique_zero_fixed_right))) -> (((exists hgcrt_mod_left_unique_zero_candidate_left hgcrt_mod_right_unique_zero_candidate_left. y + m * hgcrt_mod_left_unique_zero_candidate_left = a + m * hgcrt_mod_right_unique_zero_candidate_left) /\ (exists hgcrt_mod_left_unique_zero_candidate_right hgcrt_mod_right_unique_zero_candidate_right. y + n * hgcrt_mod_left_unique_zero_candidate_right = b + n * hgcrt_mod_right_unique_zero_candidate_right))) -> y = x
use crt_solution_class_iff_lcm
use mod_eq_zero_iff_eq
intro l
intro m
intro n
intro a
intro b
intro x
intro y
intro hl
intro hlcm
intro hx
intro hy
have hiff : (((((exists hgcrt_mod_left_unique_zero_iff_forward_left hgcrt_mod_right_unique_zero_iff_forward_left. y + m * hgcrt_mod_left_unique_zero_iff_forward_left = a + m * hgcrt_mod_right_unique_zero_iff_forward_left) /\ (exists hgcrt_mod_left_unique_zero_iff_forward_right hgcrt_mod_right_unique_zero_iff_forward_right. y + n * hgcrt_mod_left_unique_zero_iff_forward_right = b + n * hgcrt_mod_right_unique_zero_iff_forward_right))) -> (exists hgcrt_mod_left_unique_zero_mod_forward hgcrt_mod_right_unique_zero_mod_forward. y + l * hgcrt_mod_left_unique_zero_mod_forward = x + l * hgcrt_mod_right_unique_zero_mod_forward)) /\ ((exists hgcrt_mod_left_unique_zero_mod_reverse hgcrt_mod_right_unique_zero_mod_reverse. y + l * hgcrt_mod_left_unique_zero_mod_reverse = x + l * hgcrt_mod_right_unique_zero_mod_reverse) -> (((exists hgcrt_mod_left_unique_zero_iff_reverse_left hgcrt_mod_right_unique_zero_iff_reverse_left. y + m * hgcrt_mod_left_unique_zero_iff_reverse_left = a + m * hgcrt_mod_right_unique_zero_iff_reverse_left) /\ (exists hgcrt_mod_left_unique_zero_iff_reverse_right hgcrt_mod_right_unique_zero_iff_reverse_right. y + n * hgcrt_mod_left_unique_zero_iff_reverse_right = b + n * hgcrt_mod_right_unique_zero_iff_reverse_right)))))
specialize crt_solution_class_iff_lcm l
specialize crt_solution_class_iff_lcm m
specialize crt_solution_class_iff_lcm n
specialize crt_solution_class_iff_lcm a
specialize crt_solution_class_iff_lcm b
specialize crt_solution_class_iff_lcm x
specialize crt_solution_class_iff_lcm y
apply crt_solution_class_iff_lcm
exact hlcm
exact hx
cases hiff
have hmod : exists hgcrt_mod_left_unique_zero_mod_result hgcrt_mod_right_unique_zero_mod_result. y + l * hgcrt_mod_left_unique_zero_mod_result = x + l * hgcrt_mod_right_unique_zero_mod_result
apply hiff_left
exact hy
rewrite hl at hmod
rewrite hl at hmod
specialize mod_eq_zero_iff_eq y
specialize mod_eq_zero_iff_eq x
cases mod_eq_zero_iff_eq
apply mod_eq_zero_iff_eq_left
exact hmod
qed
- Occurrences
- 2,300
- Distinct objects
- 1,126
- Reused references
- 51
- Depth
- 40
- Cuts
- 66
- Certificate SHA-256
05a457c953d5…
crt_solution_canonical_remainder_nonzeroCrt solution canonical remainder nonzero
Congruence & CRT
checked
At nonzero relational lcm, every solvable binary CRT system has a unique solution below the lcm.
Exact expanded PA statement
forall l m n a b x. ~(l = 0) -> ((((exists hlcm_left_factor_canonical_nonzero. l = m * hlcm_left_factor_canonical_nonzero) /\ (exists hlcm_right_factor_canonical_nonzero. l = n * hlcm_right_factor_canonical_nonzero)) /\ forall hlcm_common_canonical_nonzero. (exists hlcm_left_common_canonical_nonzero. hlcm_common_canonical_nonzero = m * hlcm_left_common_canonical_nonzero) -> (exists hlcm_right_common_canonical_nonzero. hlcm_common_canonical_nonzero = n * hlcm_right_common_canonical_nonzero) -> exists hlcm_least_factor_canonical_nonzero. hlcm_common_canonical_nonzero = l * hlcm_least_factor_canonical_nonzero)) -> (((exists hgcrt_mod_left_canonical_nonzero_fixed_left hgcrt_mod_right_canonical_nonzero_fixed_left. x + m * hgcrt_mod_left_canonical_nonzero_fixed_left = a + m * hgcrt_mod_right_canonical_nonzero_fixed_left) /\ (exists hgcrt_mod_left_canonical_nonzero_fixed_right hgcrt_mod_right_canonical_nonzero_fixed_right. x + n * hgcrt_mod_left_canonical_nonzero_fixed_right = b + n * hgcrt_mod_right_canonical_nonzero_fixed_right))) -> exists r. (((exists hgcrt_below_gap_canonical_nonzero_result. hgcrt_below_gap_canonical_nonzero_result + S r = l) /\ (((exists hgcrt_mod_left_canonical_nonzero_result_left hgcrt_mod_right_canonical_nonzero_result_left. r + m * hgcrt_mod_left_canonical_nonzero_result_left = a + m * hgcrt_mod_right_canonical_nonzero_result_left) /\ (exists hgcrt_mod_left_canonical_nonzero_result_right hgcrt_mod_right_canonical_nonzero_result_right. r + n * hgcrt_mod_left_canonical_nonzero_result_right = b + n * hgcrt_mod_right_canonical_nonzero_result_right)))) /\ ((exists hgcrt_mod_left_canonical_nonzero_result hgcrt_mod_right_canonical_nonzero_result. r + l * hgcrt_mod_left_canonical_nonzero_result = x + l * hgcrt_mod_right_canonical_nonzero_result) /\ forall s. (exists hgcrt_below_gap_canonical_nonzero_comparison. hgcrt_below_gap_canonical_nonzero_comparison + S s = l) -> (((exists hgcrt_mod_left_canonical_nonzero_comparison_left hgcrt_mod_right_canonical_nonzero_comparison_left. s + m * hgcrt_mod_left_canonical_nonzero_comparison_left = a + m * hgcrt_mod_right_canonical_nonzero_comparison_left) /\ (exists hgcrt_mod_left_canonical_nonzero_comparison_right hgcrt_mod_right_canonical_nonzero_comparison_right. s + n * hgcrt_mod_left_canonical_nonzero_comparison_right = b + n * hgcrt_mod_right_canonical_nonzero_comparison_right))) -> s = r))
Complete replay recipe: dependency imports + authored proof
pa prove forall l m n a b x. ~(l = 0) -> ((((exists hlcm_left_factor_canonical_nonzero. l = m * hlcm_left_factor_canonical_nonzero) /\ (exists hlcm_right_factor_canonical_nonzero. l = n * hlcm_right_factor_canonical_nonzero)) /\ forall hlcm_common_canonical_nonzero. (exists hlcm_left_common_canonical_nonzero. hlcm_common_canonical_nonzero = m * hlcm_left_common_canonical_nonzero) -> (exists hlcm_right_common_canonical_nonzero. hlcm_common_canonical_nonzero = n * hlcm_right_common_canonical_nonzero) -> exists hlcm_least_factor_canonical_nonzero. hlcm_common_canonical_nonzero = l * hlcm_least_factor_canonical_nonzero)) -> (((exists hgcrt_mod_left_canonical_nonzero_fixed_left hgcrt_mod_right_canonical_nonzero_fixed_left. x + m * hgcrt_mod_left_canonical_nonzero_fixed_left = a + m * hgcrt_mod_right_canonical_nonzero_fixed_left) /\ (exists hgcrt_mod_left_canonical_nonzero_fixed_right hgcrt_mod_right_canonical_nonzero_fixed_right. x + n * hgcrt_mod_left_canonical_nonzero_fixed_right = b + n * hgcrt_mod_right_canonical_nonzero_fixed_right))) -> exists r. (((exists hgcrt_below_gap_canonical_nonzero_result. hgcrt_below_gap_canonical_nonzero_result + S r = l) /\ (((exists hgcrt_mod_left_canonical_nonzero_result_left hgcrt_mod_right_canonical_nonzero_result_left. r + m * hgcrt_mod_left_canonical_nonzero_result_left = a + m * hgcrt_mod_right_canonical_nonzero_result_left) /\ (exists hgcrt_mod_left_canonical_nonzero_result_right hgcrt_mod_right_canonical_nonzero_result_right. r + n * hgcrt_mod_left_canonical_nonzero_result_right = b + n * hgcrt_mod_right_canonical_nonzero_result_right)))) /\ ((exists hgcrt_mod_left_canonical_nonzero_result hgcrt_mod_right_canonical_nonzero_result. r + l * hgcrt_mod_left_canonical_nonzero_result = x + l * hgcrt_mod_right_canonical_nonzero_result) /\ forall s. (exists hgcrt_below_gap_canonical_nonzero_comparison. hgcrt_below_gap_canonical_nonzero_comparison + S s = l) -> (((exists hgcrt_mod_left_canonical_nonzero_comparison_left hgcrt_mod_right_canonical_nonzero_comparison_left. s + m * hgcrt_mod_left_canonical_nonzero_comparison_left = a + m * hgcrt_mod_right_canonical_nonzero_comparison_left) /\ (exists hgcrt_mod_left_canonical_nonzero_comparison_right hgcrt_mod_right_canonical_nonzero_comparison_right. s + n * hgcrt_mod_left_canonical_nonzero_comparison_right = b + n * hgcrt_mod_right_canonical_nonzero_comparison_right))) -> s = r))
use division_remainder_exists
use mul_comm
use remainder_decomposition_to_mod_eq
use mod_eq_symm
use crt_solution_class_iff_lcm
use mod_eq_bounded_unique
intro l
intro m
intro n
intro a
intro b
intro x
intro hl
intro hlcm
intro hx
have hdivision : exists q r. x = l * q + r /\ exists gap. gap + S r = l
specialize division_remainder_exists l
specialize division_remainder_exists x
apply division_remainder_exists
exact hl
cases hdivision
cases hdivision_witness
cases hdivision_witness_witness
have hxdecomp : x = x1 * l + x2
trans l * x1 + x2
exact hdivision_witness_witness_left
congr
apply mul_comm
refl
have hxx2 : exists hgcrt_mod_left_canonical_runtime_x_x2 hgcrt_mod_right_canonical_runtime_x_x2. x + l * hgcrt_mod_left_canonical_runtime_x_x2 = x2 + l * hgcrt_mod_right_canonical_runtime_x_x2
specialize remainder_decomposition_to_mod_eq l
specialize remainder_decomposition_to_mod_eq x
specialize remainder_decomposition_to_mod_eq x1
specialize remainder_decomposition_to_mod_eq x2
apply remainder_decomposition_to_mod_eq
exact hxdecomp
have hx2x : exists hgcrt_mod_left_canonical_runtime_x2_x hgcrt_mod_right_canonical_runtime_x2_x. x2 + l * hgcrt_mod_left_canonical_runtime_x2_x = x + l * hgcrt_mod_right_canonical_runtime_x2_x
specialize mod_eq_symm l
specialize mod_eq_symm x
specialize mod_eq_symm x2
apply mod_eq_symm
exact hxx2
have hclass : (((((exists hgcrt_mod_left_canonical_runtime_class_forward_left hgcrt_mod_right_canonical_runtime_class_forward_left. x2 + m * hgcrt_mod_left_canonical_runtime_class_forward_left = a + m * hgcrt_mod_right_canonical_runtime_class_forward_left) /\ (exists hgcrt_mod_left_canonical_runtime_class_forward_right hgcrt_mod_right_canonical_runtime_class_forward_right. x2 + n * hgcrt_mod_left_canonical_runtime_class_forward_right = b + n * hgcrt_mod_right_canonical_runtime_class_forward_right))) -> (exists hgcrt_mod_left_canonical_runtime_class_forward hgcrt_mod_right_canonical_runtime_class_forward. x2 + l * hgcrt_mod_left_canonical_runtime_class_forward = x + l * hgcrt_mod_right_canonical_runtime_class_forward)) /\ ((exists hgcrt_mod_left_canonical_runtime_class_reverse hgcrt_mod_right_canonical_runtime_class_reverse. x2 + l * hgcrt_mod_left_canonical_runtime_class_reverse = x + l * hgcrt_mod_right_canonical_runtime_class_reverse) -> (((exists hgcrt_mod_left_canonical_runtime_class_reverse_left hgcrt_mod_right_canonical_runtime_class_reverse_left. x2 + m * hgcrt_mod_left_canonical_runtime_class_reverse_left = a + m * hgcrt_mod_right_canonical_runtime_class_reverse_left) /\ (exists hgcrt_mod_left_canonical_runtime_class_reverse_right hgcrt_mod_right_canonical_runtime_class_reverse_right. x2 + n * hgcrt_mod_left_canonical_runtime_class_reverse_right = b + n * hgcrt_mod_right_canonical_runtime_class_reverse_right)))))
specialize crt_solution_class_iff_lcm l
specialize crt_solution_class_iff_lcm m
specialize crt_solution_class_iff_lcm n
specialize crt_solution_class_iff_lcm a
specialize crt_solution_class_iff_lcm b
specialize crt_solution_class_iff_lcm x
specialize crt_solution_class_iff_lcm x2
apply crt_solution_class_iff_lcm
exact hlcm
exact hx
cases hclass
have hrsol : ((exists hgcrt_mod_left_canonical_runtime_result_left hgcrt_mod_right_canonical_runtime_result_left. x2 + m * hgcrt_mod_left_canonical_runtime_result_left = a + m * hgcrt_mod_right_canonical_runtime_result_left) /\ (exists hgcrt_mod_left_canonical_runtime_result_right hgcrt_mod_right_canonical_runtime_result_right. x2 + n * hgcrt_mod_left_canonical_runtime_result_right = b + n * hgcrt_mod_right_canonical_runtime_result_right))
apply hclass_right
exact hx2x
exists x2
split
split
exact hdivision_witness_witness_right
exact hrsol
split
exact hx2x
intro s
intro hsbound
intro hssol
have hclasss : (((((exists hgcrt_mod_left_canonical_runtime_comparison_forward_left hgcrt_mod_right_canonical_runtime_comparison_forward_left. s + m * hgcrt_mod_left_canonical_runtime_comparison_forward_left = a + m * hgcrt_mod_right_canonical_runtime_comparison_forward_left) /\ (exists hgcrt_mod_left_canonical_runtime_comparison_forward_right hgcrt_mod_right_canonical_runtime_comparison_forward_right. s + n * hgcrt_mod_left_canonical_runtime_comparison_forward_right = b + n * hgcrt_mod_right_canonical_runtime_comparison_forward_right))) -> (exists hgcrt_mod_left_canonical_runtime_comparison_forward hgcrt_mod_right_canonical_runtime_comparison_forward. s + l * hgcrt_mod_left_canonical_runtime_comparison_forward = x2 + l * hgcrt_mod_right_canonical_runtime_comparison_forward)) /\ ((exists hgcrt_mod_left_canonical_runtime_comparison_reverse hgcrt_mod_right_canonical_runtime_comparison_reverse. s + l * hgcrt_mod_left_canonical_runtime_comparison_reverse = x2 + l * hgcrt_mod_right_canonical_runtime_comparison_reverse) -> (((exists hgcrt_mod_left_canonical_runtime_comparison_reverse_left hgcrt_mod_right_canonical_runtime_comparison_reverse_left. s + m * hgcrt_mod_left_canonical_runtime_comparison_reverse_left = a + m * hgcrt_mod_right_canonical_runtime_comparison_reverse_left) /\ (exists hgcrt_mod_left_canonical_runtime_comparison_reverse_right hgcrt_mod_right_canonical_runtime_comparison_reverse_right. s + n * hgcrt_mod_left_canonical_runtime_comparison_reverse_right = b + n * hgcrt_mod_right_canonical_runtime_comparison_reverse_right)))))
specialize crt_solution_class_iff_lcm l
specialize crt_solution_class_iff_lcm m
specialize crt_solution_class_iff_lcm n
specialize crt_solution_class_iff_lcm a
specialize crt_solution_class_iff_lcm b
specialize crt_solution_class_iff_lcm x2
specialize crt_solution_class_iff_lcm s
apply crt_solution_class_iff_lcm
exact hlcm
exact hrsol
cases hclasss
have hsmod : exists hgcrt_mod_left_canonical_runtime_comparison_result hgcrt_mod_right_canonical_runtime_comparison_result. s + l * hgcrt_mod_left_canonical_runtime_comparison_result = x2 + l * hgcrt_mod_right_canonical_runtime_comparison_result
apply hclasss_left
exact hssol
specialize mod_eq_bounded_unique l
specialize mod_eq_bounded_unique s
specialize mod_eq_bounded_unique x2
apply mod_eq_bounded_unique
exact hsbound
exact hdivision_witness_witness_right
exact hsmod
qed
- Occurrences
- 4,086
- Distinct objects
- 1,668
- Reused references
- 79
- Depth
- 65
- Cuts
- 116
- Certificate SHA-256
c3c9f2d9d2cb…
generalized_binary_crt_canonical_boundaryGeneralized binary crt canonical boundary
Congruence & CRT
checked
Every compatible binary CRT system has the correct canonical boundary: exact uniqueness at lcm zero or one unique bounded representative at nonzero lcm.
Exact expanded PA statement
forall g l m n a b. ((((exists hag_left_factor_canonical_boundary. m = g * hag_left_factor_canonical_boundary) /\ (exists hag_right_factor_canonical_boundary. n = g * hag_right_factor_canonical_boundary)) /\ forall hag_divisor_canonical_boundary. (exists hag_common_left_canonical_boundary. m = hag_divisor_canonical_boundary * hag_common_left_canonical_boundary) -> (exists hag_common_right_canonical_boundary. n = hag_divisor_canonical_boundary * hag_common_right_canonical_boundary) -> exists hag_greatest_factor_canonical_boundary. g = hag_divisor_canonical_boundary * hag_greatest_factor_canonical_boundary)) -> ((((exists hlcm_left_factor_canonical_boundary. l = m * hlcm_left_factor_canonical_boundary) /\ (exists hlcm_right_factor_canonical_boundary. l = n * hlcm_right_factor_canonical_boundary)) /\ forall hlcm_common_canonical_boundary. (exists hlcm_left_common_canonical_boundary. hlcm_common_canonical_boundary = m * hlcm_left_common_canonical_boundary) -> (exists hlcm_right_common_canonical_boundary. hlcm_common_canonical_boundary = n * hlcm_right_common_canonical_boundary) -> exists hlcm_least_factor_canonical_boundary. hlcm_common_canonical_boundary = l * hlcm_least_factor_canonical_boundary)) -> (exists hgcrt_mod_left_canonical_boundary_compatibility hgcrt_mod_right_canonical_boundary_compatibility. a + g * hgcrt_mod_left_canonical_boundary_compatibility = b + g * hgcrt_mod_right_canonical_boundary_compatibility) -> (((l = 0 /\ exists x. ((((exists hgcrt_mod_left_canonical_boundary_fixed_left hgcrt_mod_right_canonical_boundary_fixed_left. x + m * hgcrt_mod_left_canonical_boundary_fixed_left = a + m * hgcrt_mod_right_canonical_boundary_fixed_left) /\ (exists hgcrt_mod_left_canonical_boundary_fixed_right hgcrt_mod_right_canonical_boundary_fixed_right. x + n * hgcrt_mod_left_canonical_boundary_fixed_right = b + n * hgcrt_mod_right_canonical_boundary_fixed_right))) /\ forall y. (((exists hgcrt_mod_left_canonical_boundary_zero_candidate_left hgcrt_mod_right_canonical_boundary_zero_candidate_left. y + m * hgcrt_mod_left_canonical_boundary_zero_candidate_left = a + m * hgcrt_mod_right_canonical_boundary_zero_candidate_left) /\ (exists hgcrt_mod_left_canonical_boundary_zero_candidate_right hgcrt_mod_right_canonical_boundary_zero_candidate_right. y + n * hgcrt_mod_left_canonical_boundary_zero_candidate_right = b + n * hgcrt_mod_right_canonical_boundary_zero_candidate_right))) -> y = x))) \/ ((~(l = 0) /\ exists r. (((exists hgcrt_below_gap_canonical_boundary_result. hgcrt_below_gap_canonical_boundary_result + S r = l) /\ (((exists hgcrt_mod_left_canonical_boundary_result_left hgcrt_mod_right_canonical_boundary_result_left. r + m * hgcrt_mod_left_canonical_boundary_result_left = a + m * hgcrt_mod_right_canonical_boundary_result_left) /\ (exists hgcrt_mod_left_canonical_boundary_result_right hgcrt_mod_right_canonical_boundary_result_right. r + n * hgcrt_mod_left_canonical_boundary_result_right = b + n * hgcrt_mod_right_canonical_boundary_result_right)))) /\ forall s. (exists hgcrt_below_gap_canonical_boundary_comparison. hgcrt_below_gap_canonical_boundary_comparison + S s = l) -> (((exists hgcrt_mod_left_canonical_boundary_comparison_left hgcrt_mod_right_canonical_boundary_comparison_left. s + m * hgcrt_mod_left_canonical_boundary_comparison_left = a + m * hgcrt_mod_right_canonical_boundary_comparison_left) /\ (exists hgcrt_mod_left_canonical_boundary_comparison_right hgcrt_mod_right_canonical_boundary_comparison_right. s + n * hgcrt_mod_left_canonical_boundary_comparison_right = b + n * hgcrt_mod_right_canonical_boundary_comparison_right))) -> s = r))))
Complete replay recipe: dependency imports + authored proof
pa prove forall g l m n a b. ((((exists hag_left_factor_canonical_boundary. m = g * hag_left_factor_canonical_boundary) /\ (exists hag_right_factor_canonical_boundary. n = g * hag_right_factor_canonical_boundary)) /\ forall hag_divisor_canonical_boundary. (exists hag_common_left_canonical_boundary. m = hag_divisor_canonical_boundary * hag_common_left_canonical_boundary) -> (exists hag_common_right_canonical_boundary. n = hag_divisor_canonical_boundary * hag_common_right_canonical_boundary) -> exists hag_greatest_factor_canonical_boundary. g = hag_divisor_canonical_boundary * hag_greatest_factor_canonical_boundary)) -> ((((exists hlcm_left_factor_canonical_boundary. l = m * hlcm_left_factor_canonical_boundary) /\ (exists hlcm_right_factor_canonical_boundary. l = n * hlcm_right_factor_canonical_boundary)) /\ forall hlcm_common_canonical_boundary. (exists hlcm_left_common_canonical_boundary. hlcm_common_canonical_boundary = m * hlcm_left_common_canonical_boundary) -> (exists hlcm_right_common_canonical_boundary. hlcm_common_canonical_boundary = n * hlcm_right_common_canonical_boundary) -> exists hlcm_least_factor_canonical_boundary. hlcm_common_canonical_boundary = l * hlcm_least_factor_canonical_boundary)) -> (exists hgcrt_mod_left_canonical_boundary_compatibility hgcrt_mod_right_canonical_boundary_compatibility. a + g * hgcrt_mod_left_canonical_boundary_compatibility = b + g * hgcrt_mod_right_canonical_boundary_compatibility) -> (((l = 0 /\ exists x. ((((exists hgcrt_mod_left_canonical_boundary_fixed_left hgcrt_mod_right_canonical_boundary_fixed_left. x + m * hgcrt_mod_left_canonical_boundary_fixed_left = a + m * hgcrt_mod_right_canonical_boundary_fixed_left) /\ (exists hgcrt_mod_left_canonical_boundary_fixed_right hgcrt_mod_right_canonical_boundary_fixed_right. x + n * hgcrt_mod_left_canonical_boundary_fixed_right = b + n * hgcrt_mod_right_canonical_boundary_fixed_right))) /\ forall y. (((exists hgcrt_mod_left_canonical_boundary_zero_candidate_left hgcrt_mod_right_canonical_boundary_zero_candidate_left. y + m * hgcrt_mod_left_canonical_boundary_zero_candidate_left = a + m * hgcrt_mod_right_canonical_boundary_zero_candidate_left) /\ (exists hgcrt_mod_left_canonical_boundary_zero_candidate_right hgcrt_mod_right_canonical_boundary_zero_candidate_right. y + n * hgcrt_mod_left_canonical_boundary_zero_candidate_right = b + n * hgcrt_mod_right_canonical_boundary_zero_candidate_right))) -> y = x))) \/ ((~(l = 0) /\ exists r. (((exists hgcrt_below_gap_canonical_boundary_result. hgcrt_below_gap_canonical_boundary_result + S r = l) /\ (((exists hgcrt_mod_left_canonical_boundary_result_left hgcrt_mod_right_canonical_boundary_result_left. r + m * hgcrt_mod_left_canonical_boundary_result_left = a + m * hgcrt_mod_right_canonical_boundary_result_left) /\ (exists hgcrt_mod_left_canonical_boundary_result_right hgcrt_mod_right_canonical_boundary_result_right. r + n * hgcrt_mod_left_canonical_boundary_result_right = b + n * hgcrt_mod_right_canonical_boundary_result_right)))) /\ forall s. (exists hgcrt_below_gap_canonical_boundary_comparison. hgcrt_below_gap_canonical_boundary_comparison + S s = l) -> (((exists hgcrt_mod_left_canonical_boundary_comparison_left hgcrt_mod_right_canonical_boundary_comparison_left. s + m * hgcrt_mod_left_canonical_boundary_comparison_left = a + m * hgcrt_mod_right_canonical_boundary_comparison_left) /\ (exists hgcrt_mod_left_canonical_boundary_comparison_right hgcrt_mod_right_canonical_boundary_comparison_right. s + n * hgcrt_mod_left_canonical_boundary_comparison_right = b + n * hgcrt_mod_right_canonical_boundary_comparison_right))) -> s = r))))
use eq_decidable
use generalized_binary_crt_sufficient
use crt_solution_unique_lcm_zero
use crt_solution_canonical_remainder_nonzero
intro g
intro l
intro m
intro n
intro a
intro b
intro hg
intro hl
intro hab
have hexists : exists x. (((exists hgcrt_mod_left_canonical_boundary_fixed_left hgcrt_mod_right_canonical_boundary_fixed_left. x + m * hgcrt_mod_left_canonical_boundary_fixed_left = a + m * hgcrt_mod_right_canonical_boundary_fixed_left) /\ (exists hgcrt_mod_left_canonical_boundary_fixed_right hgcrt_mod_right_canonical_boundary_fixed_right. x + n * hgcrt_mod_left_canonical_boundary_fixed_right = b + n * hgcrt_mod_right_canonical_boundary_fixed_right)))
specialize generalized_binary_crt_sufficient g
specialize generalized_binary_crt_sufficient m
specialize generalized_binary_crt_sufficient n
specialize generalized_binary_crt_sufficient a
specialize generalized_binary_crt_sufficient b
apply generalized_binary_crt_sufficient
exact hg
exact hab
cases hexists
have hlzero : l = 0 \/ ~(l = 0)
specialize eq_decidable l
specialize eq_decidable 0
exact eq_decidable
cases hlzero
left
split
exact hlzero_left
exists x
split
exact hexists_witness
intro y
intro hy
specialize crt_solution_unique_lcm_zero l
specialize crt_solution_unique_lcm_zero m
specialize crt_solution_unique_lcm_zero n
specialize crt_solution_unique_lcm_zero a
specialize crt_solution_unique_lcm_zero b
specialize crt_solution_unique_lcm_zero x
specialize crt_solution_unique_lcm_zero y
apply crt_solution_unique_lcm_zero
exact hlzero_left
exact hl
exact hexists_witness
exact hy
right
split
exact hlzero_right
have hcanonical : exists r. (((exists hgcrt_below_gap_canonical_boundary_runtime_result. hgcrt_below_gap_canonical_boundary_runtime_result + S r = l) /\ (((exists hgcrt_mod_left_canonical_boundary_runtime_result_left hgcrt_mod_right_canonical_boundary_runtime_result_left. r + m * hgcrt_mod_left_canonical_boundary_runtime_result_left = a + m * hgcrt_mod_right_canonical_boundary_runtime_result_left) /\ (exists hgcrt_mod_left_canonical_boundary_runtime_result_right hgcrt_mod_right_canonical_boundary_runtime_result_right. r + n * hgcrt_mod_left_canonical_boundary_runtime_result_right = b + n * hgcrt_mod_right_canonical_boundary_runtime_result_right)))) /\ ((exists hgcrt_mod_left_canonical_boundary_runtime_mod hgcrt_mod_right_canonical_boundary_runtime_mod. r + l * hgcrt_mod_left_canonical_boundary_runtime_mod = x + l * hgcrt_mod_right_canonical_boundary_runtime_mod) /\ forall s. (exists hgcrt_below_gap_canonical_boundary_runtime_comparison. hgcrt_below_gap_canonical_boundary_runtime_comparison + S s = l) -> (((exists hgcrt_mod_left_canonical_boundary_runtime_comparison_left hgcrt_mod_right_canonical_boundary_runtime_comparison_left. s + m * hgcrt_mod_left_canonical_boundary_runtime_comparison_left = a + m * hgcrt_mod_right_canonical_boundary_runtime_comparison_left) /\ (exists hgcrt_mod_left_canonical_boundary_runtime_comparison_right hgcrt_mod_right_canonical_boundary_runtime_comparison_right. s + n * hgcrt_mod_left_canonical_boundary_runtime_comparison_right = b + n * hgcrt_mod_right_canonical_boundary_runtime_comparison_right))) -> s = r))
specialize crt_solution_canonical_remainder_nonzero l
specialize crt_solution_canonical_remainder_nonzero m
specialize crt_solution_canonical_remainder_nonzero n
specialize crt_solution_canonical_remainder_nonzero a
specialize crt_solution_canonical_remainder_nonzero b
specialize crt_solution_canonical_remainder_nonzero x
apply crt_solution_canonical_remainder_nonzero
exact hlzero_right
exact hl
exact hexists_witness
cases hcanonical
exists x1
split
cases hcanonical_witness
exact hcanonical_witness_left
cases hcanonical_witness
cases hcanonical_witness_right
exact hcanonical_witness_right_right
qed
- Occurrences
- 17,750
- Distinct objects
- 4,239
- Reused references
- 188
- Depth
- 80
- Cuts
- 517
- Certificate SHA-256
59bc1b3f5a5b…
mod_eq_decidableMod eq decidable
Congruence & CRT
checked
Balanced congruence is constructively decidable for every natural modulus.
Exact expanded PA statement
forall d a b. (exists hgcrt_mod_left_decision_yes hgcrt_mod_right_decision_yes. a + d * hgcrt_mod_left_decision_yes = b + d * hgcrt_mod_right_decision_yes) \/ ~(exists hgcrt_mod_left_decision_no hgcrt_mod_right_decision_no. a + d * hgcrt_mod_left_decision_no = b + d * hgcrt_mod_right_decision_no)
Complete replay recipe: dependency imports + authored proof
pa prove forall d a b. (exists hgcrt_mod_left_decision_yes hgcrt_mod_right_decision_yes. a + d * hgcrt_mod_left_decision_yes = b + d * hgcrt_mod_right_decision_yes) \/ ~(exists hgcrt_mod_left_decision_no hgcrt_mod_right_decision_no. a + d * hgcrt_mod_left_decision_no = b + d * hgcrt_mod_right_decision_no)
use eq_decidable
use mod_eq_zero_iff_eq
use mod_eq_decidable_nonzero
intro d
intro a
intro b
have hd : d = 0 \/ ~(d = 0)
specialize eq_decidable d
specialize eq_decidable 0
exact eq_decidable
cases hd
have hzero : (((exists hgcrt_mod_left_decision_zero_forward hgcrt_mod_right_decision_zero_forward. a + 0 * hgcrt_mod_left_decision_zero_forward = b + 0 * hgcrt_mod_right_decision_zero_forward) -> a = b) /\ (a = b -> (exists hgcrt_mod_left_decision_zero_reverse hgcrt_mod_right_decision_zero_reverse. a + 0 * hgcrt_mod_left_decision_zero_reverse = b + 0 * hgcrt_mod_right_decision_zero_reverse)))
specialize mod_eq_zero_iff_eq a
specialize mod_eq_zero_iff_eq b
exact mod_eq_zero_iff_eq
cases hzero
have hab : a = b \/ ~(a = b)
specialize eq_decidable a
specialize eq_decidable b
exact eq_decidable
cases hab
left
rewrite hd_left
rewrite hd_left
apply hzero_right
exact hab_left
right
intro hmod
rewrite hd_left at hmod
rewrite hd_left at hmod
apply hab_right
apply hzero_left
exact hmod
specialize mod_eq_decidable_nonzero d
specialize mod_eq_decidable_nonzero a
specialize mod_eq_decidable_nonzero b
apply mod_eq_decidable_nonzero
exact hd_right
qed
- Occurrences
- 2,339
- Distinct objects
- 1,217
- Reused references
- 62
- Depth
- 70
- Cuts
- 65
- Certificate SHA-256
7ffa64c2d06d…
generalized_binary_crt_solution_or_obstructionGeneralized binary crt solution or obstruction
Congruence & CRT
checked
Every generalized binary CRT instance constructively returns a solution or a certified incompatibility obstruction.
Exact expanded PA statement
forall g m n a b. ((((exists hag_left_factor_decision_boundary. m = g * hag_left_factor_decision_boundary) /\ (exists hag_right_factor_decision_boundary. n = g * hag_right_factor_decision_boundary)) /\ forall hag_divisor_decision_boundary. (exists hag_common_left_decision_boundary. m = hag_divisor_decision_boundary * hag_common_left_decision_boundary) -> (exists hag_common_right_decision_boundary. n = hag_divisor_decision_boundary * hag_common_right_decision_boundary) -> exists hag_greatest_factor_decision_boundary. g = hag_divisor_decision_boundary * hag_greatest_factor_decision_boundary)) -> (((exists hgcrt_mod_left_decision_boundary_compatible hgcrt_mod_right_decision_boundary_compatible. a + g * hgcrt_mod_left_decision_boundary_compatible = b + g * hgcrt_mod_right_decision_boundary_compatible) /\ exists x. (((exists hgcrt_mod_left_decision_boundary_positive_left hgcrt_mod_right_decision_boundary_positive_left. x + m * hgcrt_mod_left_decision_boundary_positive_left = a + m * hgcrt_mod_right_decision_boundary_positive_left) /\ (exists hgcrt_mod_left_decision_boundary_positive_right hgcrt_mod_right_decision_boundary_positive_right. x + n * hgcrt_mod_left_decision_boundary_positive_right = b + n * hgcrt_mod_right_decision_boundary_positive_right)))) \/ (~(exists hgcrt_mod_left_decision_boundary_incompatible hgcrt_mod_right_decision_boundary_incompatible. a + g * hgcrt_mod_left_decision_boundary_incompatible = b + g * hgcrt_mod_right_decision_boundary_incompatible) /\ ~(exists x. (((exists hgcrt_mod_left_decision_boundary_negative_left hgcrt_mod_right_decision_boundary_negative_left. x + m * hgcrt_mod_left_decision_boundary_negative_left = a + m * hgcrt_mod_right_decision_boundary_negative_left) /\ (exists hgcrt_mod_left_decision_boundary_negative_right hgcrt_mod_right_decision_boundary_negative_right. x + n * hgcrt_mod_left_decision_boundary_negative_right = b + n * hgcrt_mod_right_decision_boundary_negative_right))))))
Complete replay recipe: dependency imports + authored proof
pa prove forall g m n a b. ((((exists hag_left_factor_decision_boundary. m = g * hag_left_factor_decision_boundary) /\ (exists hag_right_factor_decision_boundary. n = g * hag_right_factor_decision_boundary)) /\ forall hag_divisor_decision_boundary. (exists hag_common_left_decision_boundary. m = hag_divisor_decision_boundary * hag_common_left_decision_boundary) -> (exists hag_common_right_decision_boundary. n = hag_divisor_decision_boundary * hag_common_right_decision_boundary) -> exists hag_greatest_factor_decision_boundary. g = hag_divisor_decision_boundary * hag_greatest_factor_decision_boundary)) -> (((exists hgcrt_mod_left_decision_boundary_compatible hgcrt_mod_right_decision_boundary_compatible. a + g * hgcrt_mod_left_decision_boundary_compatible = b + g * hgcrt_mod_right_decision_boundary_compatible) /\ exists x. (((exists hgcrt_mod_left_decision_boundary_positive_left hgcrt_mod_right_decision_boundary_positive_left. x + m * hgcrt_mod_left_decision_boundary_positive_left = a + m * hgcrt_mod_right_decision_boundary_positive_left) /\ (exists hgcrt_mod_left_decision_boundary_positive_right hgcrt_mod_right_decision_boundary_positive_right. x + n * hgcrt_mod_left_decision_boundary_positive_right = b + n * hgcrt_mod_right_decision_boundary_positive_right)))) \/ (~(exists hgcrt_mod_left_decision_boundary_incompatible hgcrt_mod_right_decision_boundary_incompatible. a + g * hgcrt_mod_left_decision_boundary_incompatible = b + g * hgcrt_mod_right_decision_boundary_incompatible) /\ ~(exists x. (((exists hgcrt_mod_left_decision_boundary_negative_left hgcrt_mod_right_decision_boundary_negative_left. x + m * hgcrt_mod_left_decision_boundary_negative_left = a + m * hgcrt_mod_right_decision_boundary_negative_left) /\ (exists hgcrt_mod_left_decision_boundary_negative_right hgcrt_mod_right_decision_boundary_negative_right. x + n * hgcrt_mod_left_decision_boundary_negative_right = b + n * hgcrt_mod_right_decision_boundary_negative_right))))))
use mod_eq_decidable
use generalized_binary_crt_sufficient
use crt_incompatibility_obstructs_solution
intro g
intro m
intro n
intro a
intro b
intro hgcd
have hcompat : (exists hgcrt_mod_left_decision_runtime_compatible hgcrt_mod_right_decision_runtime_compatible. a + g * hgcrt_mod_left_decision_runtime_compatible = b + g * hgcrt_mod_right_decision_runtime_compatible) \/ ~(exists hgcrt_mod_left_decision_runtime_incompatible hgcrt_mod_right_decision_runtime_incompatible. a + g * hgcrt_mod_left_decision_runtime_incompatible = b + g * hgcrt_mod_right_decision_runtime_incompatible)
specialize mod_eq_decidable g
specialize mod_eq_decidable a
specialize mod_eq_decidable b
apply mod_eq_decidable
cases hcompat
left
split
exact hcompat_left
specialize generalized_binary_crt_sufficient g
specialize generalized_binary_crt_sufficient m
specialize generalized_binary_crt_sufficient n
specialize generalized_binary_crt_sufficient a
specialize generalized_binary_crt_sufficient b
apply generalized_binary_crt_sufficient
exact hgcd
exact hcompat_left
right
split
exact hcompat_right
intro hsolution
specialize crt_incompatibility_obstructs_solution g
specialize crt_incompatibility_obstructs_solution m
specialize crt_incompatibility_obstructs_solution n
specialize crt_incompatibility_obstructs_solution a
specialize crt_incompatibility_obstructs_solution b
apply crt_incompatibility_obstructs_solution
exact hgcd
exact hcompat_right
exact hsolution
qed
- Occurrences
- 14,182
- Distinct objects
- 3,909
- Reused references
- 182
- Depth
- 80
- Cuts
- 414
- Certificate SHA-256
3eda3a762221…
generalized_binary_crt_total_decisionGeneralized binary crt total decision
Congruence & CRT
checked
Every raw binary CRT input returns a relational gcd and either a solution or a certified incompatibility obstruction.
Exact expanded PA statement
forall m n a b. exists g. (((((exists hag_left_factor_total_decision. m = g * hag_left_factor_total_decision) /\ (exists hag_right_factor_total_decision. n = g * hag_right_factor_total_decision)) /\ forall hag_divisor_total_decision. (exists hag_common_left_total_decision. m = hag_divisor_total_decision * hag_common_left_total_decision) -> (exists hag_common_right_total_decision. n = hag_divisor_total_decision * hag_common_right_total_decision) -> exists hag_greatest_factor_total_decision. g = hag_divisor_total_decision * hag_greatest_factor_total_decision)) /\ (((exists hgcrt_mod_left_total_decision_compatible hgcrt_mod_right_total_decision_compatible. a + g * hgcrt_mod_left_total_decision_compatible = b + g * hgcrt_mod_right_total_decision_compatible) /\ exists x. (((exists hgcrt_mod_left_total_decision_positive_left hgcrt_mod_right_total_decision_positive_left. x + m * hgcrt_mod_left_total_decision_positive_left = a + m * hgcrt_mod_right_total_decision_positive_left) /\ (exists hgcrt_mod_left_total_decision_positive_right hgcrt_mod_right_total_decision_positive_right. x + n * hgcrt_mod_left_total_decision_positive_right = b + n * hgcrt_mod_right_total_decision_positive_right)))) \/ (~(exists hgcrt_mod_left_total_decision_incompatible hgcrt_mod_right_total_decision_incompatible. a + g * hgcrt_mod_left_total_decision_incompatible = b + g * hgcrt_mod_right_total_decision_incompatible) /\ ~(exists x. (((exists hgcrt_mod_left_total_decision_negative_left hgcrt_mod_right_total_decision_negative_left. x + m * hgcrt_mod_left_total_decision_negative_left = a + m * hgcrt_mod_right_total_decision_negative_left) /\ (exists hgcrt_mod_left_total_decision_negative_right hgcrt_mod_right_total_decision_negative_right. x + n * hgcrt_mod_left_total_decision_negative_right = b + n * hgcrt_mod_right_total_decision_negative_right)))))))
Complete replay recipe: dependency imports + authored proof
pa prove forall m n a b. exists g. (((((exists hag_left_factor_total_decision. m = g * hag_left_factor_total_decision) /\ (exists hag_right_factor_total_decision. n = g * hag_right_factor_total_decision)) /\ forall hag_divisor_total_decision. (exists hag_common_left_total_decision. m = hag_divisor_total_decision * hag_common_left_total_decision) -> (exists hag_common_right_total_decision. n = hag_divisor_total_decision * hag_common_right_total_decision) -> exists hag_greatest_factor_total_decision. g = hag_divisor_total_decision * hag_greatest_factor_total_decision)) /\ (((exists hgcrt_mod_left_total_decision_compatible hgcrt_mod_right_total_decision_compatible. a + g * hgcrt_mod_left_total_decision_compatible = b + g * hgcrt_mod_right_total_decision_compatible) /\ exists x. (((exists hgcrt_mod_left_total_decision_positive_left hgcrt_mod_right_total_decision_positive_left. x + m * hgcrt_mod_left_total_decision_positive_left = a + m * hgcrt_mod_right_total_decision_positive_left) /\ (exists hgcrt_mod_left_total_decision_positive_right hgcrt_mod_right_total_decision_positive_right. x + n * hgcrt_mod_left_total_decision_positive_right = b + n * hgcrt_mod_right_total_decision_positive_right)))) \/ (~(exists hgcrt_mod_left_total_decision_incompatible hgcrt_mod_right_total_decision_incompatible. a + g * hgcrt_mod_left_total_decision_incompatible = b + g * hgcrt_mod_right_total_decision_incompatible) /\ ~(exists x. (((exists hgcrt_mod_left_total_decision_negative_left hgcrt_mod_right_total_decision_negative_left. x + m * hgcrt_mod_left_total_decision_negative_left = a + m * hgcrt_mod_right_total_decision_negative_left) /\ (exists hgcrt_mod_left_total_decision_negative_right hgcrt_mod_right_total_decision_negative_right. x + n * hgcrt_mod_left_total_decision_negative_right = b + n * hgcrt_mod_right_total_decision_negative_right)))))))
use gcd_exists_relational
use generalized_binary_crt_solution_or_obstruction
intro m
intro n
intro a
intro b
specialize gcd_exists_relational m
specialize gcd_exists_relational n
cases gcd_exists_relational
exists x
split
exact gcd_exists_relational_witness
specialize generalized_binary_crt_solution_or_obstruction x
specialize generalized_binary_crt_solution_or_obstruction m
specialize generalized_binary_crt_solution_or_obstruction n
specialize generalized_binary_crt_solution_or_obstruction a
specialize generalized_binary_crt_solution_or_obstruction b
apply generalized_binary_crt_solution_or_obstruction
exact gcd_exists_relational_witness
qed
- Occurrences
- 15,492
- Distinct objects
- 4,052
- Reused references
- 189
- Depth
- 82
- Cuts
- 454
- Certificate SHA-256
20ff304fface…
bezout_integer_coefficientsBézout identity with integer coefficients
GCD, Bézout & coprimality
representation boundary
The conventional reusable theorem quantifies over signed coefficients.
Peano Lab quantifies only over naturals and has no integer encoding or subtraction. A balanced natural reformulation is possible, but it is a different interface and has now been designed explicitly and checked under a separate name.
Related representational choices: a reviewed integer-pair encoding; or a separately named balanced-natural Bézout relation.
This card deliberately contains no native proof script or certificate. The separately named balanced four-natural Bézout theorem is checked.
How to use this atlas#
Start with the guided route if the exact formulas are unfamiliar.
Select
division_remainder_exists,euclid_prime_dvd_product,beta_prefix_product_trace_exists,prime_factorization_existence, orfundamental_theorem_of_arithmeticin the focused navigator to see the main dependency spine.A theorem card’s prerequisite and dependent chips are bidirectional links. Browser Back and Forward therefore become mathematical navigation controls.
The
pa lib NAMElabel identifies a theorem in the Stable checked-use registry. “Native source” and “Vault note” point to immutable proof material; hosted-browser deployment is tracked separately.The single boundary card is intentionally not presented as proved. It keeps the conventional integer-coefficient Bézout interface distinct from the checked balanced-natural theorem.
This page is regenerated with:
python3 scripts/build_arithmetic_book_atlas.py
python3 scripts/build_arithmetic_book_atlas.py --check