uninterpreted function是什么

在学习过程中,尤其是在学习数学逻辑时,可能会看见uninterpreted function这样的词,那这个词到底什么意思呢,这里有一个英文解释,可能会解释得比较清楚一点。

来源自博客园:https://www.cnblogs.com/houguochao/archive/2011/11/07/2240319.html

 

 

 

In mathematical logic, an uninterpreted function or function symbol is one that has no other property than its name and arity. Function symbols are used, together with constants and variables, to form terms.

The theory of uninterpreted functions is also sometimes called the free theory, because it is freely generated, and thus a free object, or theempty theory, being the theory having an empty set of sentences (in analogy to an initial algebra). Theories with a non-empty set of equations are known as equational theories. The decision problem for free theories is a satisfiability problem, and is solved by syntactic unification. It is particularly important, as many other theories can be reduced to it. Interpreters for various computer languages, such as Prolog, require algorithms for solving the free theory.

Example

An array can be specified by the following equational axiom:

select(store(a,i,v),j) = (if i = j then v else select(a,j))

This axiom can be used to deduce

select(store(store(a,1,−1),2,−2),1)

select(store(a,1,−1),1)

= −1

Note that this reasoning did not use any 'definition' or interpretation for the functions select and store. All that is known is the axiom.

就是说推理过程中没有用到别的什么定义,只用到了前面的一个公理,这样的一个函数。

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
Google Protobuf 支持压缩和解压缩消息,可以使用 Gzip 或 Snappy 等压缩算法来减小消息的大小。以下是使用 Gzip 进行压缩的示例: 1. 在 .proto 文件中定义消息的压缩选项 ```protobuf syntax = "proto3"; import "google/protobuf/descriptor.proto"; import "google/protobuf/compiler/plugin.proto"; option optimize_for = LITE_RUNTIME; message MyMessage { // 消息字段 } // 设置消息的压缩选项 message FileOptions { // ... bool java_multiple_files = 10; bool java_outer_classname = 9; bool optimize_for = 8; bool cc_generic_services = 16; bool java_generic_services = 17; bool py_generic_services = 18; bool deprecated = 23 [default = false]; string cc_enable_arenas = 31; bool objc_class_prefix = 36; string csharp_namespace = 37; bool swift_prefix = 39; bool php_namespace = 40; bool php_metadata_namespace = 41; bool ruby_package = 42; bool uninterpreted_option = 999 [packed = true]; // 使用 gzip 压缩消息 bool gzip = 123456 [default = false]; } ``` 2. 在代码中使用压缩选项 ```csharp using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Compression; // 创建消息对象 MyMessage message = new MyMessage(); // 将消息序列化为字节数组 byte[] data = message.ToByteArray(); // 创建压缩器对象 GzipStream compressor = new GzipStream(new MemoryStream(), CompressionMode.Compress); // 压缩消息 compressor.Write(data, 0, data.Length); compressor.Close(); // 获取压缩后的字节数组 byte[] compressedData = ((MemoryStream)compressor.BaseStream).ToArray(); // 反序列化压缩后的数据 MyMessage decompressedMessage = MyMessage.Parser.ParseFrom(compressedData); ``` 在上面的代码中,我们首先将消息序列化为字节数组,然后使用 GzipStream 压缩器对象将字节数组压缩为压缩后的字节数组。最后,我们使用 Protobuf 的反序列化方法将压缩后的字节数组反序列化为原始消息对象。 需要注意的是,使用压缩会增加 CPU 和内存的开销,因此应该根据实际情况选择是否使用压缩。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

yisun03

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值