Hi this is test blog
/// Extract all snowflake IDs surrounded by <@!? and >, called mentions, from a string.
#[must_use]
pub fn extract_mentions(s: &str) -> Vec<u64> {
static REGEX: OnceLock<Regex> = OnceLock::new();
let regex = REGEX.get_or_init(|| Regex::new(r"<@!?(\d+)>").unwrap());
regex
.captures_iter(s)
.map(|c| c.get(1).unwrap().as_str().parse().unwrap())
.collect::<Vec<_>>()
}
Eigenproof
-
Sets and are defined as follows:
- Prove that .
- Disprove that .
-
. Proof.
Suppose is an element of set , so for some integer . To prove , we must show that is also an element of set , so for some integer .
We can rewrite as follows:
If we set , then we have . is an integer since is an integer, and the products and differences of integers are integers. Thus, is an element of . Since was an arbitrary element of , we have shown that every element of is also an element of , so .
-
. Proof.
Lemma: Parity Theorem for Even Integers. If is even, then is odd.
Proof. If is even, then for some integer . Then , so is odd.For the sake of contradiction, suppose . Then for all elements , .
Suppose that is an even integer, which means is an integer. If we let , then by satisfying the predicate for .
Since , by the assumption that , we have . Thus, there exists some integer such that . Equating the expressions for in terms of and , we have:
Since can be written as for an integer , is an even integer by the definition of even integers. However, we assumed that is even. By the Parity Theorem for Even Integers, since is even, must be odd.
cannot be even and odd at the same time. This is a contradiction, so our assumption that must be false. Thus, is false.