automating elementary number theoretic proofs using gr
play

Automating elementary number-theoretic proofs using Gr obner bases - PowerPoint PPT Presentation

Automating elementary number-theoretic proofs using Gr obner bases John Harrison Intel Corporation CADE, Bremen Tue 17th July 2007 (12:0012:30) 0 Divisibility properties over the integers Often want to prove tedious lemmas like a n


  1. Automating elementary number-theoretic proofs using Gr¨ obner bases John Harrison Intel Corporation CADE, Bremen Tue 17th July 2007 (12:00–12:30) 0

  2. Divisibility properties over the integers Often want to prove tedious lemmas like ∀ a n x y. ax ≡ ay ( mod n ) ∧ coprime ( a, n ) ⇒ x ≡ y ( mod n ) 1

  3. Expanding divisibility properties Eliminate divisibility notions in terms of existentials: • s | t to ∃ d. t = sd • s ≡ t ( mod u ) to ∃ d. t − s = ud • coprime ( s, t ) to ∃ x y. sx + ty = 1 . 2

  4. Applied to the example ∀ a n x y. ( ∃ d. ay − ax = nd ) ∧ ( ∃ u v. au + nv = 1) ⇒ ( ∃ e. y − x = ne ) Pull out the quantifiers in the antecedent: ∀ a n x y d u v. ay − ax = nd ∧ au + nv = 1 ⇒ ∃ e. y − x = ne 3

  5. Solving a more general problem We are already well into the realm of ‘undecidable in general’ thanks to the unsolvability of Hilbert’s 10 th problem. 4

  6. Solving a more general problem We are already well into the realm of ‘undecidable in general’ thanks to the unsolvability of Hilbert’s 10 th problem. Instead, attempt to prove the property holds in all rings . It turns out that this problem is decidable using well-known methods. 5

  7. Word problem for rings ∀ x. p 1 ( x ) = 0 ∧ · · · ∧ p n ( x ) = 0 ⇒ q ( x ) = 0 holds in all rings iff q ∈ Id Z � p 1 , . . . , p n � i.e. there exist ‘cofactor’ polynomials with integer coefficients such that p 1 · q 1 + · · · + p n · q n = q 6

  8. Generalizes to linear existential theorems m � ∀ x. e i ( x ) = 0 ⇒ ∃ y 1 · · · y n . p 1 ( x ) y 1 + · · · + p n ( x ) y n = a ( x ) i =1 holds in all rings iff (Horn-Herbrand) there are terms in the language of rings s.t. m � Ring ⊢ ∀ x. e i ( x ) = 0 ⇒ p 1 ( x ) t 1 ( x ) + · · · + p n ( x ) t n ( x ) = a ( x ) i =1 iff (previous theorem) a ∈ Id Z � e 1 , . . . , e m , p 1 , . . . , p n � 7

  9. . . . and simultaneous linear existentials m � ∀ x. e i ( x ) = 0 ⇒ ∃ y 1 · · · y n . p 11 ( x ) y 1 + · · · + p 1 n ( x ) y n = a 1 ( x ) ∧ i =1 · · · ∧ p k 1 ( x ) y 1 + · · · + p kn ( x ) y n = a k ( x ) holds in all rings iff ( a 1 u 1 + · · · + a k u k ) ∈ Id Z � e 1 , . . . , e m , ( p 11 u 1 + · · · + p k 1 u k ) , ( p 1 n u 1 + · · · + p kn u k ) � where the u i are fresh variables. 8

  10. Solving ideal membership problems The most natural approach to solving ideal membership problem is Gr¨ obner bases. Strictly, should use an integer version. However, can use the rational version speculatively and see if we get integer cofactors. With an instrumented version of Buchberger’s algorithm, can generate cofactors and hence easily generate a rigorous formal proof. 9

  11. In our example We want to prove ( y − x ) ∈ Id Z � ay − ax − nd, au + nv − 1 , n � 10

  12. In our example We want to prove ( y − x ) ∈ Id Z � ay − ax − nd, au + nv − 1 , n � This is true because y − x = ( ay − ax − nd ) · u + ( au + nv − 1) · ( x − y ) + n · ( ud + vy − vx ) 11

  13. Extensions • Use linear equations x + a = b to substitute directly • Add greatest common divisors by characterizing theorem g | a ∧ g | b ∧ ( ∃ u v. au + bv = g ) • Solve for existential witnesses sequentially to defer nonlinear ones. 12

  14. Implementation in HOL Light A prototype of the procedure is available in the latest release of HOL Light, 2.20: # INTEGER_RULE ‘!a1 a2 n1 n2:int. (a1 == a2) (mod (gcd(n1,n2))) ==> ?x. (x == a1) (mod n1) /\ (x == a2) (mod n2)‘;; 13

  15. Implementation in HOL Light A prototype of the procedure is available in the latest release of HOL Light, 2.20: # INTEGER_RULE ‘!a1 a2 n1 n2:int. (a1 == a2) (mod (gcd(n1,n2))) ==> ?x. (x == a1) (mod n1) /\ (x == a2) (mod n2)‘;; 4 basis elements and 1 critical pairs 5 basis elements and 0 critical pairs 1 basis elements and 0 critical pairs Translating certificate to HOL inferences val it : thm = |- !a1 a2 n1 n2. (a1 == a2) (mod gcd (n1,n2)) ==> (?x. (x == a1) (mod n1) /\ (x == a2) (mod n2)) 14

  16. Various successful examples d | a ∧ d | b ⇒ d | ( a − b ) coprime ( d, a ) ∧ coprime ( d, b ) ⇒ coprime ( d, ab ) coprime ( d, ab ) ⇒ coprime ( d, a ) coprime ( a, b ) ∧ x ≡ y ( mod a ) ∧ x ≡ y ( mod b ) ⇒ x ≡ y ( mod ( ab )) m | r ∧ n | r ∧ coprime ( m, n ) ⇒ ( mn ) | r coprime ( xy, x 2 + y 2 ) ⇔ coprime ( x, y ) coprime ( a, b ) ⇒ ∃ x. x ≡ u ( mod a ) ∧ x ≡ v ( mod b ) ax ≡ ay ( mod n ) ∧ coprime ( a, n ) ⇒ x ≡ y ( mod n ) gcd( a, n ) | b ⇒ ∃ x. ax ≡ b ( mod n ) 15

  17. Failures Can’t solve problems where special properties of the integers are used 2 | x 2 + x This fails over some rings, e.g. R [ x ] . However, such examples very seldom appear in typical routine lemmas. 16

  18. Conclusions • Simple but surprisingly powerful idea; very useful for routine lemmas • Another indication of the surprising versatility of ideal membership • Hints at a general strategy for new decision methods: 17

  19. Conclusions • Simple but surprisingly powerful idea; very useful for routine lemmas • Another indication of the surprising versatility of ideal membership • Hints at a general strategy for new decision methods: solve a more general problem 18

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend