Normalize kernel expressions when comparing two automata port by port

Abierto
#395 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
54/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo

Línea de trabajo

Start in src/Probability/ and read the existing ProbDist rewrite lemmas named in the issue, then inspect the automaton and product step definitions referenced by #221 and #223. Implement kernel_nf with the specified fixed rewrite list and add the cited state-map and product-step lemmas. Done means the side-by-side automata equality closes port by port and the tactic handles both pushforward examples.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Background

By #221, two automata on one interface are one system when a state map $f$ carries each step of the first to the step of the second:

\big(\mathrm{step}_1(s,i,x)\big).\mathrm{map}\,(f\times\mathrm{id})=\mathrm{step}_2(f\,s,i,x)\qquad\text{for every port } i .

The hypothesis is one identity of kernels per port. After the two steps are unfolded, both sides are built from ProbDist.map, ProbDist.bind and ProbDist.single, and differ only in how the pushforwards are nested. A fixed rewriting brings both to one form:

(P.map g).map f   = P.map (f ∘ g)                   ProbDist.map_map
(P.bind k).map f  = P.bind fun a => (k a).map f     ProbDist.map_bind
(P.map g).bind k  = P.bind fun a => k (g a)         ProbDist.bind_map
(δ_a).bind k      = k a                             ProbDist.single_bind
(δ_a).map f       = δ_(f a)                         ProbDist.map_single

Today each such identity is closed by a hand-picked sequence of these rewrites.

Proposed change

Add the tactic kernel_nf in src/Probability/: a simp only with the fixed list above, Function.comp_def, Prod.map_apply and id_eq. It unfolds no definition.

Add what a proof of this shape cites before the tactic:

  • TypedSystem.ofProbAutomaton_eq_of_stateMap_of_map_eq: the law of #221 with the image of the initial law as a hypothesis, μ.map f = ν. Applied to a goal ofProbAutomaton A step₁ μ = ofProbAutomaton A step₂ ν, both automata are read off the goal, and what is left is the state map and one identity per port.
  • ProbStep.parallel_inl and ProbStep.parallel_inr: the two rows of the product step of #223, by rfl.
Acceptance criteria

Take two automata side by side and the same pair with the two states exchanged. Prove them equal: each port closes by its row and kernel_nf. Check the tactic on a pushforward of a draw from a pushforward, and on a draw from a point law.

Lenguaje dominante
Lean
Estrellas
3
Forks
0
Merge medio
1 d 7 h
PR fusionados (30 d)
123

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de trailofbits/constructive-cryptography

Todos los issues de trailofbits/constructive-cryptography

Issues similares

Más issues de Backend & API Design

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.