Bounding Least Common Multiples with Triangles ITP 2016: Proof Pearl - - PowerPoint PPT Presentation

bounding least common multiples with triangles
SMART_READER_LITE
LIVE PREVIEW

Bounding Least Common Multiples with Triangles ITP 2016: Proof Pearl - - PowerPoint PPT Presentation

Bounding Least Common Multiples with Triangles ITP 2016: Proof Pearl Hing-Lun Chan and Michael Norrish College of Engineering and Computer Science Australian National University August 2016, Nancy, France. Hing-Lun Chan & Michael Norrish


slide-1
SLIDE 1

Bounding Least Common Multiples with Triangles

ITP 2016: Proof Pearl Hing-Lun Chan and Michael Norrish

College of Engineering and Computer Science Australian National University

August 2016, Nancy, France.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 1 / 21

slide-2
SLIDE 2

Motivation AKS mechanisation

AKS mechanisation

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 2 / 21

slide-3
SLIDE 3

Motivation AKS mechanisation

AKS mechanisation

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 2 / 21

slide-4
SLIDE 4

Motivation AKS mechanisation

AKS mechanisation

  • Replacing 2m by 2m/2 makes the lower bound valid for all m > 0.
  • This change won’t affect the conclusion: AKS algorithm is in class P

.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 2 / 21

slide-5
SLIDE 5

Motivation AKS mechanisation

Nair’s Paper

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 3 / 21

slide-6
SLIDE 6

Motivation AKS mechanisation

Nair’s Paper

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 3 / 21

slide-7
SLIDE 7

Motivation AKS mechanisation

Nair’s Paper

  • The cryptic “difference operator” means Leibniz’s Harmonic Triangle!

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 3 / 21

slide-8
SLIDE 8

LCM of Consecutive Numbers LCM of Consecutive Numbers

LCM of a List

list_lcm [1] list_lcm [1; 2] list_lcm [1; 2; 3] list_lcm [1; 2; 3; 4] list_lcm [1; 2; 3; 4; 5] list_lcm [1; 2; 3; 4; 5; 6]

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 4 / 21

slide-9
SLIDE 9

LCM of Consecutive Numbers LCM of Consecutive Numbers

LCM of a List

list_lcm [1] = 1 list_lcm [1; 2] = 2 list_lcm [1; 2; 3] = 6 list_lcm [1; 2; 3; 4] = 12 list_lcm [1; 2; 3; 4; 5] = 60 list_lcm [1; 2; 3; 4; 5; 6] = 60

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 4 / 21

slide-10
SLIDE 10

LCM of Consecutive Numbers LCM of Consecutive Numbers

LCM of a List

list_lcm [1] = 1 ≥ 20 = 1 list_lcm [1; 2] = 2 ≥ 21 = 2 list_lcm [1; 2; 3] = 6 ≥ 22 = 4 list_lcm [1; 2; 3; 4] = 12 ≥ 23 = 8 list_lcm [1; 2; 3; 4; 5] = 60 ≥ 24 = 16 list_lcm [1; 2; 3; 4; 5; 6] = 60 ≥ 25 = 32

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 4 / 21

slide-11
SLIDE 11

LCM of Consecutive Numbers LCM of Consecutive Numbers

LCM of a List

list_lcm [1] = 1 ≥ 20 = 1 list_lcm [1; 2] = 2 ≥ 21 = 2 list_lcm [1; 2; 3] = 6 ≥ 22 = 4 list_lcm [1; 2; 3; 4] = 12 ≥ 23 = 8 list_lcm [1; 2; 3; 4; 5] = 60 ≥ 24 = 16 list_lcm [1; 2; 3; 4; 5; 6] = 60 ≥ 25 = 32

Theorem

Lower bound for the LCM of consecutive numbers. ⊢ 2n ≤ list_lcm [1 .. n + 1]

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 4 / 21

slide-12
SLIDE 12

LCM of Consecutive Numbers LCM Lower Bound for a List

LCM Lower Bound

Let ℓ = [a; b; c].

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 5 / 21

slide-13
SLIDE 13

LCM of Consecutive Numbers LCM Lower Bound for a List

LCM Lower Bound

Let ℓ = [a; b; c]. Since LCM is a common multiple of each element (in fact, the least), a ≤ list_lcm [a; b; c] b ≤ list_lcm [a; b; c] c ≤ list_lcm [a; b; c]

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 5 / 21

slide-14
SLIDE 14

LCM of Consecutive Numbers LCM Lower Bound for a List

LCM Lower Bound

Let ℓ = [a; b; c]. Since LCM is a common multiple of each element (in fact, the least), a ≤ list_lcm [a; b; c] b ≤ list_lcm [a; b; c] c ≤ list_lcm [a; b; c] Hence a + b + c ≤ 3 × list_lcm [a; b; c]

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 5 / 21

slide-15
SLIDE 15

LCM of Consecutive Numbers LCM Lower Bound for a List

LCM Lower Bound

Let ℓ = [a; b; c]. Since LCM is a common multiple of each element (in fact, the least), a ≤ list_lcm [a; b; c] b ≤ list_lcm [a; b; c] c ≤ list_lcm [a; b; c] Hence a + b + c ≤ 3 × list_lcm [a; b; c]

Theorem

For a list ℓ of positive numbers, SUM ℓ ≤ LENGTH ℓ × list_lcm ℓ.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 5 / 21

slide-16
SLIDE 16

LCM of Consecutive Numbers LCM Lower Bound for a List

LCM Lower Bound – Applications

Theorem

For a list ℓ of positive numbers, SUM ℓ ≤ LENGTH ℓ × list_lcm ℓ. Naïve application: (n + 1)(n + 2) 2 ≤ (n + 1) × list_lcm [1 .. n + 1] (n + 2) 2 ≤ list_lcm [1 .. n + 1]

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 6 / 21

slide-17
SLIDE 17

LCM of Consecutive Numbers LCM Lower Bound for a List

LCM Lower Bound – Applications

Theorem

For a list ℓ of positive numbers, SUM ℓ ≤ LENGTH ℓ × list_lcm ℓ. Naïve application: (n + 1)(n + 2) 2 ≤ (n + 1) × list_lcm [1 .. n + 1] disappointing! (n + 2) 2 ≤ list_lcm [1 .. n + 1]

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 6 / 21

slide-18
SLIDE 18

LCM of Consecutive Numbers LCM Lower Bound for a List

LCM Lower Bound – Applications

Theorem

For a list ℓ of positive numbers, SUM ℓ ≤ LENGTH ℓ × list_lcm ℓ. Naïve application: (n + 1)(n + 2) 2 ≤ (n + 1) × list_lcm [1 .. n + 1] disappointing! (n + 2) 2 ≤ list_lcm [1 .. n + 1] Need a clever idea to obtain this lower bound: much better! 2n ≤ list_lcm [1 .. n + 1]

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 6 / 21

slide-19
SLIDE 19

LCM of Consecutive Numbers LCM Lower Bound for a List

LCM Bound Comparison

2 4 6 8 100 101 102 103 n

list_lcm [1 .. n + 1] 2n (n + 2)/2 Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 7 / 21

slide-20
SLIDE 20

Triangles Pascal’s Triangle

Yang Hui’s Triangle

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 8 / 21

slide-21
SLIDE 21

Triangles Pascal’s Triangle

Pascal’s Triangle

1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 9 / 21

slide-22
SLIDE 22

Triangles Pascal’s Triangle

Pascal’s Triangle

1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Each boundary entry: always 1.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 9 / 21

slide-23
SLIDE 23

Triangles Pascal’s Triangle

Pascal’s Triangle

1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 1 2 3 Each boundary entry: always 1. Each inside entry: sum of two immediate parents.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 9 / 21

slide-24
SLIDE 24

Triangles Pascal’s Triangle

Pascal’s Triangle

1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 4 6 10 Each boundary entry: always 1. Each inside entry: sum of two immediate parents.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 9 / 21

slide-25
SLIDE 25

Triangles Pascal’s Triangle

Pascal’s Triangle

1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 10 5 15 Each boundary entry: always 1. Each inside entry: sum of two immediate parents.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 9 / 21

slide-26
SLIDE 26

Triangles Pascal’s Triangle

Pascal’s Triangle

1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 1 6 15 20 15 6 1 Each boundary entry: always 1. Each inside entry: sum of two immediate parents. Sum of the n-th row:

n

  • k=0

n k

  • = (1 + 1)n = 2n

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 9 / 21

slide-27
SLIDE 27

Triangles Leibniz’s Triangle

Leibniz’s Harmonic Triangle

1 1 1 2 1 2 1 3 1 6 1 3 1 4 1 12 1 12 1 4 1 5 1 20 1 30 1 20 1 5 1 6 1 30 1 60 1 60 1 30 1 6 1 7 1 42 1 105 1 140 1 105 1 42 1 7

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 10 / 21

slide-28
SLIDE 28

Triangles Leibniz’s Triangle

Leibniz’s Harmonic Triangle

1 1 1 2 1 2 1 3 1 6 1 3 1 4 1 12 1 12 1 4 1 5 1 20 1 30 1 20 1 5 1 6 1 30 1 60 1 60 1 30 1 6 1 7 1 42 1 105 1 140 1 105 1 42 1 7 1 1 1 2 1 2 1 3 1 3 1 4 1 4 1 5 1 5 1 6 1 6 1 7 1 7

Each boundary entry: 1 (n + 1) for the n-th row, n = 0, 1, · · ·

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 10 / 21

slide-29
SLIDE 29

Triangles Leibniz’s Triangle

Leibniz’s Harmonic Triangle

1 1 1 2 1 2 1 3 1 6 1 3 1 4 1 12 1 12 1 4 1 5 1 20 1 30 1 20 1 5 1 6 1 30 1 60 1 60 1 30 1 6 1 7 1 42 1 105 1 140 1 105 1 42 1 7 1 3 1 6 1 2

Each boundary entry: 1 (n + 1) for the n-th row, n = 0, 1, · · · Each entry (inside or not): sum of two immediate children.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 10 / 21

slide-30
SLIDE 30

Triangles Leibniz’s Triangle

Leibniz’s Harmonic Triangle

1 1 1 2 1 2 1 3 1 6 1 3 1 4 1 12 1 12 1 4 1 5 1 20 1 30 1 20 1 5 1 6 1 30 1 60 1 60 1 30 1 6 1 7 1 42 1 105 1 140 1 105 1 42 1 7 1 20 1 30 1 12

Each boundary entry: 1 (n + 1) for the n-th row, n = 0, 1, · · · Each entry (inside or not): sum of two immediate children.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 10 / 21

slide-31
SLIDE 31

Triangles Leibniz’s Triangle

Leibniz’s Harmonic Triangle

1 1 1 2 1 2 1 3 1 6 1 3 1 4 1 12 1 12 1 4 1 5 1 20 1 30 1 20 1 5 1 6 1 30 1 60 1 60 1 30 1 6 1 7 1 42 1 105 1 140 1 105 1 42 1 7 1 60 1 30 1 20

Each boundary entry: 1 (n + 1) for the n-th row, n = 0, 1, · · · Each entry (inside or not): sum of two immediate children.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 10 / 21

slide-32
SLIDE 32

Triangles Leibniz’s Triangle

Leibniz’s Harmonic Triangle

1 1 1 2 1 2 1 3 1 6 1 3 1 4 1 12 1 12 1 4 1 5 1 20 1 30 1 20 1 5 1 6 1 30 1 60 1 60 1 30 1 6 1 7 1 42 1 105 1 140 1 105 1 42 1 7

Each boundary entry: 1 (n + 1) for the n-th row, n = 0, 1, · · · Each entry (inside or not): sum of two immediate children. Formula for k-th entry at n-th row: n k

  • =

1 (n + 1) n

k

, k = 0, 1, · · · , n.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 10 / 21

slide-33
SLIDE 33

Triangles Denominator Triangle

Leibniz’s Denominator Triangle

1 2 2 3 6 3 4 12 12 4 5 20 30 20 5 6 30 60 60 30 6 Lnk = (n + 1) × n k

  • ,

k = 0, 1, · · · , n.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 11 / 21

slide-34
SLIDE 34

Triangles Denominator Triangle

Leibniz’s Denominator Triangle

1 2 2 3 6 3 4 12 12 4 5 20 30 20 5 6 30 60 60 30 6 1 2 3 4 5 6 Each left boundary entry: (n + 1) for the n-th row, n = 0, 1, · · · Lnk = (n + 1) × n k

  • ,

k = 0, 1, · · · , n.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 11 / 21

slide-35
SLIDE 35

Triangles Denominator Triangle

Leibniz’s Denominator Triangle

1 2 2 3 6 3 4 12 12 4 5 20 30 20 5 6 30 60 60 30 6 3 6 2 Each left boundary entry: (n + 1) for the n-th row, n = 0, 1, · · · Other entries: need a counter-part of the sum-of-children rule; Lnk = (n + 1) × n k

  • ,

k = 0, 1, · · · , n.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 11 / 21

slide-36
SLIDE 36

Triangles Denominator Triangle

Leibniz’s Denominator Triangle

1 2 2 3 6 3 4 12 12 4 5 20 30 20 5 6 30 60 60 30 6 20 30 12 Each left boundary entry: (n + 1) for the n-th row, n = 0, 1, · · · Other entries: need a counter-part of the sum-of-children rule; i.e., a relationship for L-shaped triplets. Lnk = (n + 1) × n k

  • ,

k = 0, 1, · · · , n.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 11 / 21

slide-37
SLIDE 37

Triangles Denominator Triangle

Leibniz’s Denominator Triangle

1 2 2 3 6 3 4 12 12 4 5 20 30 20 5 6 30 60 60 30 6 60 30 20 Each left boundary entry: (n + 1) for the n-th row, n = 0, 1, · · · Other entries: need a counter-part of the sum-of-children rule; i.e., a relationship for L-shaped triplets. Lnk = (n + 1) × n k

  • ,

k = 0, 1, · · · , n.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 11 / 21

slide-38
SLIDE 38

Triangles Denominator Triangle

Leibniz’s Denominator Triangle

1 2 2 3 6 3 4 12 12 4 5 20 30 20 5 6 30 60 60 30 6 6 30 60 60 30 6 Each left boundary entry: (n + 1) for the n-th row, n = 0, 1, · · · Other entries: need a counter-part of the sum-of-children rule; i.e., a relationship for L-shaped triplets. Lnk = (n + 1) × n k

  • ,

k = 0, 1, · · · , n.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 11 / 21

slide-39
SLIDE 39

Triangles Denominator Triangle

Leibniz’s Denominator Triangle

1 2 2 3 6 3 4 12 12 4 5 20 30 20 5 6 30 60 60 30 6 6 30 60 60 30 6 6× 1 5 10 10 5 1 Each left boundary entry: (n + 1) for the n-th row, n = 0, 1, · · · Other entries: need a counter-part of the sum-of-children rule; i.e., a relationship for L-shaped triplets. Lnk = (n + 1) × n k

  • ,

k = 0, 1, · · · , n. By Lnk, the horizontal row is just a multiple of the binomial row.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 11 / 21

slide-40
SLIDE 40

Triangles Denominator Triangle

Clever Idea: a sneak preview

1 2 2 3 6 3 4 12 12 4 5 20 30 20 5 6 30 60 60 30 6 6× 1 5 10 10 5 1

Theorem (Lower Bound for the LCM of any list ℓ)

For a list ℓ of positive numbers, SUM ℓ ≤ LENGTH ℓ × list_lcm ℓ.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 12 / 21

slide-41
SLIDE 41

Triangles Denominator Triangle

Clever Idea: a sneak preview

1 2 2 3 6 3 4 12 12 4 5 20 30 20 5 6 30 60 60 30 6 1 2 3 4 5 6 6× 1 5 10 10 5 1

Theorem (Lower Bound for the LCM of any list ℓ)

For a list ℓ of positive numbers, SUM ℓ ≤ LENGTH ℓ × list_lcm ℓ. Applying theorem to vertical list . . . a disappointing lower bound.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 12 / 21

slide-42
SLIDE 42

Triangles Denominator Triangle

Clever Idea: a sneak preview

1 2 2 3 6 3 4 12 12 4 5 20 30 20 5 6 30 60 60 30 6 6 30 60 60 30 6 6× 1 5 10 10 5 1

Theorem (Lower Bound for the LCM of any list ℓ)

For a list ℓ of positive numbers, SUM ℓ ≤ LENGTH ℓ × list_lcm ℓ. Applying theorem to vertical list . . . a disappointing lower bound. Applying theorem to horizontal list . . . ??

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 12 / 21

slide-43
SLIDE 43

Triangles Denominator Triangle

Clever Idea: a sneak preview

1 2 2 3 6 3 4 12 12 4 5 20 30 20 5 6 30 60 60 30 6 1 2 3 4 5 6 30 60 60 30 6 6× 1 5 10 10 5 1

Theorem (Lower Bound for the LCM of any list ℓ)

For a list ℓ of positive numbers, SUM ℓ ≤ LENGTH ℓ × list_lcm ℓ. Applying theorem to vertical list . . . a disappointing lower bound. Applying theorem to horizontal list . . . ?? Only if both lists have the same LCM . . . will this hold?

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 12 / 21

slide-44
SLIDE 44

Triplets and Paths Leibniz Triplet

Leibniz Triplet

a b c Denominator Triangle Each left boundary entry: (n + 1) for the n-th row, n = 0, 1, · · ·

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 13 / 21

slide-45
SLIDE 45

Triplets and Paths Leibniz Triplet

Leibniz Triplet

a

1 a

b c

1 b 1 c

Denominator Triangle Harmonic Triangle By sum-of-children rule: 1 a = 1 b + 1 c , Each left boundary entry: (n + 1) for the n-th row, n = 0, 1, · · ·

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 13 / 21

slide-46
SLIDE 46

Triplets and Paths Leibniz Triplet

Leibniz Triplet

a

1 a

b c

1 b 1 c

Denominator Triangle Harmonic Triangle By sum-of-children rule: 1 a = 1 b + 1 c ,

  • r

1 c = 1 a − 1 b “difference operator” Each left boundary entry: (n + 1) for the n-th row, n = 0, 1, · · ·

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 13 / 21

slide-47
SLIDE 47

Triplets and Paths Leibniz Triplet

Leibniz Triplet

a

1 a

b c

1 b 1 c

Denominator Triangle Harmonic Triangle By sum-of-children rule: 1 a = 1 b + 1 c ,

  • r

1 c = 1 a − 1 b “difference operator” Each left boundary entry: (n + 1) for the n-th row, n = 0, 1, · · · Each Leibniz triplet: c = ab (b − a),

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 13 / 21

slide-48
SLIDE 48

Triplets and Paths Leibniz Triplet

Leibniz Triplet

a

1 a

b c

1 b 1 c

Denominator Triangle Harmonic Triangle By sum-of-children rule: 1 a = 1 b + 1 c ,

  • r

1 c = 1 a − 1 b “difference operator” Each left boundary entry: (n + 1) for the n-th row, n = 0, 1, · · · Each Leibniz triplet: c = ab (b − a),

  • r

ab = c(b − a).

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 13 / 21

slide-49
SLIDE 49

Triplets and Paths Leibniz Triplet Property

Leibniz Triplet Property

a b c

For a Leibniz triplet {a, b, c}, ab = c(b − a).

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 14 / 21

slide-50
SLIDE 50

Triplets and Paths Leibniz Triplet Property

Leibniz Triplet Property

Theorem (LCM Exchange)

For a Leibniz triplet {a, b, c}, lcm b c = lcm b a. a b c

For a Leibniz triplet {a, b, c}, ab = c(b − a).

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 14 / 21

slide-51
SLIDE 51

Triplets and Paths Leibniz Triplet Property

Leibniz Triplet Property

Theorem (LCM Exchange)

For a Leibniz triplet {a, b, c}, lcm b c = lcm b a. a b c

lcm b c

For a Leibniz triplet {a, b, c}, ab = c(b − a).

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 14 / 21

slide-52
SLIDE 52

Triplets and Paths Leibniz Triplet Property

Leibniz Triplet Property

Theorem (LCM Exchange)

For a Leibniz triplet {a, b, c}, lcm b c = lcm b a. a b c

lcm b c bc gcd(b, c)

GCD×LCM = product

For a Leibniz triplet {a, b, c}, ab = c(b − a).

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 14 / 21

slide-53
SLIDE 53

Triplets and Paths Leibniz Triplet Property

Leibniz Triplet Property

Theorem (LCM Exchange)

For a Leibniz triplet {a, b, c}, lcm b c = lcm b a. a b c

lcm b c bc gcd(b, c) abc a × gcd(b, c)

GCD×LCM = product

For a Leibniz triplet {a, b, c}, ab = c(b − a).

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 14 / 21

slide-54
SLIDE 54

Triplets and Paths Leibniz Triplet Property

Leibniz Triplet Property

Theorem (LCM Exchange)

For a Leibniz triplet {a, b, c}, lcm b c = lcm b a. a b c

lcm b c bc gcd(b, c) abc a × gcd(b, c) abc gcd(ab, ac)

GCD×LCM = product

For a Leibniz triplet {a, b, c}, ab = c(b − a).

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 14 / 21

slide-55
SLIDE 55

Triplets and Paths Leibniz Triplet Property

Leibniz Triplet Property

Theorem (LCM Exchange)

For a Leibniz triplet {a, b, c}, lcm b c = lcm b a. a b c

lcm b c bc gcd(b, c) abc a × gcd(b, c) abc gcd(ab, ac) cba gcd(c(b − a), ca)

GCD×LCM = product Leibniz triplet

For a Leibniz triplet {a, b, c}, ab = c(b − a).

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 14 / 21

slide-56
SLIDE 56

Triplets and Paths Leibniz Triplet Property

Leibniz Triplet Property

Theorem (LCM Exchange)

For a Leibniz triplet {a, b, c}, lcm b c = lcm b a. a b c

lcm b c bc gcd(b, c) abc a × gcd(b, c) abc gcd(ab, ac) cba gcd(c(b − a), ca) cba c × gcd(b − a, a)

GCD×LCM = product Leibniz triplet

For a Leibniz triplet {a, b, c}, ab = c(b − a).

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 14 / 21

slide-57
SLIDE 57

Triplets and Paths Leibniz Triplet Property

Leibniz Triplet Property

Theorem (LCM Exchange)

For a Leibniz triplet {a, b, c}, lcm b c = lcm b a. a b c

lcm b c bc gcd(b, c) abc a × gcd(b, c) abc gcd(ab, ac) cba gcd(c(b − a), ca) cba c × gcd(b − a, a) ba gcd(b, a)

GCD×LCM = product Leibniz triplet Euclidean Algorithm

For a Leibniz triplet {a, b, c}, ab = c(b − a).

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 14 / 21

slide-58
SLIDE 58

Triplets and Paths Leibniz Triplet Property

Leibniz Triplet Property

Theorem (LCM Exchange)

For a Leibniz triplet {a, b, c}, lcm b c = lcm b a. a b c

lcm b c bc gcd(b, c) abc a × gcd(b, c) abc gcd(ab, ac) cba gcd(c(b − a), ca) cba c × gcd(b − a, a) ba gcd(b, a) lcm b a

GCD×LCM = product Leibniz triplet Euclidean Algorithm

For a Leibniz triplet {a, b, c}, ab = c(b − a).

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 14 / 21

slide-59
SLIDE 59

Path Transform Zig-zag Paths

Zig-zag Paths

a a b c b c Before After identical LCM

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 15 / 21

slide-60
SLIDE 60

Path Transform Zig-zag Paths

Zig-zag Paths

a a b c b c y y Before After identical LCM Arms of a Leibniz triplet extend to paths, keeping overall LCM.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 15 / 21

slide-61
SLIDE 61

Path Transform Zig-zag Paths

Zig-zag Paths

a a b c b c y y x x Before After identical LCM Arms of a Leibniz triplet extend to paths, keeping overall LCM.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 15 / 21

slide-62
SLIDE 62

Path Transform Zig-zag Paths

Zig-zag Paths

a a b c b c y y x x z z Before After identical LCM Arms of a Leibniz triplet extend to paths, keeping overall LCM. A path can zig-zag to another by a suitable Leibniz triplet.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 15 / 21

slide-63
SLIDE 63

Path Transform Zig-zag Paths

Zig-zag Paths

a a b c b c y y x x z z Before After identical LCM Arms of a Leibniz triplet extend to paths, keeping overall LCM. A path can zig-zag to another by a suitable Leibniz triplet. By Leibniz triplet property,

Theorem

⊢ p1 p2 ⇒ list_lcm p1 = list_lcm p2

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 15 / 21

slide-64
SLIDE 64

Path Transform Wriggle Paths

Wriggle Paths

1 2 2 3 6 3 4 12 12 4 5 20 30 20 5 1 2 3 4 5

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 16 / 21

slide-65
SLIDE 65

Path Transform Wriggle Paths

Wriggle Paths

1 2 2 3 6 3 4 12 12 4 5 20 30 20 5 1 2 3 4 5 2

Transform a path by successive zig-zags keeps overall LCM.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 16 / 21

slide-66
SLIDE 66

Path Transform Wriggle Paths

Wriggle Paths

1 2 2 3 6 3 4 12 12 4 5 20 30 20 5 2 2 3 4 5

Transform a path by successive zig-zags keeps overall LCM.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 16 / 21

slide-67
SLIDE 67

Path Transform Wriggle Paths

Wriggle Paths

1 2 2 3 6 3 4 12 12 4 5 20 30 20 5 2 2 3 4 5 6

Transform a path by successive zig-zags keeps overall LCM.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 16 / 21

slide-68
SLIDE 68

Path Transform Wriggle Paths

Wriggle Paths

1 2 2 3 6 3 4 12 12 4 5 20 30 20 5 2 3 6 4 5

Transform a path by successive zig-zags keeps overall LCM.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 16 / 21

slide-69
SLIDE 69

Path Transform Wriggle Paths

Wriggle Paths

1 2 2 3 6 3 4 12 12 4 5 20 30 20 5 3 2 6 4 5 3

Transform a path by successive zig-zags keeps overall LCM. A path can wriggle to another by successive zig-zags.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 16 / 21

slide-70
SLIDE 70

Path Transform Wriggle Paths

Wriggle Paths

1 2 2 3 6 3 4 12 12 4 5 20 30 20 5 3 6 3 4 5

Transform a path by successive zig-zags keeps overall LCM. A path can wriggle to another by successive zig-zags.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 16 / 21

slide-71
SLIDE 71

Path Transform Wriggle Paths

Wriggle Paths

1 2 2 3 6 3 4 12 12 4 5 20 30 20 5 6 3 3 4 5 12

Transform a path by successive zig-zags keeps overall LCM. A path can wriggle to another by successive zig-zags.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 16 / 21

slide-72
SLIDE 72

Path Transform Wriggle Paths

Wriggle Paths

1 2 2 3 6 3 4 12 12 4 5 20 30 20 5 3 4 6 12 5 12

Transform a path by successive zig-zags keeps overall LCM. A path can wriggle to another by successive zig-zags.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 16 / 21

slide-73
SLIDE 73

Path Transform Wriggle Paths

Wriggle Paths

1 2 2 3 6 3 4 12 12 4 5 20 30 20 5 4 12 3 12 5 4

Transform a path by successive zig-zags keeps overall LCM. A path can wriggle to another by successive zig-zags.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 16 / 21

slide-74
SLIDE 74

Path Transform Wriggle Paths

Wriggle Paths

1 2 2 3 6 3 4 12 12 4 5 20 30 20 5 12 12 4 4 5 20

Transform a path by successive zig-zags keeps overall LCM. A path can wriggle to another by successive zig-zags.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 16 / 21

slide-75
SLIDE 75

Path Transform Wriggle Paths

Wriggle Paths

1 2 2 3 6 3 4 12 12 4 5 20 30 20 5 12 4 5 12 20 30

Transform a path by successive zig-zags keeps overall LCM. A path can wriggle to another by successive zig-zags.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 16 / 21

slide-76
SLIDE 76

Path Transform Wriggle Paths

Wriggle Paths

1 2 2 3 6 3 4 12 12 4 5 20 30 20 5 4 5 20 12 30 20

Transform a path by successive zig-zags keeps overall LCM. A path can wriggle to another by successive zig-zags.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 16 / 21

slide-77
SLIDE 77

Path Transform Wriggle Paths

Wriggle Paths

1 2 2 3 6 3 4 12 12 4 5 20 30 20 5 5 20 30 4 20 5

Transform a path by successive zig-zags keeps overall LCM. A path can wriggle to another by successive zig-zags.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 16 / 21

slide-78
SLIDE 78

Path Transform Wriggle Paths

Wriggle Paths

1 2 2 3 6 3 4 12 12 4 5 20 30 20 5 5 20 30 20 5

Transform a path by successive zig-zags keeps overall LCM. A path can wriggle to another by successive zig-zags.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 16 / 21

slide-79
SLIDE 79

Path Transform Wriggle Paths

Wriggle Paths

1 2 2 3 6 3 4 12 12 4 5 20 30 20 5 1 2 3 4 5 20 30 20 5

Transform a path by successive zig-zags keeps overall LCM. A path can wriggle to another by successive zig-zags. By Leibniz triplet property,

Theorem

⊢ p1 ∗ p2 ⇒ list_lcm p1 = list_lcm p2

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 16 / 21

slide-80
SLIDE 80

Better LCM Bound Proof Idea

Proof Idea

1 2 2 3 6 3 4 12 12 4 5 20 30 20 5 1 2 3 4 5

list_lcm [1; 2; 3; 4; 5]

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 17 / 21

slide-81
SLIDE 81

Better LCM Bound Proof Idea

Proof Idea

1 2 2 3 6 3 4 12 12 4 5 20 30 20 5 1 2 3 4 5 20 30 20 5

list_lcm [1; 2; 3; 4; 5] = list_lcm [5; 20; 30; 20; 5] by wriggling path transform

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 17 / 21

slide-82
SLIDE 82

Better LCM Bound Proof Idea

Proof Idea

1 2 2 3 6 3 4 12 12 4 5 20 30 20 5 1 2 3 4 5 20 30 20 5

list_lcm [1; 2; 3; 4; 5] = list_lcm [5; 20; 30; 20; 5] by wriggling path transform = 5 × list_lcm [1; 4; 6; 4; 1] note 5 = LENGTH of list

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 17 / 21

slide-83
SLIDE 83

Better LCM Bound Proof Idea

Proof Idea

1 2 2 3 6 3 4 12 12 4 5 20 30 20 5 1 2 3 4 5 20 30 20 5

list_lcm [1; 2; 3; 4; 5] = list_lcm [5; 20; 30; 20; 5] by wriggling path transform = 5 × list_lcm [1; 4; 6; 4; 1] note 5 = LENGTH of list ≥ 1 + 4 + 6 + 4 + 1 by SUM ℓ ≤ LENGTH ℓ × list_lcm ℓ

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 17 / 21

slide-84
SLIDE 84

Better LCM Bound Proof Idea

Proof Idea

1 2 2 3 6 3 4 12 12 4 5 20 30 20 5 1 2 3 4 5 20 30 20 5

list_lcm [1; 2; 3; 4; 5] = list_lcm [5; 20; 30; 20; 5] by wriggling path transform = 5 × list_lcm [1; 4; 6; 4; 1] note 5 = LENGTH of list ≥ 1 + 4 + 6 + 4 + 1 by SUM ℓ ≤ LENGTH ℓ × list_lcm ℓ = (1 + 1)4 = 24 by binomial expansion.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 17 / 21

slide-85
SLIDE 85

Better LCM Bound Proof Idea

Proof Idea

1 2 2 3 6 3 4 12 12 4 5 20 30 20 5 1 2 3 4 5 20 30 20 5

list_lcm [1; 2; 3; 4; 5] = list_lcm [5; 20; 30; 20; 5] by wriggling path transform = 5 × list_lcm [1; 4; 6; 4; 1] note 5 = LENGTH of list = list_lcm [ 1 ; 4 ; 6 ; 4 ; 1 ] by unrolling multiplication + list_lcm [ 1 ; 4 ; 6 ; 4 ; 1 ] + list_lcm [ 1 ; 4 ; 6 ; 4 ; 1 ] + list_lcm [ 1 ; 4 ; 6 ; 4 ; 1 ] + list_lcm [ 1 ; 4 ; 6 ; 4 ; 1 ] picking diagonal elements ≥ 1 + 4 + 6 + 4 + 1 by SUM ℓ ≤ LENGTH ℓ × list_lcm ℓ = (1 + 1)4 = 24 by binomial expansion.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 17 / 21

slide-86
SLIDE 86

Better LCM Bound Proof Idea

Reference

Questions

Scripts https://bitbucket.org/jhlchan/hol/src/ subfolder: algebra/lib. Paper https://bitbucket.org/jhlchan/hol/downloads

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 18 / 21

slide-87
SLIDE 87

Postscript

Pascal’s Triangle (1665)

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 19 / 21

slide-88
SLIDE 88

Postscript

Leibniz’s Triangle (1672)

To see the modern Leibniz’s Triangle, read the top: skip columns “0” and “1”, divide column “2” by 1, column “3” by 2, column “4” by 3, etc.

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 20 / 21

slide-89
SLIDE 89

Postscript

Math Stack Exchange

Hing-Lun Chan & Michael Norrish (ANU) Bounding LCM with Triangles ITP 2016 21 / 21