# `Spectre.GAM.Evidence`
[🔗](https://github.com/elchemista/spectre/blob/0.4.0/lib/spectre/gam/evidence.ex#L1)

Portable Evidence about a proposition, kept separate from authority.

Its explicit stance distinguishes support from contradiction. Evidence is
also scoped by source, provenance, time, bindings and assumptions.
`:generated` and provisional evidence remain visibly so; this record never
promotes them to observed facts.

# `stance`

```elixir
@type stance() :: :supports | :contradicts
```

# `t`

```elixir
@type t() :: %Spectre.GAM.Evidence{
  assumptions: [term()],
  bindings: map(),
  freshness_ms: non_neg_integer() | nil,
  issuer_ref: String.t(),
  labels: [Spectre.GAM.Label.t()],
  observed_at: integer(),
  parent_refs: [String.t()],
  payload: term(),
  payload_ref: String.t() | nil,
  proposition: term(),
  provenance: :observed | :derived | :generated,
  provisional: boolean(),
  ref: String.t(),
  schema_version: 1,
  source_ref: String.t(),
  stance: stance(),
  valid_from: integer() | nil,
  valid_until: integer() | nil
}
```

# `temporal_status`

```elixir
@type temporal_status() :: :current | :from_future | :not_yet_valid | :expired
```

# `canonical`

```elixir
@spec canonical(t()) :: map()
```

Returns the plain, string-keyed ledger representation.

# `content_ref`

```elixir
@spec content_ref(t()) :: String.t()
```

Returns the content-derived reference, independent of an assigned `ref`.

# `current_at?`

```elixir
@spec current_at?(t(), integer(), non_neg_integer() | nil) :: boolean()
```

Returns whether Evidence is current and fresh enough at one trusted instant.

# `digest`

```elixir
@spec digest(t()) :: String.t()
```

Returns the stable digest of the complete evidence record.

# `from_canonical`

```elixir
@spec from_canonical(map()) :: {:ok, t()} | {:error, term()}
```

Restores evidence from its canonical map.

# `new`

```elixir
@spec new(map() | keyword() | t()) :: {:ok, t()} | {:error, term()}
```

Builds and validates evidence.

# `normalize_labels`

```elixir
@spec normalize_labels(term()) :: {:ok, [Spectre.GAM.Label.t()]} | {:error, term()}
```

Returns canonical labels de-duplicated and ordered by stable reference.

# `opposes?`

```elixir
@spec opposes?(t(), t()) :: boolean()
```

Returns whether two records assert opposite stances for the same proposition.

# `temporal_status`

```elixir
@spec temporal_status(t(), integer()) :: temporal_status()
```

Returns the Evidence time-window status at one trusted instant.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
