Verifying an algorithm computing Discrete Vector Fields for digital - - PowerPoint PPT Presentation

verifying an algorithm computing discrete vector
SMART_READER_LITE
LIVE PREVIEW

Verifying an algorithm computing Discrete Vector Fields for digital - - PowerPoint PPT Presentation

Verifying an algorithm computing Discrete Vector Fields for digital imaging J. Heras, M. Poza, and J. Rubio Department of Mathematics and Computer Science, University of La Rioja Calculemus 2012 Partially supported by Ministerio de


slide-1
SLIDE 1

Verifying an algorithm computing Discrete Vector Fields for digital imaging∗

  • J. Heras, M. Poza, and J. Rubio

Department of Mathematics and Computer Science, University of La Rioja

Calculemus 2012

∗Partially supported by Ministerio de Educaci´

  • n y Ciencia, project MTM2009-13842-C02-01, and by European

Commission FP7, STREP project ForMath, n. 243847

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 1/31

slide-2
SLIDE 2

Motivation

Algebraic Topology and Digital Images

Digital Image Simplicial complex Homology groups

C0 = Z2[vertices] C1 = Z2[edges] C2 = Z2[triangles] H1 = Z2 ⊕ Z2 ⊕ Z2 H0 = Z2 ⊕ Z2

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 2/31

slide-3
SLIDE 3

Motivation

Algebraic Topology and Digital Images

Digital Image Simplicial complex Homology groups

C0 = Z2[vertices] C1 = Z2[edges] C2 = Z2[triangles] H1 = Z2 ⊕ Z2 ⊕ Z2 H0 = Z2 ⊕ Z2

Reduced Chain complex

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 2/31

slide-4
SLIDE 4

Motivation

Algebraic Topology and Digital Images

Digital Image Simplicial complex Chain complex Homology groups

C0 = Z2[vertices] C1 = Z2[edges] C2 = Z2[triangles] H1 = Z2 ⊕ Z2 ⊕ Z2 H0 = Z2 ⊕ Z2

Reduced Chain Complex

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 2/31

slide-5
SLIDE 5

Motivation

Algebraic Topology and Digital Images

Digital Image Simplicial complex Chain complex Homology groups

C0 = Z2[vertices] C1 = Z2[edges] C2 = Z2[triangles] H1 = Z2 ⊕ Z2 ⊕ Z2 H0 = Z2 ⊕ Z2

Reduced Chain Complex

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 2/31

slide-6
SLIDE 6

Motivation

Algebraic Topology and Digital Images

Digital Image Simplicial complex Chain complex Homology groups

C0 = Z2[vertices] C1 = Z2[edges] C2 = Z2[triangles] H1 = Z2 ⊕ Z2 ⊕ Z2 H0 = Z2 ⊕ Z2

Reduced Chain Complex

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 2/31

slide-7
SLIDE 7

Motivation

Algebraic Topology and Digital Images

Digital Image Simplicial complex Chain complex Homology groups

C0 = Z2[vertices] C1 = Z2[edges] C2 = Z2[triangles] H1 = Z2 ⊕ Z2 ⊕ Z2 H0 = Z2 ⊕ Z2

Reduced Chain Complex

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 2/31

slide-8
SLIDE 8

Motivation

Goal

Application:

Analysis of biomedical images

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 3/31

slide-9
SLIDE 9

Motivation

Goal

Application:

Analysis of biomedical images

Requirements:

Efficiency Reliability

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 3/31

slide-10
SLIDE 10

Motivation

Goal

Application:

Analysis of biomedical images

Requirements:

Efficiency Reliability

Goal A formally verified efficient method to compute homology from digital images

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 3/31

slide-11
SLIDE 11

Motivation

Goal

Digital Image Simplicial Complex Chain Complex Homology triangulation graded structure computing properties reduction

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 4/31

slide-12
SLIDE 12

Motivation

Goal

Digital Image Simplicial Complex Chain Complex Homology triangulation graded structure computing properties reduction

  • J. Heras, M. D´

en` es, G. Mata, A. M¨

  • rtberg, M. Poza, and V. Siles. Towards a

certified computation of homology groups. In proceedings 4th International Workshop on Computational Topology in Image Context. Lecture Notes in Computer Science, 7309, pages 49–57, 2012.

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 4/31

slide-13
SLIDE 13

Motivation

Goal

Digital Image Simplicial Complex Chain Complex Homology triangulation graded structure computing properties reduction

Bottleneck Compute Homology from Chain Complexes

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 4/31

slide-14
SLIDE 14

Motivation

Goal

Digital Image Simplicial Complex Chain Complex Homology triangulation graded structure computing properties reduction

Goal of this work Formalization in Coq/SSReflect of a procedure to reduce the size

  • f Chain Complexes but preserving homology
  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 4/31

slide-15
SLIDE 15

Table of Contents

1

Mathematical background

2

An abstract method

3

An effective method

4

Application

5

Conclusions and Further work

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 5/31

slide-16
SLIDE 16

Mathematical background

Table of Contents

1

Mathematical background

2

An abstract method

3

An effective method

4

Application

5

Conclusions and Further work

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 6/31

slide-17
SLIDE 17

Mathematical background

Chain Complexes

Definition A chain complex C∗ is a pair of sequences C∗ = (Cq, dq)q∈Z where: For every q ∈ Z, the component Cq is a Z2-module, the chain group of degree q For every q ∈ Z, the component dq is a module morphism dq : Cq → Cq−1, the differential map For every q ∈ Z, the composition dqdq+1 is null: dqdq+1 = 0

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 7/31

slide-18
SLIDE 18

Mathematical background

Chain Complexes

Definition A chain complex C∗ is a pair of sequences C∗ = (Cq, dq)q∈Z where: For every q ∈ Z, the component Cq is a Z2-module, the chain group of degree q For every q ∈ Z, the component dq is a module morphism dq : Cq → Cq−1, the differential map For every q ∈ Z, the composition dqdq+1 is null: dqdq+1 = 0 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

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 7/31

slide-19
SLIDE 19

Mathematical background

Chain Complexes

Definition A chain complex C∗ is a pair of sequences C∗ = (Cq, dq)q∈Z where: For every q ∈ Z, the component Cq is a Z2-module, the chain group of degree q For every q ∈ Z, the component dq is a module morphism dq : Cq → Cq−1, the differential map For every q ∈ Z, the composition dqdq+1 is null: dqdq+1 = 0 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 Definition Let C∗ = (Cq, dq)q∈Z be a chain complex. For each degree n ∈ Z, the n-homology module of C∗ is defined as the quotient module Hn(C∗) = Zn Bn

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 7/31

slide-20
SLIDE 20

Mathematical background Effective Homology Theory

Reduction

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

h

  • f

D∗

g

  • 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, what implies that Hn(C∗) ∼ = Hn(D∗) for all n.

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 8/31

slide-21
SLIDE 21

Mathematical background Discrete Morse Theory

Discrete Morse Theory

  • A. Romero and F. Sergeraert. Discrete Vector Fields and Fundamental Algebraic

Topology, 2010. http://arxiv.org/abs/1005.5685v1.

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 9/31

slide-22
SLIDE 22

Mathematical background Discrete Morse Theory

Discrete Morse Theory

  • A. Romero and F. Sergeraert. Discrete Vector Fields and Fundamental Algebraic

Topology, 2010. http://arxiv.org/abs/1005.5685v1.

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 9/31

slide-23
SLIDE 23

Mathematical background Discrete Morse Theory

Discrete Morse Theory

  • A. Romero and F. Sergeraert. Discrete Vector Fields and Fundamental Algebraic

Topology, 2010. http://arxiv.org/abs/1005.5685v1.

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 9/31

slide-24
SLIDE 24

Mathematical background Discrete Morse Theory

Discrete Morse Theory

  • A. Romero and F. Sergeraert. Discrete Vector Fields and Fundamental Algebraic

Topology, 2010. http://arxiv.org/abs/1005.5685v1.

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 9/31

slide-25
SLIDE 25

Mathematical background Discrete Morse Theory

Discrete Morse Theory

  • A. Romero and F. Sergeraert. Discrete Vector Fields and Fundamental Algebraic

Topology, 2010. http://arxiv.org/abs/1005.5685v1.

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 9/31

slide-26
SLIDE 26

Mathematical background Discrete Morse Theory

Discrete Morse Theory

  • A. Romero and F. Sergeraert. Discrete Vector Fields and Fundamental Algebraic

Topology, 2010. http://arxiv.org/abs/1005.5685v1.

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 9/31

slide-27
SLIDE 27

Mathematical background Discrete Morse Theory

Discrete Morse Theory

  • A. Romero and F. Sergeraert. Discrete Vector Fields and Fundamental Algebraic

Topology, 2010. http://arxiv.org/abs/1005.5685v1.

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 9/31

slide-28
SLIDE 28

Mathematical background Discrete Morse Theory

Discrete Morse Theory

  • A. Romero and F. Sergeraert. Discrete Vector Fields and Fundamental Algebraic

Topology, 2010. http://arxiv.org/abs/1005.5685v1. Given a chain complex C∗ and a dvf , V over C∗ C∗ ⇒ ⇒ C c

generators of C c

∗ are critical cells of C∗

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 9/31

slide-29
SLIDE 29

Mathematical background Discrete Morse Theory

Discrete Morse Theory

  • A. Romero and F. Sergeraert. Discrete Vector Fields and Fundamental Algebraic

Topology, 2010. http://arxiv.org/abs/1005.5685v1. Given a chain complex C∗ and a dvf , V over C∗ C∗ ⇒ ⇒ C c

generators of C c

∗ are critical cells of C∗

0 ← Z16

2 d1

← − Z32

2 d2

← − Z16

2 ← 0

↓ 0 ← Z2

  • d1

← − Z2

  • d2

← − 0 ← 0

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 9/31

slide-30
SLIDE 30

Mathematical background Discrete Morse Theory

Discrete Vector Fields

Definition Let C∗ = (Cp, dp)p∈Z a free chain complex with distinguished Z2-basis βp ⊂ Cp. A discrete vector field V on C∗ is a collection of pairs V = {(σi; τi)}i∈I satisfying the conditions: Every σi is some element of βp, in which case τi ∈ βp+1. The degree p depends

  • n i and in general is not constant.

Every component σi is a regular face of the corresponding τi. Each generator (cell) of C∗ appears at most once in V .

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 10/31

slide-31
SLIDE 31

Mathematical background Discrete Morse Theory

Discrete Vector Fields

Definition Let C∗ = (Cp, dp)p∈Z a free chain complex with distinguished Z2-basis βp ⊂ Cp. A discrete vector field V on C∗ is a collection of pairs V = {(σi; τi)}i∈I satisfying the conditions: Every σi is some element of βp, in which case τi ∈ βp+1. The degree p depends

  • n i and in general is not constant.

Every component σi is a regular face of the corresponding τi. Each generator (cell) of C∗ appears at most once in V . Definition A V -path of degree p and length m is a sequence π = ((σik , τik ))0≤k<m satisfying: Every pair (σik , τik ) is a component of V and τik is a p-cell. For every 0 < k < m, the component σik is a face of τik−1, non necessarily regular, but different from σik−1.

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 10/31

slide-32
SLIDE 32

Mathematical background Discrete Morse Theory

Discrete Vector Fields

Definition A discrete vector field V is admissible if for every p ∈ Z, a function λp : βp → N is provided satisfying the following property: every V -path starting from σ ∈ βp has a length bounded by λp(σ).

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 11/31

slide-33
SLIDE 33

Mathematical background Discrete Morse Theory

Discrete Vector Fields

Definition A discrete vector field V is admissible if for every p ∈ Z, a function λp : βp → N is provided satisfying the following property: every V -path starting from σ ∈ βp has a length bounded by λp(σ). Definition A cell σ which does not appear in a discrete vector field V is called a critical cell.

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 11/31

slide-34
SLIDE 34

Mathematical background Discrete Morse Theory

Discrete Vector Fields

Definition A discrete vector field V is admissible if for every p ∈ Z, a function λp : βp → N is provided satisfying the following property: every V -path starting from σ ∈ βp has a length bounded by λp(σ). Definition A cell σ which does not appear in a discrete vector field V is called a critical cell. Theorem Let C∗ = (Cp, dp)p∈Z be a free chain complex and V = {(σi; τi)}i∈I be an admissible discrete vector field on C∗. Then the vector field V defines a canonical reduction ρ = (f , g, h) : (Cp, dp) ⇒ ⇒ (C c

p , d′ p) where C c p = Z2[βc p] is the free Z2-module generated

by the critical p-cells.

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 11/31

slide-35
SLIDE 35

Mathematical background Discrete Morse Theory

Example: an admissible discrete vector field

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 12/31

slide-36
SLIDE 36

Mathematical background Discrete Morse Theory

Example: an admissible discrete vector field

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 12/31

slide-37
SLIDE 37

Mathematical background Discrete Morse Theory

Example: an admissible discrete vector field

Dvf x

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 12/31

slide-38
SLIDE 38

Mathematical background Discrete Morse Theory

Example: an admissible discrete vector field

Dvf x Dvf Admissible x

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 12/31

slide-39
SLIDE 39

Mathematical background Discrete Morse Theory

Example: an admissible discrete vector field

Dvf x Dvf Admissible x Dvf Admissible

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 12/31

slide-40
SLIDE 40

Mathematical background Discrete Morse Theory

Vector fields and integer matrices

Differential maps of a Chain Complex can be represented as matrices

. . . ← Zm

2 M

← − Zn

2 ← . . .

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 13/31

slide-41
SLIDE 41

Mathematical background Discrete Morse Theory

Vector fields and integer matrices

Differential maps of a Chain Complex can be represented as matrices

. . . ← Zm

2 M

← − Zn

2 ← . . . Definition An admissible vector field V for M is nothing but a set of integer pairs {(ai, bi)} satisfying these conditions:

1

1 ≤ ai ≤ m and 1 ≤ bi ≤ n

2

The entry M[ai, bi] of the matrix is 1

3

The indices ai (resp. bi) are pairwise different

4

Non existence of loops

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 13/31

slide-42
SLIDE 42

Mathematical background Discrete Morse Theory

Vector fields and integer matrices

Differential maps of a Chain Complex can be represented as matrices

. . . ← Zm

2 M

← − Zn

2 ← . . . Definition An admissible vector field V for M is nothing but a set of integer pairs {(ai, bi)} satisfying these conditions:

1

1 ≤ ai ≤ m and 1 ≤ bi ≤ n

2

The entry M[ai, bi] of the matrix is 1

3

The indices ai (resp. bi) are pairwise different

4

Non existence of loops

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 13/31

slide-43
SLIDE 43

Mathematical background Discrete Morse Theory

Vector fields and integer matrices

Differential maps of a Chain Complex can be represented as matrices

. . . ← Zm

2 M

← − Zn

2 ← . . . Definition An admissible vector field V for M is nothing but a set of integer pairs {(ai, bi)} satisfying these conditions:

1

1 ≤ ai ≤ m and 1 ≤ bi ≤ n

2

The entry M[ai, bi] of the matrix is 1

3

The indices ai (resp. bi) are pairwise different

4

Non existence of loops

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 13/31

slide-44
SLIDE 44

An abstract method

Table of Contents

1

Mathematical background

2

An abstract method

3

An effective method

4

Application

5

Conclusions and Further work

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 14/31

slide-45
SLIDE 45

An abstract method

Coq/SSReflect

Coq:

An Interactive Proof Assistant Based on Calculus of Inductive Constructions Interesting feature: program extraction from a constructive proof

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 15/31

slide-46
SLIDE 46

An abstract method

Coq/SSReflect

Coq:

An Interactive Proof Assistant Based on Calculus of Inductive Constructions Interesting feature: program extraction from a constructive proof

SSReflect:

Extension of Coq Developed while formalizing the Four Color Theorem by G. Gonthier Currently, it is used in the formalization of Feit-Thompson Theorem

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 15/31

slide-47
SLIDE 47

An abstract method

Admissible discrete vector fields in SSReflect

Definition An admissible discrete vector field V for M is nothing but a set of integer pairs {(ai, bi)} satisfying these conditions:

1

1 ≤ ai ≤ m and 1 ≤ bi ≤ n

2

The entry M[ai, bi] of the matrix is 1

3

The indices ai (resp. bi) are pairwise different

4

Non existence of loops Definition admissible_dvf (M: ’M[Z2]_(m,n)) (V: seq (’I_m * ’I_n)) (ords : simpl_rel ’I_m) := all [pred p | M p.1 p.2 == 1] V && uniq (map (@fst _ _) V) && uniq (map (@snd _ _) V) && all [pred i | ~~ (connect ords i i)] (map (@fst _ _) V).

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 16/31

slide-48
SLIDE 48

An abstract method

The abstract algorithm

Fixpoint genDvfOrders M V (ords : simpl_rel _) k := if k is l.+1 then let P := [pred ij | admissible (ij::V) M (relU ords (gen_orders M ij.1 ij.2))] in if pick P is Some (i,j) then genDvfOrders M ((i,j)::V) (relU ords (gen_orders M i j)) l else (V, ords) else (V, ords). Definition gen_adm_dvf M := genDvfOrders M [::] [rel x y | false] (minn m n).

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 17/31

slide-49
SLIDE 49

An abstract method

The abstract algorithm

Fixpoint genDvfOrders M V (ords : simpl_rel _) k := if k is l.+1 then let P := [pred ij | admissible (ij::V) M (relU ords (gen_orders M ij.1 ij.2))] in if pick P is Some (i,j) then genDvfOrders M ((i,j)::V) (relU ords (gen_orders M i j)) l else (V, ords) else (V, ords). Definition gen_adm_dvf M := genDvfOrders M [::] [rel x y | false] (minn m n). Lemma admissible_gen_adm_dvf m n (M : ’M[Z2]_(m,n)) : let (vf,ords) := gen_adm_dvf M in admissible vf M ords. Problem It is not an executable algorithm

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 17/31

slide-50
SLIDE 50

An effective method

Table of Contents

1

Mathematical background

2

An abstract method

3

An effective method

4

Application

5

Conclusions and Further work

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 18/31

slide-51
SLIDE 51

An effective method Methodology

Romero-Sergeraert’s Algorithm

  • A. Romero and F. Sergeraert. Discrete Vector Fields and Fundamental Algebraic

Topology, 2010. http://arxiv.org/abs/1005.5685v1. Algorithm Input: A matrix M Output: An admissible discrete vector field for M

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 19/31

slide-52
SLIDE 52

An effective method Methodology

Romero-Sergeraert’s Algorithm

  • A. Romero and F. Sergeraert. Discrete Vector Fields and Fundamental Algebraic

Topology, 2010. http://arxiv.org/abs/1005.5685v1. Algorithm Input: A matrix M Output: An admissible discrete vector field for M Algorithm Input: A chain complex C∗ and an admissible discrete vector field of C∗ Output: A reduced chain complex ˆ C∗

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 19/31

slide-53
SLIDE 53

An effective method Methodology

From computation to verification through testing

Haskell as programming language QuickCheck to test the programs Coq/SSReflect to verify the correctness of the programs

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 20/31

slide-54
SLIDE 54

An effective method Methodology

Haskell

Algorithm (gen adm dvf ) Input: A matrix M Output: An admissible discrete vector field for M Algorithm (reduced cc) Input: A chain complex C∗ Output: A reduced chain complex ˆ C∗ > gen_adm_dvf [[1,0,1,1],[0,0,1,0],[1,1,0,1]] [(0,0),(1,2),(2,1)]

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 21/31

slide-55
SLIDE 55

An effective method Methodology

QuickCheck

A specification of the properties which our program must verify Testing them Towards verification Detect bugs > quickCheck M -> admissible (gen_adm_dvf M) + + + OK, passed 100 tests

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 22/31

slide-56
SLIDE 56

An effective method Methodology

Coq/SSReflect

SSReflect Theorem: Theorem gen_adm_dvf_is_admissible (M : seq (seq Z2)) : admissible (gen_adm_dvf M). SSReflect Theorem: Theorem is_reduction (C : chaincomplex) : reduction C (reduced_cc C). SSReflect Theorem: Theorem reduction_preserves_betti (C D : chaincomplex) (rho : reduction C D) : Betti C = Betti D.

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 23/31

slide-57
SLIDE 57

An effective method Experimental results

Experimental results

500 randomly generated matrices Initial size of the matrices: 100 × 300 Time: 12 seconds

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 24/31

slide-58
SLIDE 58

An effective method Experimental results

Experimental results

500 randomly generated matrices Initial size of the matrices: 100 × 300 Time: 12 seconds After reduction: 5 × 50 Time: milliseconds

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 24/31

slide-59
SLIDE 59

Application Counting synapses

Table of Contents

1

Mathematical background

2

An abstract method

3

An effective method

4

Application

5

Conclusions and Further work

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 25/31

slide-60
SLIDE 60

Application Counting synapses

Counting Synapses

Synapses are the points of connection between neurons Relevance: Computational capabilities of the brain Procedures to modify the synaptic density may be an important asset in the treatment of neurological diseases An automated and reliable method is necessary

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 26/31

slide-61
SLIDE 61

Application Counting synapses

Counting Synapses

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 27/31

slide-62
SLIDE 62

Application Counting synapses

Counting Synapses

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 27/31

slide-63
SLIDE 63

Application Counting synapses

Counting Synapses

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 27/31

slide-64
SLIDE 64

Application Counting synapses

Results with biomedical images

Without reduction procedure:

Coq is not able to compute homology of this kind of images

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 28/31

slide-65
SLIDE 65

Application Counting synapses

Results with biomedical images

Without reduction procedure:

Coq is not able to compute homology of this kind of images

After reduction procedure:

Coq computes in just 25 seconds

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 28/31

slide-66
SLIDE 66

Conclusions and Further work

Table of Contents

1

Mathematical background

2

An abstract method

3

An effective method

4

Application

5

Conclusions and Further work

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 29/31

slide-67
SLIDE 67

Conclusions and Further work

Conclusions and Further work

Conclusions:

Method to reduce big images preserving homology Formalization of admissible discrete vector fields on Coq Remarkable reductions in different benchmarks

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 30/31

slide-68
SLIDE 68

Conclusions and Further work

Conclusions and Further work

Conclusions:

Method to reduce big images preserving homology Formalization of admissible discrete vector fields on Coq Remarkable reductions in different benchmarks

Further work:

Matrices with coefficients over Z Integration between Coq and ACL2 Application of homological methods to biomedical problems

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 30/31

slide-69
SLIDE 69

Thank you for your attention Questions?

Verifying an algorithm computing Discrete Vector Fields for digital imaging

  • J. Heras, M. Poza, and J. Rubio

Department of Mathematics and Computer Science, University of La Rioja

Calculemus 2012

  • J. Heras, M. Poza, and J. Rubio

Verifying an algorithm computing Discrete Vector Fields for digital imaging 31/31