acl2 veri cation of simplicial complexes - chalmers

85
ACL2 verification of Simplicial Complexes programs for the Kenzo system 1 onathan Heras and Vico Pascual Departamento de Matem´ aticas y Computaci´on Universidad de La Rioja Spain April 21, 2010 1 Partially supported by Ministerio de Educaci´on y Ciencia, project MTM2009-13842-C02-01, and by European Commission FP7, STREP project ForMath J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 1/28

Upload: others

Post on 11-Feb-2022

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ACL2 veri cation of Simplicial Complexes - Chalmers

ACL2 verification of Simplicial Complexesprograms for the Kenzo system1

Jonathan Heras and Vico Pascual

Departamento de Matematicas y ComputacionUniversidad de La Rioja

Spain

April 21, 2010

1Partially supported by Ministerio de Educacion y Ciencia, project MTM2009-13842-C02-01, and by European

Commission FP7, STREP project ForMath

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 1/28

Page 2: ACL2 veri cation of Simplicial Complexes - Chalmers

Table of Contents

1 Introduction

2 New Kenzo Module

3 Certification of programs

4 Conclusions and further work

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 2/28

Page 3: ACL2 veri cation of Simplicial Complexes - Chalmers

Introduction

Table of Contents

1 Introduction

2 New Kenzo Module

3 Certification of programs

4 Conclusions and further work

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 3/28

Page 4: ACL2 veri cation of Simplicial Complexes - Chalmers

Introduction Kenzo

Kenzo

Kenzo

Symbolic Computation System devoted to Algebraic Topology

Homology groups unreachable by any other meansA Common Lisp packageWorks with the main mathematical structures in SimplicialAlgebraic Topology

Increasing the reliability of Kenzo by means of TheoremProvers:

IsabelleCoqACL2

- simplicial structures

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 4/28

Page 5: ACL2 veri cation of Simplicial Complexes - Chalmers

Introduction Kenzo

Kenzo

Kenzo

Symbolic Computation System devoted to Algebraic TopologyHomology groups unreachable by any other means

A Common Lisp packageWorks with the main mathematical structures in SimplicialAlgebraic Topology

Increasing the reliability of Kenzo by means of TheoremProvers:

IsabelleCoqACL2

- simplicial structures

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 4/28

Page 6: ACL2 veri cation of Simplicial Complexes - Chalmers

Introduction Kenzo

Kenzo

Kenzo

Symbolic Computation System devoted to Algebraic TopologyHomology groups unreachable by any other meansA Common Lisp package

Works with the main mathematical structures in SimplicialAlgebraic Topology

Increasing the reliability of Kenzo by means of TheoremProvers:

IsabelleCoqACL2

- simplicial structures

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 4/28

Page 7: ACL2 veri cation of Simplicial Complexes - Chalmers

Introduction Kenzo

Kenzo

Kenzo

Symbolic Computation System devoted to Algebraic TopologyHomology groups unreachable by any other meansA Common Lisp packageWorks with the main mathematical structures in SimplicialAlgebraic Topology

Increasing the reliability of Kenzo by means of TheoremProvers:

IsabelleCoqACL2

- simplicial structures

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 4/28

Page 8: ACL2 veri cation of Simplicial Complexes - Chalmers

Introduction Kenzo

Kenzo

Kenzo

Symbolic Computation System devoted to Algebraic TopologyHomology groups unreachable by any other meansA Common Lisp packageWorks with the main mathematical structures in SimplicialAlgebraic Topology

Increasing the reliability of Kenzo by means of TheoremProvers:

IsabelleCoqACL2

- simplicial structures

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 4/28

Page 9: ACL2 veri cation of Simplicial Complexes - Chalmers

Introduction Kenzo

Kenzo

Kenzo

Symbolic Computation System devoted to Algebraic TopologyHomology groups unreachable by any other meansA Common Lisp packageWorks with the main mathematical structures in SimplicialAlgebraic Topology

Increasing the reliability of Kenzo by means of TheoremProvers:

IsabelleCoqACL2 - simplicial structures

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 4/28

Page 10: ACL2 veri cation of Simplicial Complexes - Chalmers

Introduction ACL2

ACL2

ACL2 (A Computational Logic for an Applicative CommonLisp)

ACL2

Programming LanguageFirst-Order LogicTheorem Prover

Proof techniques:

SimplificationInduction“The Method”

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 5/28

Page 11: ACL2 veri cation of Simplicial Complexes - Chalmers

Introduction ACL2

ACL2

ACL2 (A Computational Logic for an Applicative CommonLisp)

ACL2

Programming LanguageFirst-Order LogicTheorem Prover

Proof techniques:

SimplificationInduction“The Method”

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 5/28

Page 12: ACL2 veri cation of Simplicial Complexes - Chalmers

Introduction ACL2

ACL2

ACL2 (A Computational Logic for an Applicative CommonLisp)

ACL2

Programming LanguageFirst-Order LogicTheorem Prover

Proof techniques:

SimplificationInduction“The Method”

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 5/28

Page 13: ACL2 veri cation of Simplicial Complexes - Chalmers

Introduction Goal

Goal

A new certified module for the Kenzo system

Simplicial Complexes

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 6/28

Page 14: ACL2 veri cation of Simplicial Complexes - Chalmers

Introduction From “General” Topology to Homological Algebra

From “General” Topology to Homological Algebra

Topological Space

Simplicial Complex

Simplicial Set

Homology

triangulation

graded structure

computing

properties

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 7/28

Page 15: ACL2 veri cation of Simplicial Complexes - Chalmers

Introduction From “General” Topology to Homological Algebra

From “General” Topology to Homological Algebra

Topological Space

Simplicial Complex

Simplicial Set

Homology

triangulation

graded structure

computing

properties

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 7/28

Page 16: ACL2 veri cation of Simplicial Complexes - Chalmers

Introduction From “General” Topology to Homological Algebra

From “General” Topology to Homological Algebra

Topological Space

Simplicial Complex

Simplicial Set

Homology

triangulation

graded structure

computing

properties

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 7/28

Page 17: ACL2 veri cation of Simplicial Complexes - Chalmers

Introduction From “General” Topology to Homological Algebra

From “General” Topology to Homological Algebra

Topological Space

Simplicial Complex

Simplicial Set

Homology

triangulation

graded structure

computing

properties

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 7/28

Page 18: ACL2 veri cation of Simplicial Complexes - Chalmers

Introduction From “General” Topology to Homological Algebra

From “General” Topology to Homological Algebra

Topological Space

Simplicial Complex

Simplicial Set

Homology

triangulation

graded structure

computing

properties

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 7/28

Page 19: ACL2 veri cation of Simplicial Complexes - Chalmers

Introduction From “General” Topology to Homological Algebra

An example

Topological Space

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 8/28

Page 20: ACL2 veri cation of Simplicial Complexes - Chalmers

Introduction From “General” Topology to Homological Algebra

An example

Topological Space

'

Simplicial complex

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 8/28

Page 21: ACL2 veri cation of Simplicial Complexes - Chalmers

Introduction From “General” Topology to Homological Algebra

An example

Topological Space

Simplicial complex Simplicial set

'

K0 = vertices (4 vertices)K1 = edges (6 edges)K2 = triangles (4 triangles)

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 8/28

Page 22: ACL2 veri cation of Simplicial Complexes - Chalmers

Introduction From “General” Topology to Homological Algebra

An example

Topological Space

Simplicial complex Simplicial set

Homology groups

'

K0 = vertices (4 vertices)K1 = edges (6 edges)K2 = triangles (4 triangles)

. . .H3 = 0H2 = ZH1 = 0H0 = Z

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 8/28

Page 23: ACL2 veri cation of Simplicial Complexes - Chalmers

Introduction From “General” Topology to Homological Algebra

An example

Topological Space

Simplicial complex Simplicial set

Homology groups

'

K0 = vertices (4 vertices)K1 = edges (6 edges)K2 = triangles (4 triangles)

. . .H3 = 0H2 = ZH1 = 0H0 = Z

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 8/28

Page 24: ACL2 veri cation of Simplicial Complexes - Chalmers

Introduction Simplicial Complexes

Simplicial Complexes

Definition

A simplicial complex C is a finite set of simplexes satisfying the properties:

if σn is a simplex of C , and τp is a face of σn, then τp is in C ;

if σn and τp are simplexes of C , then σn ∩ τp is a common face of σn and τp .

0

1

2

3 4

5

6

C = {∅, {0}, {1}, {2}, {3}, {4}, {5}, {6},{0, 1}, {0, 2}, {0, 3}, {1, 2}, {1, 3}, {2, 3}, {3, 4}, {4, 5}, {4, 6}, {5, 6},{0, 1, 2}, {4, 5, 6}}

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 9/28

Page 25: ACL2 veri cation of Simplicial Complexes - Chalmers

Introduction Simplicial Complexes

Simplicial Complexes

Facets: maximal elements of the simplicial complex

0

1

2

3 4

5

6

facets of this simplicial complex are: {{1, 3}, {3, 4}, {0, 3}, {2, 3}, {0, 1, 2}, {4, 5, 6}}

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 9/28

Page 26: ACL2 veri cation of Simplicial Complexes - Chalmers

Introduction Simplicial Complexes

Simplicial Complexes

Facets: maximal elements of the simplicial complex

0

1

2

3 4

5

6

facets of this simplicial complex are: {{1, 3}, {3, 4}, {0, 3}, {2, 3}, {0, 1, 2}, {4, 5, 6}}{4, 5, 6} → {∅, {4}, {5}, {6}, {4, 5}, {5, 6}, {4, 6}, {4, 5, 6}}

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 9/28

Page 27: ACL2 veri cation of Simplicial Complexes - Chalmers

Introduction Simplicial Complexes

Simplicial Complexes

Facets: maximal elements of the simplicial complex

0

1

2

3 4

5

6

C = {∅, {0}, {1}, {2}, {3}, {4}, {5}, {6},{0, 1}, {0, 2}, {0, 3}, {1, 2}, {1, 3}, {2, 3}, {3, 4}, {4, 5}, {4, 6}, {5, 6},{0, 1, 2}, {4, 5, 6}}

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 9/28

Page 28: ACL2 veri cation of Simplicial Complexes - Chalmers

Introduction Simplicial Sets

Simplicial Complexes to Simplicial Sets

Simplicial Complexgraded structure

Simplicial Set

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 10/28

Page 29: ACL2 veri cation of Simplicial Complexes - Chalmers

Introduction Simplicial Sets

Simplicial Complexes to Simplicial Sets

Definition

A simplicial set K , is a union K =⋃

q≥0K q , where the K q are disjoints sets, together

with functions:

∂qi : K q → K q−1, q > 0, i = 0, . . . , q,ηq

i : K q → K q+1, q ≥ 0, i = 0, . . . , q,

subject to the relations:

(1) ∂q−1i ∂q

j = ∂q−1j−1 ∂

qi if i < j ,

(2) ηq+1i ηq

j = ηq+1j ηq

i−1 if i > j ,

(3) ∂q+1i ηq

j = ηq−1j−1 ∂

qi if i < j ,

(4) ∂q+1i ηq

i = identity = ∂q+1i+1 η

qi ,

(5) ∂q+1i ηq

j = ηq−1j ∂q

i−1 if i > j + 1,

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 10/28

Page 30: ACL2 veri cation of Simplicial Complexes - Chalmers

Introduction Simplicial Sets

Simplicial Complexes to Simplicial Sets

Definition

Let C be a simplicial complex. Then the simplicial set K(C) canonically associatedwith C is defined as follows. The set K n(C) of n-simplexes is the set made of thesimplexes of cardinality n + 1 of C . In addition, let a simplex {v0, . . . , vq} the face anddegeneracy operators are defined as follows:

∂i ({v0, . . . , vi , . . . , vq}) = {v0, . . . , vi−1, vi+1, . . . , vq}ηi ({v0, . . . , vi , . . . , vq}) = {v0, . . . , vi , vi , . . . , vq}

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 10/28

Page 31: ACL2 veri cation of Simplicial Complexes - Chalmers

Introduction Goals

Goals

New Kenzo module:

program1: facets → simplicial complexprogram2: simplicial complex → simplicial set

Certification of the correctness of the programs

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 11/28

Page 32: ACL2 veri cation of Simplicial Complexes - Chalmers

Introduction Goals

Goals

New Kenzo module:

program1: facets → simplicial complexprogram2: simplicial complex → simplicial set

Certification of the correctness of the programs

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 11/28

Page 33: ACL2 veri cation of Simplicial Complexes - Chalmers

Introduction Goals

Goals

New Kenzo module:

program1: facets → simplicial complexprogram2: simplicial complex → simplicial set

Certification of the correctness of the programs

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 11/28

Page 34: ACL2 veri cation of Simplicial Complexes - Chalmers

New Kenzo Module

Table of Contents

1 Introduction

2 New Kenzo ModuleProgram1: Simplicial Complex from facetsProgram2: Simplicial Set from Simplicial Complex

3 Certification of programs

4 Conclusions and further work

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 12/28

Page 35: ACL2 veri cation of Simplicial Complexes - Chalmers

New Kenzo Module Program1: Simplicial Complex from facets

Program1: Simplicial Complex from facets

simplicial-complex-generator:Input: a list of simplexesOutput: a simplicial complex

simplicial-complex-generator-with-duplicates:Input: a list of simplexesOutput: a list of simplexes with the properties of simplicialcomplexes but with duplicatessimplicial-complex-generator-from-simplex:Input: a simplexOutput: a simplicial complex

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 13/28

Page 36: ACL2 veri cation of Simplicial Complexes - Chalmers

New Kenzo Module Program1: Simplicial Complex from facets

Program1: Simplicial Complex from facets

simplicial-complex-generator:Input: a list of simplexesOutput: a simplicial complex

simplicial-complex-generator-with-duplicates:Input: a list of simplexesOutput: a list of simplexes with the properties of simplicialcomplexes but with duplicates

simplicial-complex-generator-from-simplex:Input: a simplexOutput: a simplicial complex

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 13/28

Page 37: ACL2 veri cation of Simplicial Complexes - Chalmers

New Kenzo Module Program1: Simplicial Complex from facets

Program1: Simplicial Complex from facets

simplicial-complex-generator:Input: a list of simplexesOutput: a simplicial complex

simplicial-complex-generator-with-duplicates:Input: a list of simplexesOutput: a list of simplexes with the properties of simplicialcomplexes but with duplicatessimplicial-complex-generator-from-simplex:Input: a simplexOutput: a simplicial complex

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 13/28

Page 38: ACL2 veri cation of Simplicial Complexes - Chalmers

New Kenzo Module Program1: Simplicial Complex from facets

Example

Torus simplicial complex S1 × S1:

0 0

0 0

1

1

2

2

3 3

4 45

6

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

> (setf torus-sc (simplicial-complex-generator

’((0 1 3) (0 1 5) (0 2 4)

(0 2 6) (0 3 6) (0 4 5)

(1 2 5) (1 2 6) (1 3 4)

(1 4 6) (2 3 4) (2 3 5)

(3 5 6) (4 5 6)))) z((0 1 3) (0 1) (0 1 5) (0 2 4) (0 2) ...). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 14/28

Page 39: ACL2 veri cation of Simplicial Complexes - Chalmers

New Kenzo Module Program2: Simplicial Set from Simplicial Complex

Program2: Simplicial Set from Simplicial Complex

ss-from-sc:Input: a simplicial complexOutput: a simplicial set

Kenzo function build-smst:. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

(build-smst:basis basis:face face...)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

basis: a function returning the list of simplexes in adimensionface: a function for face operationdegeneracy: not included

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 15/28

Page 40: ACL2 veri cation of Simplicial Complexes - Chalmers

New Kenzo Module Program2: Simplicial Set from Simplicial Complex

Program2: Simplicial Set from Simplicial Complex

ss-from-sc:Input: a simplicial complexOutput: a simplicial set

Kenzo function build-smst:. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

(build-smst:basis basis:face face...)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

basis: a function returning the list of simplexes in adimensionface: a function for face operationdegeneracy: not included

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 15/28

Page 41: ACL2 veri cation of Simplicial Complexes - Chalmers

New Kenzo Module Program2: Simplicial Set from Simplicial Complex

Example

Simplicial set canonically associated to torus-sc:. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

> (setf torus-ss (ss-from-sc torus-sc)) z[K1 Simplicial-Set]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

> (basis torus-ss 1) z((0 1) (0 2) (0 6) (0 3) (0 5) (0 4) (1 5) (2 6) (1 2) (1 3) ...). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

> (homology torus-ss 0 3) zHomology in dimension 0:

Component Z

Homology in dimension 1:

Component Z

Component Z

Homology in dimension 2:

Component Z. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

H0(torus) = Z, H1(torus) = Z⊕ Z and H2(torus) = Z

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 16/28

Page 42: ACL2 veri cation of Simplicial Complexes - Chalmers

New Kenzo Module Program2: Simplicial Set from Simplicial Complex

Example

Simplicial set canonically associated to torus-sc:. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

> (setf torus-ss (ss-from-sc torus-sc)) z[K1 Simplicial-Set]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

> (basis torus-ss 1) z((0 1) (0 2) (0 6) (0 3) (0 5) (0 4) (1 5) (2 6) (1 2) (1 3) ...). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

> (homology torus-ss 0 3) zHomology in dimension 0:

Component Z

Homology in dimension 1:

Component Z

Component Z

Homology in dimension 2:

Component Z. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

H0(torus) = Z, H1(torus) = Z⊕ Z and H2(torus) = Z

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 16/28

Page 43: ACL2 veri cation of Simplicial Complexes - Chalmers

New Kenzo Module Program2: Simplicial Set from Simplicial Complex

Example

Simplicial set canonically associated to torus-sc:. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

> (setf torus-ss (ss-from-sc torus-sc)) z[K1 Simplicial-Set]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

> (basis torus-ss 1) z((0 1) (0 2) (0 6) (0 3) (0 5) (0 4) (1 5) (2 6) (1 2) (1 3) ...). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

> (homology torus-ss 0 3) zHomology in dimension 0:

Component Z

Homology in dimension 1:

Component Z

Component Z

Homology in dimension 2:

Component Z. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

H0(torus) = Z, H1(torus) = Z⊕ Z and H2(torus) = ZJ. Heras and V. Pascual ACL2 verification of Simplicial Complexes 16/28

Page 44: ACL2 veri cation of Simplicial Complexes - Chalmers

Certification of programs

Table of Contents

1 Introduction

2 New Kenzo Module

3 Certification of programsTwo equivalent algorithms for program1Certification of program1Certification of program2

4 Conclusions and further work

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 17/28

Page 45: ACL2 veri cation of Simplicial Complexes - Chalmers

Certification of programs Two equivalent algorithms for program1

Problem with program1

simplicial-complex-generator program:

Follows simple inductive schemas

Inefficient

Input of a list of 11613 simplexes:. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

> (simplicial-complex-generator ...) zError: Stack overflow (signal 1000)

[condition type: SYNCHRONOUS-OPERATING-SYSTEM-SIGNAL]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

optimized-simplicial-complex-generator:

Equivalent efficient program

Memoization technique

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 18/28

Page 46: ACL2 veri cation of Simplicial Complexes - Chalmers

Certification of programs Two equivalent algorithms for program1

Problem with program1

simplicial-complex-generator program:

Follows simple inductive schemas

Inefficient

Input of a list of 11613 simplexes:. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

> (simplicial-complex-generator ...) zError: Stack overflow (signal 1000)

[condition type: SYNCHRONOUS-OPERATING-SYSTEM-SIGNAL]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

optimized-simplicial-complex-generator:

Equivalent efficient program

Memoization technique

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 18/28

Page 47: ACL2 veri cation of Simplicial Complexes - Chalmers

Certification of programs Two equivalent algorithms for program1

Problem with program1

simplicial-complex-generator program:

Follows simple inductive schemas

Inefficient

Input of a list of 11613 simplexes:. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

> (simplicial-complex-generator ...) zError: Stack overflow (signal 1000)

[condition type: SYNCHRONOUS-OPERATING-SYSTEM-SIGNAL]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

optimized-simplicial-complex-generator:

Equivalent efficient program

Memoization technique

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 18/28

Page 48: ACL2 veri cation of Simplicial Complexes - Chalmers

Certification of programs Two equivalent algorithms for program1

Problem with program1

simplicial-complex-generator program:

Follows simple inductive schemas

Inefficient

Input of a list of 11613 simplexes:. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

> (simplicial-complex-generator ...) zError: Stack overflow (signal 1000)

[condition type: SYNCHRONOUS-OPERATING-SYSTEM-SIGNAL]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

optimized-simplicial-complex-generator:

Equivalent efficient program

Memoization technique

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 18/28

Page 49: ACL2 veri cation of Simplicial Complexes - Chalmers

Certification of programs Two equivalent algorithms for program1

Problem with program1

simplicial-complex-generator program:

Follows simple inductive schemas

Inefficient

Input of a list of 11613 simplexes:. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

> (simplicial-complex-generator ...) zError: Stack overflow (signal 1000)

[condition type: SYNCHRONOUS-OPERATING-SYSTEM-SIGNAL]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

optimized-simplicial-complex-generator:

Equivalent efficient program

Memoization technique

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 18/28

Page 50: ACL2 veri cation of Simplicial Complexes - Chalmers

Certification of programs Two equivalent algorithms for program1

Problem with program1

simplicial-complex-generator program:

Follows simple inductive schemas

Inefficient

Input of a list of 11613 simplexes:. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

> (simplicial-complex-generator ...) zError: Stack overflow (signal 1000)

[condition type: SYNCHRONOUS-OPERATING-SYSTEM-SIGNAL]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

optimized-simplicial-complex-generator:

Equivalent efficient program

Memoization technique

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 18/28

Page 51: ACL2 veri cation of Simplicial Complexes - Chalmers

Certification of programs Two equivalent algorithms for program1

Two equivalent algorithms for program1

Situation:

simplicial-complex-generator program is

specially designed to be proved;programmed in ACL2 (and, of course, Common Lisp);not efficient;tested;proved in ACL2.

optimized-simplicial-complex-generator program is

designed to be efficient;written in Common Lisp;efficient;tested;unproved.

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 19/28

Page 52: ACL2 veri cation of Simplicial Complexes - Chalmers

Certification of programs Two equivalent algorithms for program1

Two equivalent algorithms for program1

Situation:

simplicial-complex-generator program is

specially designed to be proved;

programmed in ACL2 (and, of course, Common Lisp);not efficient;tested;proved in ACL2.

optimized-simplicial-complex-generator program is

designed to be efficient;

written in Common Lisp;efficient;tested;unproved.

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 19/28

Page 53: ACL2 veri cation of Simplicial Complexes - Chalmers

Certification of programs Two equivalent algorithms for program1

Two equivalent algorithms for program1

Situation:

simplicial-complex-generator program is

specially designed to be proved;programmed in ACL2 (and, of course, Common Lisp);

not efficient;tested;proved in ACL2.

optimized-simplicial-complex-generator program is

designed to be efficient;written in Common Lisp;

efficient;tested;unproved.

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 19/28

Page 54: ACL2 veri cation of Simplicial Complexes - Chalmers

Certification of programs Two equivalent algorithms for program1

Two equivalent algorithms for program1

Situation:

simplicial-complex-generator program is

specially designed to be proved;programmed in ACL2 (and, of course, Common Lisp);not efficient;

tested;proved in ACL2.

optimized-simplicial-complex-generator program is

designed to be efficient;written in Common Lisp;efficient;

tested;unproved.

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 19/28

Page 55: ACL2 veri cation of Simplicial Complexes - Chalmers

Certification of programs Two equivalent algorithms for program1

Two equivalent algorithms for program1

Situation:

simplicial-complex-generator program is

specially designed to be proved;programmed in ACL2 (and, of course, Common Lisp);not efficient;tested;

proved in ACL2.

optimized-simplicial-complex-generator program is

designed to be efficient;written in Common Lisp;efficient;tested;

unproved.

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 19/28

Page 56: ACL2 veri cation of Simplicial Complexes - Chalmers

Certification of programs Two equivalent algorithms for program1

Two equivalent algorithms for program1

Situation:

simplicial-complex-generator program is

specially designed to be proved;programmed in ACL2 (and, of course, Common Lisp);not efficient;tested;proved in ACL2.

optimized-simplicial-complex-generator program is

designed to be efficient;written in Common Lisp;efficient;tested;unproved.

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 19/28

Page 57: ACL2 veri cation of Simplicial Complexes - Chalmers

Certification of programs Two equivalent algorithms for program1

Two equivalent algorithms for program1

optimized-simplicial-complex-generator “equivalent to”simplicial-complex-generator.

Not a proof of the equivalence

Automated testing

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

(defun automated-testing ()

(let ((cases (generate-test-cases 100000)))

(dolist (case cases)

(if (not (equal-as-sc (simplicial-complex-generator case)

(optimized-simplicial-complex-generator case)))

(report-on-failure case))))

). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

A Common Lisp (but not ACL2) program

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 20/28

Page 58: ACL2 veri cation of Simplicial Complexes - Chalmers

Certification of programs Two equivalent algorithms for program1

Two equivalent algorithms for program1

optimized-simplicial-complex-generator “equivalent to”simplicial-complex-generator.

Not a proof of the equivalence

Automated testing

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

(defun automated-testing ()

(let ((cases (generate-test-cases 100000)))

(dolist (case cases)

(if (not (equal-as-sc (simplicial-complex-generator case)

(optimized-simplicial-complex-generator case)))

(report-on-failure case))))

). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

A Common Lisp (but not ACL2) program

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 20/28

Page 59: ACL2 veri cation of Simplicial Complexes - Chalmers

Certification of programs Two equivalent algorithms for program1

Two equivalent algorithms for program1

optimized-simplicial-complex-generator “equivalent to”simplicial-complex-generator.

Not a proof of the equivalence

Automated testing

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

(defun automated-testing ()

(let ((cases (generate-test-cases 100000)))

(dolist (case cases)

(if (not (equal-as-sc (simplicial-complex-generator case)

(optimized-simplicial-complex-generator case)))

(report-on-failure case))))

). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

A Common Lisp (but not ACL2) program

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 20/28

Page 60: ACL2 veri cation of Simplicial Complexes - Chalmers

Certification of programs Certification of program1

ACL2 definitions for Simplicial Complexes

Definition (Simplicial Complex)

A simplicial complex C is a finite set of simplexes satisfying the properties:

if σn is a simplex of C , and τp is a face of σn, then τp is in C ;

if σn and τp are simplexes of C , then σn ∩ τp is a common face of σn and τp .

simplex: simplex-p

list of simplexes: list-of-simplexes-p

without duplicates: without-duplicates-p

face: subset-p

member: member-equal

intersection: intersect

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 21/28

Page 61: ACL2 veri cation of Simplicial Complexes - Chalmers

Certification of programs Certification of program1

ACL2 definitions for Simplicial Complexes

Definition (Simplicial Complex)

A simplicial complex C is a finite set of simplexes satisfying the properties:

if σn is a simplex of C , and τp is a face of σn, then τp is in C ;

if σn and τp are simplexes of C , then σn ∩ τp is a common face of σn and τp .

simplex: simplex-p

list of simplexes: list-of-simplexes-p

without duplicates: without-duplicates-p

face: subset-p

member: member-equal

intersection: intersect

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 21/28

Page 62: ACL2 veri cation of Simplicial Complexes - Chalmers

Certification of programs Certification of program1

ACL2 definitions for Simplicial Complexes

Definition (Simplicial Complex)

A simplicial complex C is a finite set of simplexes satisfying the properties:

if σn is a simplex of C , and τp is a face of σn, then τp is in C ;

if σn and τp are simplexes of C , then σn ∩ τp is a common face of σn and τp .

simplex: simplex-p

list of simplexes: list-of-simplexes-p

without duplicates: without-duplicates-p

face: subset-p

member: member-equal

intersection: intersect

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 21/28

Page 63: ACL2 veri cation of Simplicial Complexes - Chalmers

Certification of programs Certification of program1

ACL2 definitions for Simplicial Complexes

Definition (Simplicial Complex)

A simplicial complex C is a finite set of simplexes satisfying the properties:

if σn is a simplex of C , and τp is a face of σn, then τp is in C ;

if σn and τp are simplexes of C , then σn ∩ τp is a common face of σn and τp .

simplex: simplex-p

list of simplexes: list-of-simplexes-p

without duplicates: without-duplicates-p

face: subset-p

member: member-equal

intersection: intersect

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 21/28

Page 64: ACL2 veri cation of Simplicial Complexes - Chalmers

Certification of programs Certification of program1

ACL2 definitions for Simplicial Complexes

Definition (Simplicial Complex)

A simplicial complex C is a finite set of simplexes satisfying the properties:

if σn is a simplex of C , and τp is a face of σn, then τp is in C ;

if σn and τp are simplexes of C , then σn ∩ τp is a common face of σn and τp .

simplex: simplex-p

list of simplexes: list-of-simplexes-p

without duplicates: without-duplicates-p

face: subset-p

member: member-equal

intersection: intersect

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 21/28

Page 65: ACL2 veri cation of Simplicial Complexes - Chalmers

Certification of programs Certification of program1

ACL2 definitions for Simplicial Complexes

Definition (Simplicial Complex)

A simplicial complex C is a finite set of simplexes satisfying the properties:

if σn is a simplex of C , and τp is a face of σn, then τp is in C ;

if σn and τp are simplexes of C , then σn ∩ τp is a common face of σn and τp .

simplex: simplex-p

list of simplexes: list-of-simplexes-p

without duplicates: without-duplicates-p

face: subset-p

member: member-equal

intersection: intersect

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 21/28

Page 66: ACL2 veri cation of Simplicial Complexes - Chalmers

Certification of programs Certification of program1

ACL2 theorems for Simplicial Complexes

Definition (Simplicial Complex)

A simplicial complex C is a finite set of simplexes satisfying the properties:

if σn is a simplex of C , and τp is a face of σn, then τp is in C ;

if σn and τp are simplexes of C , then σn ∩ τp is a common face of σn and τp .

Lemma

Let ls be a list of simplexes, then (simplicial-complex-generator ls) buildsa list of simplexes.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

(defthm simplicial-complex-generator-theorem-1

(implies (list-of-simplexes-p ls)

(and (list-of-simplexes-p (simplicial-complex-generator ls))

(without-duplicates-p (simplicial-complex-generator ls)))). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 22/28

Page 67: ACL2 veri cation of Simplicial Complexes - Chalmers

Certification of programs Certification of program1

ACL2 theorems for Simplicial Complexes

Definition (Simplicial Complex)

A simplicial complex C is a finite set of simplexes satisfying the properties:

if σn is a simplex of C , and τp is a face of σn, then τp is in C ;

if σn and τp are simplexes of C , then σn ∩ τp is a common face of σn and τp .

Lemma

Let x be a simplex and ls be a list of simplexes, if x is in(simplicial-complex-generator ls) and y is a face of x, then y is in(simplicial-complex-generator ls).

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

(defthm simplicial-complex-generator-theorem-2

(implies (and (simplex-p s1)

(simplex-p s3)

(list-of-simplexes-p ls)

(member-equal s1 (simplicial-complex-generator ls))

(subset-p s3 s1))

(member-equal s3 (simplicial-complex-generator ls)))). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 22/28

Page 68: ACL2 veri cation of Simplicial Complexes - Chalmers

Certification of programs Certification of program1

ACL2 theorems for Simplicial Complexes

Definition (Simplicial Complex)

A simplicial complex C is a finite set of simplexes satisfying the properties:

if σn is a simplex of C , and τp is a face of σn, then τp is in C ;

if σn and τp are simplexes of C , then σn ∩ τp is a common face of σn and τp .

Lemma

Let x , y be simplexes and ls be a list of simplexes, if x and y are in(simplicial-complex-generator ls), then x ∩ y is a common face of x andy.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

(defthm simplicial-complex-generator-theorem-3

(implies (and (list-of-simplexes-p ls)

(member-equal s1 (simplicial-complex-generator ls))

(member-equal s2 (simplicial-complex-generator ls)))

(and (subset-p (intersect s1 s2) s1)

(subset-p (intersect s1 s2) s2)))). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 22/28

Page 69: ACL2 veri cation of Simplicial Complexes - Chalmers

Certification of programs Certification of program1

ACL2 theorems for Simplicial Complexes

Theorem

Let ls be a list of simplexes, then (simplicial-complex-generatorls) constructs a simplicial complex.

Proof.

Apply the three previous lemmas

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 22/28

Page 70: ACL2 veri cation of Simplicial Complexes - Chalmers

Certification of programs Certification of program2

Theorem for Simplicial Sets from Simplicial Complexes

Proving truthfulness of Kenzo statements like:. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

> (setf torus-ss (ss-from-sc torus-sc)) z[K1 Simplicial-Set]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

where torus-sc is a simplicial complex

Theorem

Let sc be a simplicial complex, then (ss-from-sc sc) constructs asimplicial set.

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 23/28

Page 71: ACL2 veri cation of Simplicial Complexes - Chalmers

Certification of programs Certification of program2

Theorem for Simplicial Sets from Simplicial Complexes

Proving truthfulness of Kenzo statements like:. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

> (setf torus-ss (ss-from-sc torus-sc)) z[K1 Simplicial-Set]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

where torus-sc is a simplicial complex

Theorem

Let sc be a simplicial complex, then (ss-from-sc sc) constructs asimplicial set.

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 23/28

Page 72: ACL2 veri cation of Simplicial Complexes - Chalmers

Certification of programs Certification of program2

Main Tools

Theorem

Let K be a Kenzo object implementing a simplicial set. If for every natural numberq ≥ 2 and for every geometric simplex gmsm in dimension q the following propertieshold:

1 ∀i , j ∈ N : i < j ≤ q → ∂q−1i ◦ (∂q

j gmsm) = ∂q−1j−1 ◦ (∂q

i gmsm),

2 ∀i ∈ N, i ≤ q: ∂qi gmsm is a simplex of K in dimension q − 1,

then:K is a simplicial set.

J. Heras, V. Pascual and J. Rubio, Proving with ACL2 the correctness ofsimplicial sets in the Kenzo system. Preprint

Generic instantiation tool:

Development of a generic theory

Instantiation of definitions and theorems for different implementations

F. J. Martın-Mateos, J. A. Alonso, M. J. Hidalgo, and J. L. Ruiz-Reina. AGeneric Instantiation Tool and a Case Study: A Generic Multiset Theory.Proceedings of the Third ACL2 workshop. Grenoble, Francia, pp. 188–203, 2002.

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 24/28

Page 73: ACL2 veri cation of Simplicial Complexes - Chalmers

Certification of programs Certification of program2

Main Tools

Theorem

Let K be a Kenzo object implementing a simplicial set. If for every natural numberq ≥ 2 and for every geometric simplex gmsm in dimension q the following propertieshold:

1 ∀i , j ∈ N : i < j ≤ q → ∂q−1i ◦ (∂q

j gmsm) = ∂q−1j−1 ◦ (∂q

i gmsm),

2 ∀i ∈ N, i ≤ q: ∂qi gmsm is a simplex of K in dimension q − 1,

then:K is a simplicial set.

J. Heras, V. Pascual and J. Rubio, Proving with ACL2 the correctness ofsimplicial sets in the Kenzo system. Preprint

Generic instantiation tool:

Development of a generic theory

Instantiation of definitions and theorems for different implementations

F. J. Martın-Mateos, J. A. Alonso, M. J. Hidalgo, and J. L. Ruiz-Reina. AGeneric Instantiation Tool and a Case Study: A Generic Multiset Theory.Proceedings of the Third ACL2 workshop. Grenoble, Francia, pp. 188–203, 2002.

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 24/28

Page 74: ACL2 veri cation of Simplicial Complexes - Chalmers

Certification of programs Certification of program2

Generic simplicial set theory

Generic simplicial set theory for simplicial complexes:

From 4 definitions and 4 theorems

Instantiates 15 definitions and 375 theorems (+ 77 definitionsand 601 theorems)

Theorem

Let sc be a simplicial complex, then (ss-from-sc sc) constructs asimplicial set.

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 25/28

Page 75: ACL2 veri cation of Simplicial Complexes - Chalmers

Certification of programs Certification of program2

Generic simplicial set theory

Generic simplicial set theory for simplicial complexes:

From 4 definitions and 4 theoremsInstantiates 15 definitions and 375 theorems (+ 77 definitionsand 601 theorems)

Theorem

Let sc be a simplicial complex, then (ss-from-sc sc) constructs asimplicial set.

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 25/28

Page 76: ACL2 veri cation of Simplicial Complexes - Chalmers

Certification of programs Certification of program2

Generic simplicial set theory

Generic simplicial set theory for simplicial complexes:

From 4 definitions and 4 theoremsInstantiates 15 definitions and 375 theorems (+ 77 definitionsand 601 theorems)

Theorem

Let sc be a simplicial complex, then (ss-from-sc sc) constructs asimplicial set.

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 25/28

Page 77: ACL2 veri cation of Simplicial Complexes - Chalmers

Conclusions and further work

Table of Contents

1 Introduction

2 New Kenzo Module

3 Certification of programs

4 Conclusions and further work

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 26/28

Page 78: ACL2 veri cation of Simplicial Complexes - Chalmers

Conclusions and further work

Conclusions and Further Work

Conclusions:

New module for the Kenzo systemCertification of the correctness of the new programs

Further Work:

Efficient algorithm in the ACL2 systemEquivalence between the new algorithm and the previous oneNew modules for Kenzo and certification of their correctness

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 27/28

Page 79: ACL2 veri cation of Simplicial Complexes - Chalmers

Conclusions and further work

Conclusions and Further Work

Conclusions:

New module for the Kenzo system

Certification of the correctness of the new programs

Further Work:

Efficient algorithm in the ACL2 systemEquivalence between the new algorithm and the previous oneNew modules for Kenzo and certification of their correctness

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 27/28

Page 80: ACL2 veri cation of Simplicial Complexes - Chalmers

Conclusions and further work

Conclusions and Further Work

Conclusions:

New module for the Kenzo systemCertification of the correctness of the new programs

Further Work:

Efficient algorithm in the ACL2 systemEquivalence between the new algorithm and the previous oneNew modules for Kenzo and certification of their correctness

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 27/28

Page 81: ACL2 veri cation of Simplicial Complexes - Chalmers

Conclusions and further work

Conclusions and Further Work

Conclusions:

New module for the Kenzo systemCertification of the correctness of the new programs

Further Work:

Efficient algorithm in the ACL2 systemEquivalence between the new algorithm and the previous oneNew modules for Kenzo and certification of their correctness

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 27/28

Page 82: ACL2 veri cation of Simplicial Complexes - Chalmers

Conclusions and further work

Conclusions and Further Work

Conclusions:

New module for the Kenzo systemCertification of the correctness of the new programs

Further Work:

Efficient algorithm in the ACL2 system

Equivalence between the new algorithm and the previous oneNew modules for Kenzo and certification of their correctness

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 27/28

Page 83: ACL2 veri cation of Simplicial Complexes - Chalmers

Conclusions and further work

Conclusions and Further Work

Conclusions:

New module for the Kenzo systemCertification of the correctness of the new programs

Further Work:

Efficient algorithm in the ACL2 systemEquivalence between the new algorithm and the previous one

New modules for Kenzo and certification of their correctness

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 27/28

Page 84: ACL2 veri cation of Simplicial Complexes - Chalmers

Conclusions and further work

Conclusions and Further Work

Conclusions:

New module for the Kenzo systemCertification of the correctness of the new programs

Further Work:

Efficient algorithm in the ACL2 systemEquivalence between the new algorithm and the previous oneNew modules for Kenzo and certification of their correctness

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 27/28

Page 85: ACL2 veri cation of Simplicial Complexes - Chalmers

The end Thank you for your attention

ACL2 verification of Simplicial Complexesprograms for the Kenzo system

Jonathan Heras and Vico Pascual

Departamento de Matematicas y ComputacionUniversidad de La Rioja

Spain

April 21, 2010

J. Heras and V. Pascual ACL2 verification of Simplicial Complexes 28/28