84
Formal libraries for Algebraic Topology: status report 1 ForMath La Rioja node (J´ onathan Heras) Departamento de Matem´ aticas y Computaci´on Universidad de La Rioja Spain Mathematics, Algorithms and Proofs 2010 November 10, 2010 1 Partially supported by Ministerio de Educaci´on y Ciencia, project MTM2009-13842-C02-01, and by European Commission FP7, STREP project ForMath ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 1/46

Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Formal libraries for Algebraic Topology: statusreport1

ForMath La Rioja node(Jonathan Heras)

Departamento de Matematicas y ComputacionUniversidad de La Rioja

Spain

Mathematics, Algorithms and Proofs 2010November 10, 2010

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

Commission FP7, STREP project ForMath

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 1/46

Page 2: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Contributors

Local Contributors:

Jesus AransayCesar DomınguezJonathan HerasLaureano LambanVico PascualMarıa PozaJulio Rubio

Contributors from INRIA - Sophia:

Yves BertotMaxime DenesLaurence Rideau

Contributors from Universidad de Sevilla:

Francisco Jesus Martın MateosJose Luis Ruiz Reina

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 2/46

Page 3: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Contributors

Local Contributors:

Jesus AransayCesar DomınguezJonathan HerasLaureano LambanVico PascualMarıa PozaJulio Rubio

Contributors from INRIA - Sophia:

Yves BertotMaxime DenesLaurence Rideau

Contributors from Universidad de Sevilla:

Francisco Jesus Martın MateosJose Luis Ruiz Reina

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 2/46

Page 4: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Goal

Formalization of libraries for Algebraic Topology

Application: Study of digital images

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 3/46

Page 5: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Goal

Formalization of libraries for Algebraic Topology

Application: Study of digital images

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 3/46

Page 6: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Applying topological concepts to analyze images

F. Segonne, E. Grimson, and B. Fischl. Topological Correction of Subcortical Segmentation. International

Conference on Medical Image Computing and Computer Assisted Intervention, MICCAI 2003, LNCS 2879,Part 2, pp. 695-702.

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 4/46

Page 7: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Table of Contents

1 Mathematical concepts

2 Computing in Algebraic Topology

3 Formalizing Algebraic Topology

4 Incidence simplicial matrices formalized in SSReflect

5 Conclusions and Further Work

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 5/46

Page 8: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Mathematical concepts

Table of Contents

1 Mathematical concepts

2 Computing in Algebraic Topology

3 Formalizing Algebraic Topology

4 Incidence simplicial matrices formalized in SSReflect

5 Conclusions and Further Work

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 6/46

Page 9: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Mathematical concepts

From General Topology to Algebraic Topology

Digital Image

interpreting

Topological Space

Simplicial Complex

Chain Complex

Homology

triangulation

algebraic structure

computing

interpreting

simplification

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 7/46

Page 10: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Mathematical concepts

From General Topology to Algebraic Topology

Digital Image

interpreting

Topological Space

Simplicial Complex

Chain Complex

Homology

triangulation

algebraic structure

computing

interpreting

simplification

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 7/46

Page 11: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Mathematical concepts

From General Topology to Algebraic Topology

Digital Image

interpreting

Topological Space

Simplicial Complex

Chain Complex

Homology

triangulation

algebraic structure

computing

interpreting

simplification

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 7/46

Page 12: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Mathematical concepts

From General Topology to Algebraic Topology

Digital Image

interpreting

Topological Space

Simplicial Complex

Chain Complex

Homology

triangulation

algebraic structure

computing

interpreting

simplification

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 7/46

Page 13: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Mathematical concepts

From General Topology to Algebraic Topology

Digital Image

interpreting

Topological Space

Simplicial Complex

Chain Complex

Homology

triangulation

algebraic structure

computing

interpreting

simplification

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 7/46

Page 14: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Mathematical concepts

From General Topology to Algebraic Topology

Digital Image

interpreting

Topological Space

Simplicial Complex

Chain Complex

Homology

triangulation

algebraic structure

computing

interpreting

simplification

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 7/46

Page 15: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Mathematical concepts

From General Topology to Algebraic Topology

Digital Image

interpreting

Topological Space

Simplicial Complex

Chain Complex

Homology

triangulation

algebraic structure

computing

interpreting

simplification

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 7/46

Page 16: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Mathematical concepts

Simplicial Complexes

Digital Image Simplicial Complex Chain Complex Homology

simplification

Definition

Let V be an ordered set, called the vertex set.A simplex over V is any finite subset of V .

Definition

Let α and β be simplices over V , we say α is a face of β if α is a subset of β.

Definition

An ordered (abstract) simplicial complex over V is a set of simplices K over Vsatisfying the property:

∀α ∈ K, if β ⊆ α⇒ β ∈ K

Let K be a simplicial complex. Then the set Sn(K) of n-simplices of K is the set madeof the simplices of cardinality n + 1.

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 8/46

Page 17: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Mathematical concepts

Simplicial Complexes

Digital Image Simplicial Complex Chain Complex Homology

simplification

Definition

Let V be an ordered set, called the vertex set.A simplex over V is any finite subset of V .

Definition

Let α and β be simplices over V , we say α is a face of β if α is a subset of β.

Definition

An ordered (abstract) simplicial complex over V is a set of simplices K over Vsatisfying the property:

∀α ∈ K, if β ⊆ α⇒ β ∈ K

Let K be a simplicial complex. Then the set Sn(K) of n-simplices of K is the set madeof the simplices of cardinality n + 1.

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 8/46

Page 18: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Mathematical concepts

Simplicial Complexes

Digital Image Simplicial Complex Chain Complex Homology

simplification

Definition

Let V be an ordered set, called the vertex set.A simplex over V is any finite subset of V .

Definition

Let α and β be simplices over V , we say α is a face of β if α is a subset of β.

Definition

An ordered (abstract) simplicial complex over V is a set of simplices K over Vsatisfying the property:

∀α ∈ K, if β ⊆ α⇒ β ∈ K

Let K be a simplicial complex. Then the set Sn(K) of n-simplices of K is the set madeof the simplices of cardinality n + 1.

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 8/46

Page 19: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Mathematical concepts

Simplicial Complexes

Digital Image Simplicial Complex Chain Complex Homology

simplification

0

1

2

3 4

5

6

V = (0, 1, 2, 3, 4, 5, 6)K = {∅, (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)}

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 9/46

Page 20: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Mathematical concepts

Simplicial Complexes

Digital Image Simplicial Complex Chain Complex Homology

simplification

Definition

The facets of a simplicial complex K are the maximal simplices of the simplicialcomplex.

0

1

2

3 4

5

6

The facets are: {(0, 3), (1, 3), (2, 3), (3, 4), (0, 1, 2), (4, 5, 6)}ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 10/46

Page 21: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Mathematical concepts

Chain Complexes

Digital Image Simplicial Complex Chain Complex Homology

simplification

Definition

A chain complex C∗ is a pair of sequences C∗ = (Cq , dq)q∈Z where:

For every q ∈ Z, the component Cq is an R-module, the chain group of degree q

For every q ∈ Z, the component dq is a module morphism dq : Cq → Cq−1, thedifferential map

For every q ∈ Z, the composition dqdq+1 is null: dqdq+1 = 0

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 11/46

Page 22: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Mathematical concepts

Homology

Digital Image Simplicial Complex Chain Complex Homology

simplification

Definition

If C∗ = (Cq , dq)q∈Z is a chain complex:

The image Bq = im dq+1 ⊆ Cq is the (sub)module of q-boundaries

The kernel Zq = ker dq ⊆ Cq is the (sub)module of q-cycles

Given a chain complex C∗ = (Cq , dq)q∈Z:

dq−1 ◦ dq = 0⇒ Bq ⊆ Zq

Every boundary is a cycle

The converse is not generally true

Definition

Let C∗ = (Cq , dq)q∈Z be a chain complex. For each degree n ∈ Z, the n-homologymodule of C∗ is defined as the quotient module

Hn(C∗) =Zn

Bn

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46

Page 23: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Mathematical concepts

Homology

Digital Image Simplicial Complex Chain Complex Homology

simplification

Definition

If C∗ = (Cq , dq)q∈Z is a chain complex:

The image Bq = im dq+1 ⊆ Cq is the (sub)module of q-boundaries

The kernel Zq = ker dq ⊆ Cq is the (sub)module of q-cycles

Given a chain complex C∗ = (Cq , dq)q∈Z:

dq−1 ◦ dq = 0⇒ Bq ⊆ Zq

Every boundary is a cycle

The converse is not generally true

Definition

Let C∗ = (Cq , dq)q∈Z be a chain complex. For each degree n ∈ Z, the n-homologymodule of C∗ is defined as the quotient module

Hn(C∗) =Zn

BnForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46

Page 24: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Mathematical concepts

From Simplicial Complexes to Chain Complexes

Digital Image Simplicial Complex Chain Complex Homology

simplification

Definition

Let K be an (ordered abstract) simplicial complex. Let n ≥ 1 and 0 ≤ i ≤ n be twointegers n and i. Then the face operator ∂n

i is the linear map ∂ni : Sn(K)→ Sn−1(K)

defined by:∂n

i ((v0, . . . , vn)) = (v0, . . . , vi−1, vi+1, . . . , vn).

The i-th vertex of the simplex is removed, so that an (n − 1)-simplex is obtained.

Definition

Let K be a simplicial complex. Then the chain complex C∗(K) canonically associatedwith K is defined as follows. The chain group Cn(K) is the free Z module generatedby the n-simplices of K. In addition, let (v0, . . . , vn−1) be a n-simplex of K, thedifferential of this simplex is defined as:

dn :=n∑

i=0

(−1)i∂ni

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 13/46

Page 25: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Mathematical concepts

Simplification: Perturbation techniques

Digital Image Simplicial Complex Chain Complex Homology

simplification

Definition

A reduction ρ between two chain complexes C∗ y D∗ (denoted by ρ : C∗⇒⇒D∗) is atriple ρ = (f , g , h)

C∗

h

�� f++D∗

g

kk

satisfying the following relations:

1) fg = IdD∗ ;

2) dC h + hdC = IdC∗ −gf ;

3) fh = 0; hg = 0; hh = 0.

Theorem

If C∗⇒⇒D∗, then C∗ ∼= D∗ ⊕ A∗, with A∗ acyclic, which implies thatHn(C∗) ∼= Hn(D∗) for all n.

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 14/46

Page 26: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Mathematical concepts

Simplification: Perturbation techniques

Digital Image Simplicial Complex Chain Complex Homology

simplification

Reduction

(C∗, dC∗)

h��

f

��(D∗, dD∗ + δ1) (D∗, dD∗)

g

KK

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 15/46

Page 27: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Mathematical concepts

Simplification: Perturbation techniques

Digital Image Simplicial Complex Chain Complex Homology

simplification

EPL Reduction

(C∗, dC∗ + δ1)

h1��

f 1

��

(C∗, dC∗)

h��

f

��(D∗, dD∗ + δ1)

g1

KK

(D∗, dD∗)

g

KK

δ1

oo

Easy Perturbation Lemma (EPL) Basic Perturbation Lemma (BPL)

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 15/46

Page 28: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Mathematical concepts

Simplification: Perturbation techniques

Digital Image Simplicial Complex Chain Complex Homology

simplification

EPL Reduction BPL

(C∗, dC∗ + δ1)

h1��

f 1

��

(C∗, dC∗)

h��

f

��

δ2 // (C∗, dC∗ + δ2)

h2��

f 2

��(D∗, dD∗ + δ1)

g1

KK

(D∗, dD∗)

g

KK

δ1

oo (D∗, dD∗ + δ2)

g2

KK

Easy Perturbation Lemma (EPL) Basic Perturbation Lemma (BPL)

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 15/46

Page 29: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Mathematical concepts

Simplification: Discrete Morse Theory

Digital Image Simplicial Complex Chain Complex Homology

simplification

Discrete Morse Theory:

Discrete vector fields DVF

Critical cellsFrom a chain complex C∗ and a DVF V on C∗constructs a reduction from C∗ to C c

∗where generators of C c

∗ are the critical cells of C∗ with respectto V

R. Forman. Morse theory for cell complexes. Advances in Mathematics, 134:90-145, 1998.

A. Romero, F. Sergeraert. Discrete Vector Fields and Fundamental Algebraic Topology.

http://arxiv.org/abs/1005.5685.

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 16/46

Page 30: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Mathematical concepts

Simplification: Discrete Morse Theory

Digital Image Simplicial Complex Chain Complex Homology

simplification

Discrete Morse Theory:

Discrete vector fields DVFCritical cells

From a chain complex C∗ and a DVF V on C∗constructs a reduction from C∗ to C c

∗where generators of C c

∗ are the critical cells of C∗ with respectto V

R. Forman. Morse theory for cell complexes. Advances in Mathematics, 134:90-145, 1998.

A. Romero, F. Sergeraert. Discrete Vector Fields and Fundamental Algebraic Topology.

http://arxiv.org/abs/1005.5685.

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 16/46

Page 31: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Mathematical concepts

Simplification: Discrete Morse Theory

Digital Image Simplicial Complex Chain Complex Homology

simplification

Discrete Morse Theory:

Discrete vector fields DVFCritical cellsFrom a chain complex C∗ and a DVF V on C∗constructs a reduction from C∗ to C c

∗where generators of C c

∗ are the critical cells of C∗ with respectto V

R. Forman. Morse theory for cell complexes. Advances in Mathematics, 134:90-145, 1998.

A. Romero, F. Sergeraert. Discrete Vector Fields and Fundamental Algebraic Topology.

http://arxiv.org/abs/1005.5685.

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 16/46

Page 32: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Mathematical concepts

Simplification: Discrete Morse Theory

Digital Image Simplicial Complex Chain Complex Homology

simplification

Discrete Morse Theory:

Discrete vector fields DVFCritical cellsFrom a chain complex C∗ and a DVF V on C∗constructs a reduction from C∗ to C c

∗where generators of C c

∗ are the critical cells of C∗ with respectto V

R. Forman. Morse theory for cell complexes. Advances in Mathematics, 134:90-145, 1998.

A. Romero, F. Sergeraert. Discrete Vector Fields and Fundamental Algebraic Topology.

http://arxiv.org/abs/1005.5685.

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 16/46

Page 33: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Mathematical concepts

Computing

Digital Image Simplicial Complex Chain Complex Homology

simplification

Computing Homology groups:From a Chain Complex (Cn, dn)n∈Z of finite type

dn can be expressed as matricesHomology groups are obtained from a diagonalization process

From a Chain Complex (Cn, dn)n∈Z of non finite type

Effective Homology TheoryReductions

J. Rubio and F. Sergeraert. Constructive Algebraic Topology, Bulletin des Sciences Mathematiques,

126:389-412, 2002.

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 17/46

Page 34: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Mathematical concepts

Computing

Digital Image Simplicial Complex Chain Complex Homology

simplification

Computing Homology groups:From a Chain Complex (Cn, dn)n∈Z of finite type

dn can be expressed as matricesHomology groups are obtained from a diagonalization process

From a Chain Complex (Cn, dn)n∈Z of non finite type

Effective Homology TheoryReductions

J. Rubio and F. Sergeraert. Constructive Algebraic Topology, Bulletin des Sciences Mathematiques,

126:389-412, 2002.

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 17/46

Page 35: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Mathematical concepts

Digital Images

Digital Image Simplicial Complex Chain Complex Homology

simplification

2D digital images:

elements are pixels

3D digital images:

elements are voxels

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 18/46

Page 36: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Mathematical concepts

From a digital image to simplicial complexES

Digital Image Simplicial Complex Chain Complex Homology

simplification

R. Ayala, E. Domınguez, A.R. Frances, A. Quintero. Homotopy in digital spaces. Discrete Applied

Mathematics 125 (2003) 3-24.

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 19/46

Page 37: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Computing in Algebraic Topology

Table of Contents

1 Mathematical concepts

2 Computing in Algebraic Topology

3 Formalizing Algebraic Topology

4 Incidence simplicial matrices formalized in SSReflect

5 Conclusions and Further Work

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 20/46

Page 38: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Computing in Algebraic Topology

Computing in Algebraic Topology

Digital Image

Simplicial Complex

Chain Complex

Homology

triangulation

graded structure

computing

interpreting

simplification

Demonstration fKenzo: user interface for Sergeraert’s Kenzosystem

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 21/46

Page 39: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Formalizing Algebraic Topology

Table of Contents

1 Mathematical concepts

2 Computing in Algebraic Topology

3 Formalizing Algebraic Topology

4 Incidence simplicial matrices formalized in SSReflect

5 Conclusions and Further Work

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 22/46

Page 40: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Formalizing Algebraic Topology

Formalization of Simplicial Complexes

Digital Image Simplicial Complex Chain Complex Homology

simplification

Formalized in ACL2J. Heras, V. Pascual and J. Rubio. ACL2 verification of Simplicial Complexes programs for the

Kenzo system. Preprint.

Formalization in Coq/SSReflect

Y. Bertot, L. Rideau and ForMath La Rioja node. Technical report on a SSReflect week.

http://wiki.portal.chalmers.se/cse/pmwiki.php/ForMath/ForMath.

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 23/46

Page 41: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Formalizing Algebraic Topology

Formalization of Chain Complexes

Digital Image Simplicial Complex Chain Complex Homology

simplification

Formalized in ACL2, Isabelle and CoqL. Lamban, F. J. Martın-Mateos, J. L. Ruiz-Reina and J. Rubio. When first order is enough: the

case of Simplicial Topology. Preprint.

J. Heras and V. Pascual. An ACL2 infrastructure to formalize Kenzo Higher-Order constructors.

Preprint.

J. Aransay and C. Domınguez. Modelling Differential Structures in Proof Assistants: The Graded

Case. In Proceedings 12th International Conference on Computer Aided Systems Theory(EUROCAST’2009), volume 5717 of Lecture Notes in Computer Science, pages 203–210, 2009.

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 24/46

Page 42: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Formalizing Algebraic Topology

From Simplicial Complexes to Chain Complexes

Digital Image Simplicial Complex Chain Complex Homology

simplification

Simplicial Complexes → Simplicial Sets

→ Chain Complexes

Formalized in ACL2J. Heras, V. Pascual and J. Rubio, Proving with ACL2 the correctness of simplicial sets in the

Kenzo system. In LOPSTR 2010, Lecture Notes in Computer Science. Springer-Verlag.

Formalized in ACL2L. Lamban, F. J. Martın-Mateos, J. L. Ruiz-Reina and J. Rubio. When first order is enough: the

case of Simplicial Topology. Preprint.

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 25/46

Page 43: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Formalizing Algebraic Topology

From Simplicial Complexes to Chain Complexes

Digital Image Simplicial Complex Chain Complex Homology

simplification

Simplicial Complexes → Simplicial Sets → Chain Complexes

Formalized in ACL2J. Heras, V. Pascual and J. Rubio, Proving with ACL2 the correctness of simplicial sets in the

Kenzo system. In LOPSTR 2010, Lecture Notes in Computer Science. Springer-Verlag.

Formalized in ACL2L. Lamban, F. J. Martın-Mateos, J. L. Ruiz-Reina and J. Rubio. When first order is enough: the

case of Simplicial Topology. Preprint.

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 25/46

Page 44: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Formalizing Algebraic Topology

Simplification: Reductions

Digital Image Simplicial Complex Chain Complex Homology

simplification

C (K )

h�� f --

CN(K )g

ll

Formalized in ACL2L. Lamban, F. J. Martın-Mateos, J. L. Ruiz-Reina and J. Rubio. When first order is enough: the

case of Simplicial Topology. Preprint.

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 26/46

Page 45: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Formalizing Algebraic Topology

Simplification: Perturbation techniques

Digital Image Simplicial Complex Chain Complex Homology

simplification

EPL:Formalized in ACL2, Coq and Isabelle

J. Heras and V. Pascual. An ACL2 infrastructure to formalize Kenzo Higher-Order

constructors. Preprint.

J. Aransay and C. Domınguez. Modelling Differential Structures in Proof Assistants: The

Graded Case. In Proceedings 12th International Conference on Computer Aided SystemsTheory (EUROCAST’2009), volume 5717 of Lecture Notes in Computer Science, pages203–210, 2009.

BPL:

Formalized in Isabelle/HOL

J. Aransay, C. Ballarin and J. Rubio. A mechanized proof of the Basic Perturbation Lemma.

Journal of Automated Reasoning, 40(4):271–292, 2008.

Formalization of Bicomplexes in Coq

C. Domınguez and J. Rubio. Effective Homology of Bicomplexes, formalized in Coq. To

appear in Theoretical Computer Science.

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 27/46

Page 46: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Formalizing Algebraic Topology

Simplification: Perturbation techniques

Digital Image Simplicial Complex Chain Complex Homology

simplification

EPL:Formalized in ACL2, Coq and Isabelle

J. Heras and V. Pascual. An ACL2 infrastructure to formalize Kenzo Higher-Order

constructors. Preprint.

J. Aransay and C. Domınguez. Modelling Differential Structures in Proof Assistants: The

Graded Case. In Proceedings 12th International Conference on Computer Aided SystemsTheory (EUROCAST’2009), volume 5717 of Lecture Notes in Computer Science, pages203–210, 2009.

BPL:Formalized in Isabelle/HOL

J. Aransay, C. Ballarin and J. Rubio. A mechanized proof of the Basic Perturbation Lemma.

Journal of Automated Reasoning, 40(4):271–292, 2008.

Formalization of Bicomplexes in Coq

C. Domınguez and J. Rubio. Effective Homology of Bicomplexes, formalized in Coq. To

appear in Theoretical Computer Science.

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 27/46

Page 47: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Formalizing Algebraic Topology

Simplification: Discrete Morse Theory

Digital Image Simplicial Complex Chain Complex Homology

simplification

Formalization of Discrete Morse Theory:

Work in progress

Formalization of Homology groups:

Future Work

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 28/46

Page 48: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Formalizing Algebraic Topology

Homology Groups

Digital Image Simplicial Complex Chain Complex Homology

simplification

Formalization of Discrete Morse Theory:

Work in progress

Formalization of Homology groups:

Future Work

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 28/46

Page 49: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Formalizing Algebraic Topology

Formalization of digital images

Digital Image Simplicial Complex Chain Complex Homology

simplification

2D digital images:

Binary matrix

f

f

t

t

Formalized in Coq:

R. O’Connor. A Computer Verified Theory of Compact Sets. In SCSS 2008, RISC Linz Report Series.

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 29/46

Page 50: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Formalizing Algebraic Topology

From Digital Images to Simplicial Complexes

Digital Image Simplicial Complex Chain Complex Homology

simplification

Elements of digital images Facets of a Simplicial Complex

Future work

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 30/46

Page 51: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Incidence simplicial matrices formalized in SSReflect

Table of Contents

1 Mathematical concepts

2 Computing in Algebraic Topology

3 Formalizing Algebraic Topology

4 Incidence simplicial matrices formalized in SSReflect

5 Conclusions and Further Work

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 31/46

Page 52: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Incidence simplicial matrices formalized in SSReflect

From Simplicial Complexes to Homology

Simplicial Complex

Chain Complex

Homology

Incidence Matrices

graded structure

computing

differential

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 32/46

Page 53: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Incidence simplicial matrices formalized in SSReflect

SSReflect

SSReflect:

Extension of CoqDeveloped while formalizing the Four Color TheoremProvides new libraries:

matrix.v: matrix theoryfinset.v and fintype.v: finite set theory and finite types

bigops.v: indexed “big” operations, liken∑

i=0

f (i) or⋃i∈I

f (i)

zmodp.v: additive group and ring Zp

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 33/46

Page 54: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Incidence simplicial matrices formalized in SSReflect

SSReflect

SSReflect:

Extension of CoqDeveloped while formalizing the Four Color TheoremProvides new libraries:

matrix.v: matrix theoryfinset.v and fintype.v: finite set theory and finite types

bigops.v: indexed “big” operations, liken∑

i=0

f (i) or⋃i∈I

f (i)

zmodp.v: additive group and ring Zp

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 33/46

Page 55: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Incidence simplicial matrices formalized in SSReflect

Representation of Simplicial Complexes in SSReflect

Definition

Let V be a finite ordered set, called the vertex set, a simplex over V is any finitesubset of V .

Definition

A finite ordered (abstract) simplicial complex over V is a finite set of simplices K overV satisfying the property:

∀α ∈ K, if β ⊆ α⇒ β ∈ K

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

Variable V : finType.

Definition simplex := {set V}.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 34/46

Page 56: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Incidence simplicial matrices formalized in SSReflect

Representation of Simplicial Complexes in SSReflect

Definition

Let V be a finite ordered set, called the vertex set, a simplex over V is any finitesubset of V .

Definition

A finite ordered (abstract) simplicial complex over V is a finite set of simplices K overV satisfying the property:

∀α ∈ K, if β ⊆ α⇒ β ∈ K

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

Variable V : finType.

Definition simplex := {set V}.

Definition good_sc (c : {set simplex}) :=

forall x, x \in c -> forall y : simplex, y \subset x -> y \in c.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 34/46

Page 57: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Incidence simplicial matrices formalized in SSReflect

Incidence Matrices

Definition

Let X and Y be two ordered finite sets of simplices, we call incidence matrix to amatrix m × n where

m = ]|X | ∧ n = ]|Y |

M =

Y [1] · · · Y [n]

X [1] a1,1 · · · a1,n

.

.

.

.

.

.. . .

.

.

.X [m] am,1 · · · am,n

ai,j =

{1 if X [i ] is a face of Y [j]0 if X [i ] is not a face of Y [j]

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 35/46

Page 58: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Incidence simplicial matrices formalized in SSReflect

Incidence Matrices

Definition

Let X and Y be two ordered finite sets of simplices, we call incidence matrix to amatrix m × n where

m = ]|X | ∧ n = ]|Y |

M =

Y [1] · · · Y [n]

X [1] a1,1 · · · a1,n

.

.

.

.

.

.. . .

.

.

.X [m] am,1 · · · am,n

ai,j =

{1 if X [i ] is a face of Y [j]0 if X [i ] is not a face of Y [j]

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

Lemma lt12 : 1 < 2. Proof. by done. Qed.

Definition Z2_ring := (Zp_ring lt12).

Lemma p : 0 < 2. Proof. by done. Qed.

Definition p_0_2 := inZp p 0.

Definition p_1_2 := inZp p 1.

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

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 35/46

Page 59: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Incidence simplicial matrices formalized in SSReflect

Incidence Matrices

Definition

Let X and Y be two ordered finite sets of simplices, we call incidence matrix to amatrix m × n where

m = ]|X | ∧ n = ]|Y |

M =

Y [1] · · · Y [n]

X [1] a1,1 · · · a1,n

.

.

.

.

.

.. . .

.

.

.X [m] am,1 · · · am,n

ai,j =

{1 if X [i ] is a face of Y [j]0 if X [i ] is not a face of Y [j]

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

Variables Top Left:{set simplex}.

Definition seq_SS (SS: {set simplex}):= enum (mem SS) : seq simplex.

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

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 35/46

Page 60: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Incidence simplicial matrices formalized in SSReflect

Incidence Matrices

Definition

Let X and Y be two ordered finite sets of simplices, we call incidence matrix to amatrix m × n where

m = ]|X | ∧ n = ]|Y |

M =

Y [1] · · · Y [n]

X [1] a1,1 · · · a1,n

.

.

.

.

.

.. . .

.

.

.X [m] am,1 · · · am,n

ai,j =

{1 if X [i ] is a face of Y [j]0 if X [i ] is not a face of Y [j]

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

Definition incidenceFunction (i j : nat) :=

if (nth x0 (seq_SS Left) i) \subset (nth x0 (seq_SS Top) j) then p_1_2 else p_0_2.

Definition incidenceMatrix := matrix_of_fun incidenceFunction

(m:=size (seq_SS Left)) (n:=size (seq_SS Top)) (R:=Z2_ring).

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

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 35/46

Page 61: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Incidence simplicial matrices formalized in SSReflect

Incidence Matrices

Definition

Let C be a finite set of simplices, A be the set of n-simplices of C with an orderbetween its elements and B the set of (n− 1)-simplices of C with an order between itselements.We call incidence matrix of dimension n (n ≥ 1), to a matrix p × q where

p = ]|B| ∧ q = ]|A|

Mi,j =

{1 if B[i ] is a face of A[j]0 if B[i ] is not a face of A[j]

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

Variable c: {set simplex}.

Variable n:nat.

Definition top_n := [set x \in c | #|x| == n+1] : {set simplex}.

Definition left_n_1 := [set x \in c | #|x| == n] : {set simplex}.

Definition incidence_matrix_n := incidenceMatrix top_n left_n_1.

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

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 36/46

Page 62: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Incidence simplicial matrices formalized in SSReflect

Incidence Matrices of Simplicial Complexes

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 1 1 0 0 0 0 0 0 0(1) 1 0 0 1 1 0 0 0 0 0(2) 0 1 0 1 0 1 0 0 0 0(3) 0 0 1 0 1 1 1 0 0 0(4) 0 0 0 0 0 0 1 1 1 0(5) 0 0 0 0 0 0 0 1 0 1(6) 0 0 0 0 0 0 0 0 1 1

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 37/46

Page 63: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Incidence simplicial matrices formalized in SSReflect

Incidence Matrices of Simplicial Complexes

0

1

2

3 4

5

6

(0, 1, 2) (4, 5, 6)

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

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 37/46

Page 64: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Incidence simplicial matrices formalized in SSReflect

Product of two consecutive incidence matrices in Z2

Theorem (Product of two consecutive incidence matrices in Z2)

Let K be a finite simplicial complex over V with an order between the simplices of thesame dimension and let n ≥ 1 be a natural number n, then the product of the n-thincidence matrix of K and the (n + 1)-incidence matrix of K over the ring Z/2Z isequal to the null matrix.

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

Theorem incidence_matrices_sc_product:

forall (V:finType)(n:nat)(sc: {set (simplex V)}), good_sc sc -> n >= 1 ->

mulmx (R:=Z2_ring) (incidence_matrix_n sc n) (incidence_matrix_n sc (n+1)) =

null_mx Z2_ring (size (seq_SS (left_n_1 sc n))) (size (seq_SS (top_n sc (n+1)))).

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

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 38/46

Page 65: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Incidence simplicial matrices formalized in SSReflect

Sketch of the proof

Let Sn+1 be the set of (n + 1)-simplices of K with an orderbetween its elements

Let Sn be the set of n-simplices of K with an order betweenits elements

Let Sn−1 be the set of (n − 1)-simplices of K with an orderbetween its elements

Mn(K) =

Sn [1] · · · Sn [r1]

Sn−1[1] a1,1 · · · a1,r1

.

.

.

.

.

.. . .

.

.

.Sn−1[r2] ar2,1 · · · ar2,r1

, Mn+1(K) =

Sn+1[1] · · · Sn+1[r3]

Sn [1] b1,1 · · · b1,r1

.

.

.

.

.

.. . .

.

.

.Sn [r1] br1,1 · · · br1,r3

where r1 = ]|Sn|, r2 = ]|Sn−1| and r3 = ]|Sn+1|

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 39/46

Page 66: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Incidence simplicial matrices formalized in SSReflect

Sketch of the proof

Let Sn+1 be the set of (n + 1)-simplices of K with an orderbetween its elements

Let Sn be the set of n-simplices of K with an order betweenits elements

Let Sn−1 be the set of (n − 1)-simplices of K with an orderbetween its elements

Mn(K) =

Sn [1] · · · Sn [r1]

Sn−1[1] a1,1 · · · a1,r1

.

.

.

.

.

.. . .

.

.

.Sn−1[r2] ar2,1 · · · ar2,r1

, Mn+1(K) =

Sn+1[1] · · · Sn+1[r3]

Sn [1] b1,1 · · · b1,r1

.

.

.

.

.

.. . .

.

.

.Sn [r1] br1,1 · · · br1,r3

where r1 = ]|Sn|, r2 = ]|Sn−1| and r3 = ]|Sn+1|

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 39/46

Page 67: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Incidence simplicial matrices formalized in SSReflect

Sketch of the proof

Mn(K)×Mn+1(K) =

c1,1 · · · c1,r3...

. . ....

cr2,1 · · · cr2,r3

where

ci , j =∑

1≤j0≤r1

ai , j0 × bj0, j

we need to prove that∀i , j , ci , j = 0

in order to prove that Mn ×Mn+1 = 0

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 40/46

Page 68: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Incidence simplicial matrices formalized in SSReflect

Sketch of the proof

Mn(K)×Mn+1(K) =

c1,1 · · · c1,r3...

. . ....

cr2,1 · · · cr2,r3

where

ci , j =∑

1≤j0≤r1

ai , j0 × bj0, j

we need to prove that∀i , j , ci , j = 0

in order to prove that Mn ×Mn+1 = 0

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 40/46

Page 69: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Incidence simplicial matrices formalized in SSReflect

Sketch of the proof

∑16j06r1

ai, j0 × bj0, j =

∑j0|Sn−1[i ]⊂Sn [j0]∧Sn [j0]⊂Sn+1[j]

ai, j0 × bj0, j

+∑

j0|Sn−1[i ]6⊂Sn [j0]∧Sn [j0]⊂Sn+1[j]

ai, j0 × bj0, j

+∑

j0|Sn−1[i ]⊂Sn [j0]∧Sn [j0] 6⊂Sn+1[j]

ai, j0 × bj0, j

+∑

j0|Sn−1[i ] 6⊂Sn [j0]∧Sn [j0]6⊂Sn+1[j]

ai, j0 × bj0, j

∑16j06r1

ai, j0 × bj0, j = (∑

j0|Mn−2[i ]⊂Mn−1[j0]∧Mn−1[j0]⊂Mn [j]

1) + 0 + 0 + 0

∑16j06r1

ai, j0 × bj0, j = ]|{j0|(1 ≤ j0 ≤ r1) ∧ (Sn−1[i ] ⊂ Sn[j0]) ∧ (Sn[j0] ⊂ Sn+1[j])}|

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 41/46

Page 70: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Incidence simplicial matrices formalized in SSReflect

Sketch of the proof

∑16j06r1

ai, j0 × bj0, j =

∑j0|Sn−1[i ]⊂Sn [j0]∧Sn [j0]⊂Sn+1[j]

ai, j0 × bj0, j

+∑

j0|Sn−1[i ]6⊂Sn [j0]∧Sn [j0]⊂Sn+1[j]

ai, j0 × bj0, j

+∑

j0|Sn−1[i ]⊂Sn [j0]∧Sn [j0] 6⊂Sn+1[j]

ai, j0 × bj0, j

+∑

j0|Sn−1[i ] 6⊂Sn [j0]∧Sn [j0]6⊂Sn+1[j]

ai, j0 × bj0, j

∑16j06r1

ai, j0 × bj0, j = (∑

j0|Mn−2[i ]⊂Mn−1[j0]∧Mn−1[j0]⊂Mn [j]

1) + 0 + 0 + 0

∑16j06r1

ai, j0 × bj0, j = ]|{j0|(1 ≤ j0 ≤ r1) ∧ (Sn−1[i ] ⊂ Sn[j0]) ∧ (Sn[j0] ⊂ Sn+1[j])}|

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 41/46

Page 71: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Incidence simplicial matrices formalized in SSReflect

Sketch of the proof

∑16j06r1

ai, j0 × bj0, j =

∑j0|Sn−1[i ]⊂Sn [j0]∧Sn [j0]⊂Sn+1[j]

ai, j0 × bj0, j

+∑

j0|Sn−1[i ]6⊂Sn [j0]∧Sn [j0]⊂Sn+1[j]

ai, j0 × bj0, j

+∑

j0|Sn−1[i ]⊂Sn [j0]∧Sn [j0] 6⊂Sn+1[j]

ai, j0 × bj0, j

+∑

j0|Sn−1[i ] 6⊂Sn [j0]∧Sn [j0]6⊂Sn+1[j]

ai, j0 × bj0, j

∑16j06r1

ai, j0 × bj0, j = (∑

j0|Mn−2[i ]⊂Mn−1[j0]∧Mn−1[j0]⊂Mn [j]

1) + 0 + 0 + 0

∑16j06r1

ai, j0 × bj0, j = ]|{j0|(1 ≤ j0 ≤ r1) ∧ (Sn−1[i ] ⊂ Sn[j0]) ∧ (Sn[j0] ⊂ Sn+1[j])}|

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 41/46

Page 72: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Incidence simplicial matrices formalized in SSReflect

Sketch of the proof

]|{j0 | (1 ≤ j0 ≤ r1)∧(Sn−1[i ] ⊂ Sn[j0])∧(Sn[j0] ⊂ Sn+1[j ])}| = 0 mod 2

Sn−1[i ] 6⊂ Sn+1[j ]⇒

]|{j0 | (1 ≤ j0 ≤ r1) ∧ (Sn−1[i ] ⊂ Sn[j0]) ∧ (Sn[j0] ⊂ Sn+1[j])}| = 0

Otherwise, ∃k such that Sn−1[i ] ⊂ Sn[k] ⊂ Sn+1[j ]

Sn−1[i ] ⊂ Sn+1[j ]⇒

]|{j0 | (1 ≤ j0 ≤ r1) ∧ (Sn−1[i ] ⊂ Sn[j0]) ∧ (Sn[j0] ⊂ Sn+1[j])}| = 2

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 42/46

Page 73: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Incidence simplicial matrices formalized in SSReflect

Sketch of the proof

]|{j0 | (1 ≤ j0 ≤ r1)∧(Sn−1[i ] ⊂ Sn[j0])∧(Sn[j0] ⊂ Sn+1[j ])}| = 0 mod 2

Sn−1[i ] 6⊂ Sn+1[j ]⇒

]|{j0 | (1 ≤ j0 ≤ r1) ∧ (Sn−1[i ] ⊂ Sn[j0]) ∧ (Sn[j0] ⊂ Sn+1[j])}| = 0

Otherwise, ∃k such that Sn−1[i ] ⊂ Sn[k] ⊂ Sn+1[j ]

Sn−1[i ] ⊂ Sn+1[j ]⇒

]|{j0 | (1 ≤ j0 ≤ r1) ∧ (Sn−1[i ] ⊂ Sn[j0]) ∧ (Sn[j0] ⊂ Sn+1[j])}| = 2

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 42/46

Page 74: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Incidence simplicial matrices formalized in SSReflect

Sketch of the proof

]|{j0 | (1 ≤ j0 ≤ r1)∧(Sn−1[i ] ⊂ Sn[j0])∧(Sn[j0] ⊂ Sn+1[j ])}| = 0 mod 2

Sn−1[i ] 6⊂ Sn+1[j ]⇒

]|{j0 | (1 ≤ j0 ≤ r1) ∧ (Sn−1[i ] ⊂ Sn[j0]) ∧ (Sn[j0] ⊂ Sn+1[j])}| = 0

Otherwise, ∃k such that Sn−1[i ] ⊂ Sn[k] ⊂ Sn+1[j ]

Sn−1[i ] ⊂ Sn+1[j ]⇒

]|{j0 | (1 ≤ j0 ≤ r1) ∧ (Sn−1[i ] ⊂ Sn[j0]) ∧ (Sn[j0] ⊂ Sn+1[j])}| = 2

Sn+1[j] = (v0, . . . , vn+1)↗ ↖

Sn [k1] = (v0, . . . , vj , . . . , vn+1) Sn [k2] = (v0, . . . , vi , . . . , vn+1)↖ ↗

Sn−1[i ] = (v0, . . . , vi , . . . , vj , . . . , vn+1)

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 42/46

Page 75: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Incidence simplicial matrices formalized in SSReflect

Sketch of the proof

]|{j0 | (1 ≤ j0 ≤ r1)∧(Sn−1[i ] ⊂ Sn[j0])∧(Sn[j0] ⊂ Sn+1[j ])}| = 0 mod 2

Sn−1[i ] 6⊂ Sn+1[j ]⇒

]|{j0 | (1 ≤ j0 ≤ r1) ∧ (Sn−1[i ] ⊂ Sn[j0]) ∧ (Sn[j0] ⊂ Sn+1[j])}| = 0

Otherwise, ∃k such that Sn−1[i ] ⊂ Sn[k] ⊂ Sn+1[j ]

Sn−1[i ] ⊂ Sn+1[j ]⇒

]|{j0 | (1 ≤ j0 ≤ r1) ∧ (Sn−1[i ] ⊂ Sn[j0]) ∧ (Sn[j0] ⊂ Sn+1[j])}| = 2

Sn+1[j] = (v0, . . . , vn+1)↗ ↖

Sn [k1] = (v0, . . . , vj , . . . , vn+1) Sn [k2] = (v0, . . . , vi , . . . , vn+1)↖ ↗

Sn−1[i ] = (v0, . . . , vi , . . . , vj , . . . , vn+1)

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 42/46

Page 76: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Incidence simplicial matrices formalized in SSReflect

Formalization in SSReflect

Summation part: Quite direct

Lemmas from “bigops” librarybigID:

∑i∈r |Pi

Fi =∑

i∈r |Pi∧ai

Fi +∑

i∈r |Pi∧∼ai

Fi

big1:∑

i∈r |Pi

0 = 0

Cardinality part: More details are needed

Auxiliary lemmasLemmas from “finset” and “fintype” libraries

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 43/46

Page 77: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Incidence simplicial matrices formalized in SSReflect

Formalization in SSReflect

Summation part: Quite directLemmas from “bigops” librarybigID:

∑i∈r |Pi

Fi =∑

i∈r |Pi∧ai

Fi +∑

i∈r |Pi∧∼ai

Fi

big1:∑

i∈r |Pi

0 = 0

Cardinality part: More details are needed

Auxiliary lemmasLemmas from “finset” and “fintype” libraries

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 43/46

Page 78: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Incidence simplicial matrices formalized in SSReflect

Formalization in SSReflect

Summation part: Quite directLemmas from “bigops” librarybigID:

∑i∈r |Pi

Fi =∑

i∈r |Pi∧ai

Fi +∑

i∈r |Pi∧∼ai

Fi

big1:∑

i∈r |Pi

0 = 0

Cardinality part: More details are needed

Auxiliary lemmasLemmas from “finset” and “fintype” libraries

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 43/46

Page 79: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Incidence simplicial matrices formalized in SSReflect

Formalization in SSReflect

Summation part: Quite directLemmas from “bigops” librarybigID:

∑i∈r |Pi

Fi =∑

i∈r |Pi∧ai

Fi +∑

i∈r |Pi∧∼ai

Fi

big1:∑

i∈r |Pi

0 = 0

Cardinality part: More details are needed

Auxiliary lemmasLemmas from “finset” and “fintype” libraries

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 43/46

Page 80: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Incidence simplicial matrices formalized in SSReflect

Formalization in SSReflect

Summation part: Quite directLemmas from “bigops” librarybigID:

∑i∈r |Pi

Fi =∑

i∈r |Pi∧ai

Fi +∑

i∈r |Pi∧∼ai

Fi

big1:∑

i∈r |Pi

0 = 0

Cardinality part: More details are neededAuxiliary lemmasLemmas from “finset” and “fintype” libraries

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 43/46

Page 81: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Conclusions and Further Work

Table of Contents

1 Mathematical concepts

2 Computing in Algebraic Topology

3 Formalizing Algebraic Topology

4 Incidence simplicial matrices formalized in SSReflect

5 Conclusions and Further Work

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 44/46

Page 82: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Conclusions and Further Work

Conclusions and Further Work

Conclusions:

Application of Algebraic Topology to the analysis of DigitalImagesImplemented in a Software SystemPartially formalized with Theorem Proving tools

Future Work:

Formalization: Digital Images to Simplicial ComplexesFormalization of Discrete Morse TheoryFormalization of computation of Homology groups. . .

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 45/46

Page 83: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

Conclusions and Further Work

Conclusions and Further Work

Conclusions:

Application of Algebraic Topology to the analysis of DigitalImagesImplemented in a Software SystemPartially formalized with Theorem Proving tools

Future Work:

Formalization: Digital Images to Simplicial ComplexesFormalization of Discrete Morse TheoryFormalization of computation of Homology groups. . .

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 45/46

Page 84: Formal libraries for Algebraic Topology: status...ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 12/46. Mathematical concepts Homology Digital Image Simplicial

The end Thank you for your attention

Formal libraries for Algebraic Topology: statusreport

ForMath La Rioja node(Jonathan Heras)

Departamento de Matematicas y ComputacionUniversidad de La Rioja

Spain

Mathematics, Algorithms and Proofs 2010November 10, 2010

ForMath La Rioja node (J. Heras) Formal libraries for Algebraic Topology 46/46