<commit_before>/-
Copyright (c) 2017 <NAME>. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: <NAME>
-/
import data.int.basic
import data.nat.cast

open nat

namespace int

/- cast (injection into groups with one) -/

@[simp, push_cast] theorem nat_cast_eq_coe_nat : ∀ n,<commit_msg>docs(data/int/cast): add module docstring (#7969)<commit_after>/-
Copyright (c) 2017 <NAME>. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: <NAME>
-/
import data.int.basic
import data.nat.cast

/-!
# Cast of integers

This file defines the *canonical* homomorphism from the integers into a type `α` with `0`,
`1`, `+` and `-` (typically a `ring`).

## Main declarations

* `cast`: Canonical homomorphism `ℤ → α` where `α` has a `0`, `1`, `+` and `-`.
* `cast_add_hom`: `cast` bundled as an `add_monoid_hom`.
* `cast_ring_hom`: `cast` bundled as a `ring_hom`.

## Implementation note

Setting up the coercions priorities is tricky. See Note [coercion into rings].
-/

open nat

namespace int

@[simp, push_cast] theorem nat_cast_eq_coe_nat : ∀ n,
{'fraction_non_alphanumeric': 0.13031914893617022, 'fraction_numerical': 0.01773049645390071, 'mean_word_length': 4.226851851851852, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2061956', 'n_tokens_mistral': 420, 'n_tokens_neox': 377, 'n_words': 143}