# Audit: Fewer than 20 percent of the positive integers from 1 to 1000 are prime

- **Generated:** 2026-03-28
- **Reader summary:** [proof.md](proof.md)
- **Proof script:** [proof.py](proof.py)

## Claim Specification

| Field | Value |
|-------|-------|
| Subject | positive integers from 1 to 1000 |
| Property | percentage that are prime |
| Operator | < |
| Threshold | 20 |
| Operator note | 'Fewer than 20 percent' means the count of primes in [1, 1000] divided by 1000, multiplied by 100, must be strictly less than 20. Equivalently, the prime count must be strictly less than 200. |

## Fact Registry

| ID | Key | Label |
|----|-----|-------|
| A1 | — | Prime count via Sieve of Eratosthenes |
| A2 | — | Prime count via trial division (independent cross-check) |
| A3 | — | Percentage of primes in [1, 1000] |

## Full Evidence Table

### Type A (Computed) Facts

| ID | Fact | Method | Result |
|----|------|--------|--------|
| A1 | Prime count via Sieve of Eratosthenes | Sieve of Eratosthenes | 168 |
| A2 | Prime count via trial division (independent cross-check) | Trial division | 168 |
| A3 | Percentage of primes in [1, 1000] | prime_count / 1000 * 100 | 16.8% |

## Computation Traces

```
Sieve of Eratosthenes: found 168 primes in [1, 1000]
  First 10: [2, 3, 5, 7, 11, 13, 17, 19, 23, 29]
  Last 10:  [937, 941, 947, 953, 967, 971, 977, 983, 991, 997]

Trial division: found 168 primes in [1, 1000]
Cross-check: both methods agree — 168 primes
  percentage of primes in [1, 1000]: prime_count_sieve / N * 100 = 168 / 1000 * 100 = 16.8000
  prime percentage < 20%: 16.8 < 20 = True
```

## Adversarial Checks (Rule 5)

### Check 1: Could the sieve or trial division have a bug that undercounts primes?

- **Verification performed:** Cross-checked two independent algorithms (Sieve of Eratosthenes and trial division). Both produce identical prime lists. Additionally, the result of 168 primes up to 1000 is a well-known value in number theory, denoted pi(1000) = 168.
- **Finding:** Both methods agree on 168 primes. This matches the known value pi(1000) = 168.
- **Breaks proof:** No

### Check 2: Is there an interpretation where '20 percent' could mean something other than 200 out of 1000?

- **Verification performed:** Considered whether 'fewer than 20 percent' could be non-strict (<= vs <). The phrase 'fewer than' is unambiguously strict inequality. Even under <=, 168 <= 200 holds, so the claim would still be true.
- **Finding:** No alternative interpretation changes the result. 168 < 200 under any reading.
- **Breaks proof:** No

## Hardening Checklist

- **Rule 1:** N/A — pure computation, no empirical facts
- **Rule 2:** N/A — pure computation, no empirical facts
- **Rule 3:** `date.today()` used for generation date
- **Rule 4:** CLAIM_FORMAL with operator_note explicitly documents the strict inequality interpretation
- **Rule 5:** Two adversarial checks performed — algorithm correctness and interpretation ambiguity
- **Rule 6:** N/A — pure computation, no empirical facts. Cross-check uses mathematically independent method (sieve vs trial division)
- **Rule 7:** `explain_calc()` and `compare()` from computations.py used for all computations
- **validate_proof.py result:** PASS (14/14 checks passed, 0 issues, 0 warnings)

---

Generated by [proof-engine](https://github.com/yaniv-golan/proof-engine) v0.10.0 on 2026-03-28.
